dbt Model Generator

intermediatedataMin 16K context

Generates and refactors dbt models for analytics engineering. Writes staging, intermediate, and mart models following layered conventions, adds schema.yml tests and descriptions, applies incremental and materialization strategies, and structures sources and refs correctly. Produces SQL plus YAML that fits dbt best practices and is ready to run.

Use Cases

  • Scaffolding staging, intermediate, and mart models
  • Adding schema.yml tests and column descriptions
  • Converting ad-hoc SQL into layered dbt models
  • Applying incremental materialization to large tables

Example Prompt

Generate dbt models for an orders pipeline.

Sources: raw.orders, raw.customers (Snowflake)
Goal: a fct_orders mart with customer attributes and daily order metrics.

Deliver:
1. stg_orders and stg_customers staging models with light cleaning
2. An int_ model joining them if needed
3. fct_orders mart (consider incremental materialization; explain the choice)
4. schema.yml with not_null/unique/relationships tests and descriptions
Follow standard dbt layering and use ref()/source() correctly.

Recommended Models

Compatible Tools

claude-codecursorkiroany

Modalities

Input: text, code
Output: text, code

Related Skills

Author

OpenModels Community

@openmodelsrun