creating-dbt-models

Category: Data & AI | Uploader: AltimateAIAltimateAI | Downloads: 0 | Version: v1.0(Latest)

Creates dbt models following project conventions. Use when working with dbt models for: (1) Creating new models (any layer - discovers project's naming conventions first) (2) Task mentions "create", "build", "add", "write", "new", or "implement" with model, table, or SQL (3) Modifying existing model logic, columns, joins, or transformations (4) Implementing a model from schema.yml specs or expected output requirements Discovers project conventions before writing. Runs dbt build (not just compile) to verify. --- # dbt Model Development **Read before you write. Build after you write. Verify your output.** ## Critical Rules 1. **ALWAYS run `dbt build`** after creating/modifying models - compile is NOT enough 2. **ALWAYS verify output** after build using `dbt show` - don't assume success 3. **If build fails 3+ times**, stop and reassess your entire approach ## Workflow ### 1. Understand the Task Requirements - What columns are needed? List them explicitly. - What is the grain of the table (one row per what)? - What calculations or aggregations are required? ### 2. Discover Project Conventions ```bash cat dbt_project.yml find models/ -name "*.sql" | head -20 ``` Read 2-3 existing models to learn naming, config, and SQL patterns. ### 3. Find Similar Models ```bash # Find models with similar purpose find models/ -name "*agg*.sql" -o -name "*fct_*.sql" | head -5 ```

Changelog: Source: GitHub https://github.com/AltimateAI/data-engineering-skills

Directory Structure

Current level: Root

SKILL.md

Login to download/like/favorite ❤ 73 | ★ 0
Comments 0

Please login before commenting.

No comments yet. Be the first one!