dbt-coder

Listed

dbt (data build tool) patterns for model organization, incremental strategies, and testing.

Testing & QA 33 stars 7 forks Updated 1 weeks ago NOASSERTION

Install

View on GitHub

Quality Score: 65/100

Stars 20%
51
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
0

Skill Content

# 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...

Details

Author
majesticlabs-dev
Repository
majesticlabs-dev/majestic-marketplace
Created
4 months ago
Last Updated
1 weeks ago
Language
Shell
License
NOASSERTION

Similar Skills

Semantically similar based on skill content — not just same category