- Home
- Skills
- Sfc Gh Dflippo
- Snowflake Dbt Demo
- Dbt Architecture
dbt-architecture_skill
- Python
26
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill sfc-gh-dflippo/snowflake-dbt-demo --skill dbt-architecture- SKILL.md12.0 KB
Overview
This skill helps design production-grade dbt projects using the medallion (bronze/silver/gold) architecture. It focuses on folder structure, naming conventions, layer-based configuration, and enforcing model dependency patterns. Use it to standardize projects for maintainability, testability, and clear data flow.
How this skill works
The skill inspects the transformation intent and places models into three layers: bronze (staging), silver (intermediate), and gold (marts). It recommends materializations, naming prefixes (stg_, int_, dim_, fct_), folder-level dbt_project.yml settings, and tag inheritance to enforce consistent behavior. It also validates rules like no direct joins to sources and one-to-one staging models.
When to use it
- Planning or re-organizing a dbt project structure
- Designing staging, intermediate, and mart models
- Defining naming conventions for models and columns
- Configuring folder-level settings in dbt_project.yml
- Ensuring proper model dependencies and layer separation
Best practices
- Staging (bronze): one source table → one stg_ model; use ephemeral materialization for lightweight cleaning
- Intermediate (silver): encapsulate business logic in int_ models; prefer ephemeral for reusable CTEs or table for heavy computations
- Marts (gold): create dim_ and fct_ models as table or incremental; fully test and document these models
- Use ref() and source() consistently; never hard-code table names or join directly to sources from higher layers
- Set default materializations, tags, and schemas at folder level in dbt_project.yml and only override for exceptions
Example use cases
- Converting raw source tables into standardized staging models with stg_{source}__{table} naming
- Building reusable customer metrics in an int_customers__with_orders model for downstream marts
- Creating dim_customers and fct_orders models optimized for BI consumption (table or incremental)
- Applying tag inheritance to run or test entire layers (e.g., dbt run --select tag:gold)
- Configuring clustering and unique_key for large fact tables in the gold layer
FAQ
Bronze/staging. Use stg_{source}__{table} naming and materialize as ephemeral for light cleaning and standardization.
Can silver models reference sources directly?
No. Silver models should reference staging or other intermediate models via ref() to preserve clear layering and reusability.