Ask Mode

Ask Mode provides a flexible, conversational interface for working with DinoAI. It's ideal for exploratory questions, reviewing documentation, and generating suggestions across multiple files.

Using Ask Mode

  1. Click the DinoAI icon (🪄) in the left panel.

  2. Ensure "Ask Mode" is selected at the top of the panel.

  3. Type your question or command in the prompt.

Ask Mode Commands

Command Name
Syntax
Use Case

/model

Create new models with proper structure and logic

/explain

Understand existing models and their purpose

/fix

Identify and resolve errors in your models

/test

Create standard dbt™ tests for your models

/test_elementary

Create Elementary-specific model tests

/mermaid

Visualize model relationships

/sql_to_dbt

Convert existing SQL into dbt™ models


Asking Questions

Ask Mode can assist with any dbt™ development inquiry. Common questions include:

  • "How can I optimize the performance of my dbt models?"

  • "What's the best way to handle data quality issues?"

  • "Can you suggest a pattern for implementing incremental models?


Ask Mode Features

Create a dbt™ model

DinoAI generates dbt™ models based on your prompts, tailored to your project's structure.

How to Use

  1. Open DinoAI: Click the DinoAI icon (🪄) in the left panel.

  2. Access the "Create Model" Feature:

    • Select the "One Click" command: "Create a dbt model"

    • Or type /model in the prompt.

  3. Describe Your Model

Example Prompt
/model Create a dbt model named int_nba_player_info that joins all columns 
from nba_player_info with the salary and season columns from nba_player_salaries, 
using the player_id column as the join key. Materialize it as a view.
  1. Implement the Model:

    • Copy the generated SQL and paste it into your dbt project.

    • Modify as needed and validate using Data Explorer.


Explain a dbt™ Model

DinoAI provides detailed explanations of any dbt™ model, including purpose, structure, and key components.

How to Use

  1. Right-click a .sql file and select "Explain Model" from the DinoAI dropdown.

  2. Alternative: Open DinoAI and type:

/explain @[model_name}
  1. Review the Explanation: DinoAI will summarize your model’s purpose and output.


Debug a dbt™ Model

DinoAI helps identify and fix errors in your dbt™ models, ensuring a reliable data pipeline.

How to Use

  1. Right-click a .sql file and select "Fix Model" from the DinoAI dropdown.

  2. Alternative: Open DinoAI and type:

/fix @[model_name]
  1. Review and Implement Fixes:

    • Copy the debugged code into your project.

    • Use Data Explorer to validate the fixes.


Generate Tests For a dbt™ Model

DinoAI can automatically generate dbt™ tests to maintain data integrity and consistency.

Generating TestsGenerating Elementary Tests

How to Use

  1. Right-click a .sql file and select "Generate Tests".

  2. Alternative: Open DinoAI and type:

    /test @[model_name]
  3. Implement the Test:

    • Copy the test code into your schema.yml file.

    • Run dbt test to validate.


Generate Mermaid diagram for a dbt™ Model

DinoAI can create entity relationship diagrams (ERDs) using Mermaid.js, helping you visualize model dependencies.

How to Use:

  1. Right-click a .sql file and select "Generate Mermaid Diagram".

  2. Alternative: Open DinoAI and type:

    /mermaid @[model_name]
  3. Implement the Diagram:

    • Copy the Mermaid code into a .mmd file.

    • Upload it to Paradime Editor and click the 👀 eye icon to view it.


Convert SQL to dbt™ model

DinoAI can convert raw SQL queries into dbt™ models, saving development time.

How to Use:

  1. Right-click a .sql file with raw SQL and select "Convert SQL to dbt model".

  2. Alternative: Open DinoAI and type:

    /sql_to_dbt @[model_name]
  3. Implement the Model:

    • Copy the generated dbt model SQL and modify as needed.


When to Use Ask Mode

Ask Mode is ideal for:

  • Exploratory Analysis: When you're investigating data patterns or trying to understand relationships

  • Learning dbt™ Concepts: When you need explanations about dbt™ features or best practices

  • Cross-File Suggestions: When you need recommendations that span multiple files

  • Quick Reference: When you need to understand existing models without modifying them

Additional DinoAI Features

DinoAI extends beyond the Copilot to enhance your entire dbt™ workflow:

Last updated

Was this helpful?