← ClaudeAtlas

dbt-coderlisted

dbt (data build tool) patterns for model organization, incremental strategies, and testing.
majesticlabs-dev/majestic-marketplace · ★ 39 · Testing & QA · score 64
Install: claude install-skill majesticlabs-dev/majestic-marketplace
# dbt-Coder Patterns for dbt (data build tool) transform layer development. ## Project Structure ``` my_dbt_project/ ├── dbt_project.yml ├── profiles.yml ├── models/ │ ├── staging/ # 1:1 with sources, light transforms │ │ ├── stg_orders.sql │ │ └── _staging.yml │ ├── intermediate/ # Joins, business logic │ │ └── int_orders_enriched.sql │ └── marts/ # Final consumption layer │ ├── finance/ │ │ └── fct_revenue.sql │ └── marketing/ │ └── dim_customers.sql ├── seeds/ # Static lookup data ├── snapshots/ # SCD Type 2 ├── macros/ # Reusable SQL └── tests/ # Custom tests ``` ## dbt_project.yml ```yaml name: 'my_project' version: '1.0.0' config-version: 2 profile: 'my_project' model-paths: ["models"] seed-paths: ["seeds"] test-paths: ["tests"] macro-paths: ["macros"] snapshot-paths: ["snapshots"] models: my_project: staging: +materialized: view +schema: staging intermediate: +materialized: ephemeral marts: +materialized: table +schema: marts ``` ## Staging Models ```sql -- models/staging/stg_orders.sql -- Naming: stg_<source>_<entity> with source as ( select * from {{ source('raw', 'orders') }} ), renamed as ( select -- Rename to consistent naming id as order_id, customer_id, order_date, total_amount as order_total, -- Type casting cast(stat