Generating dbt™ models
Last updated
Was this helpful?
Last updated
Was this helpful?
Analytics engineers need to create models with readable column names, consistent naming conventions, and appropriate transformations. This repetitive process can be tedious, especially with tables containing many columns or complex relationships.
DinoAI Agent can automatically generate well-structured models that transform raw source data into more user-friendly formats.
Create an intermediate model that joins customer data from the 'stg_customers' model with order information from 'stg_orders', and calculate lifetime value metrics.
Open DinoAI by clicking the DinoAI icon (🪄) in the left panel
Select Agent Mode if it's not already selected
Optional: Add context by clicking the "@" symbol and selecting:
Existing similar models to follow their pattern
The models you want to reference
Directory structure to understand project organization
Enter your prompt describing the model you want to create
Review/Accept the changes to create the file in your project
Test the model using dbt™ commands or Data Explorer for flexibility
After you enter your prompt:
DinoAI analyzes your sources.yml file and any provided context
It creates appropriate folder structure for the model
It generates a model with properly structured CTEs and join conditions
If configured, DinoAI applies your .dinorules preferences
Consistency: Ensures all models follow the same patterns and conventions
Readability: Makes column names more user-friendly and easier to understand
Efficiency: Creates complex models in seconds rather than hours
Standards: Applies your team's SQL formatting and naming conventions automatically