Can I prompt AI to write reliable dbt SQL models?
Yes—provide source tables, desired grain, and model purpose. Ask for dbt-compliant SQL with tests (unique, not_null) and a YAML schema. Require comments on assumptions and a DAG note of upstream dependencies. Keep examples of expected rows to validate joins.
In practice
Include your naming conventions; models will slot into your DAG more cleanly.
Where to start
- [01]Generate a model skeleton and YAML.
- [02]Add tests and sample data checks.
- [03]Run locally and compare to expected rows.
- [04]Document in your dbt docs site.
dbt promptsSQL generation AIanalytics engineering LLM