Snowflake-Native dbt Projects
Mandatory Rules
Before writing AI function SQL, read ../../sql/references/sql-authoring-rules.md.
Deploy and run dbt Core projects directly inside Snowflake using the snow CLI and EXECUTE DBT PROJECT SQL. Also covers authoring dbt models with Snowflake-specific materializations like semantic_view.
SCOPE: This skill covers dbt projects deployed as Snowflake objects — created via snow dbt deploy, executed via snow dbt execute or EXECUTE DBT PROJECT SQL, and managed via ALTER/DESCRIBE/DROP/SHOW DBT PROJECT SQL. It also covers authoring dbt models that use Snowflake-specific materializations (e.g., semantic_view via the dbt_semantic_view package).
DO NOT use this skill when:
- The user is running dbt locally against Snowflake (standard
dbt run, dbt build, dbt test, dbt seed)
- The user is editing dbt models, fixing SQL bugs, writing macros, or doing dbt development work
- The user has a local
profiles.yml with password/authenticator fields (this is normal for local dbt)
- The user is configuring
dbt_project.yml, packages.yml, or project structure
- The user mentions
dbt init, dbt debug, dbt deps, dbt clean, dbt compile, dbt snapshot, dbt retry, dbt ls
- The user asks about CI/CD, GitHub Actions, source freshness, or dbt documentation
- There is NO mention of
snow dbt, a deployed project, a project in a Snowflake schema, EXECUTE DBT PROJECT, or Snowflake-specific materializations (semantic_view)
If the user's request matches the above, do NOT load any sub-skills — just answer using standard dbt knowledge.
WHY THIS SKILL EXISTS: Snowflake's native dbt integration uses unique syntax (snow dbt, EXECUTE DBT PROJECT) that differs from standard dbt CLI. This skill provides the correct syntax for that specific workflow, plus guidance on Snowflake-specific dbt materializations like semantic_view.
Semantic views: For creating semantic views as part of a dbt project, this skill provides the dbt_semantic_view package workflow (see SEMANTIC VIEW intent below). For ongoing optimization of existing semantic views (auditing, VQR mining, Cortex Analyst tuning), use the semantic-view skill instead.
If the request involves writing dbt model SQL with AI or Cortex functions, read ../../sql/references/sql-authoring-rules.md before generating any SQL.
Intent Detection
Only match these intents when the user is explicitly working with Snowflake-native dbt (deployed projects, snow dbt, EXECUTE DBT PROJECT). Do NOT match for standard local dbt CLI work.
| Intent |
Triggers |
Action |
| DEPLOY |
"snow dbt deploy", "deploy dbt project to snowflake", "create dbt project in snowflake", "upload dbt", "external access integration" |
Load deploy/SKILL.md |
| EXECUTE |
"snow dbt execute", "EXECUTE DBT PROJECT", "run deployed project", "execute deployed project", "snow dbt show", "run the deployed", "run in deployed", "execute in deployed", "docs generate", "generate documentation", "documentation", "data catalog", "catalog", "lineage" |
⚠️ You MUST read execute/SKILL.md - it has CRITICAL syntax for docs generate |
| MANAGE |
"snow dbt list", "list dbt projects", "show dbt projects", "describe dbt project", "drop dbt project", "rename dbt project", "SHOW DBT PROJECTS", "ALTER DBT PROJECT", "add version", "VERSION$", "set comment", "set default target", "download project files", "get model SQL from deployed", "inspect deployed project", "access project files", "list files in project" |
Load manage/SKILL.md |
| SCHEDULE |
"schedule dbt project", "CREATE TASK for dbt", "EXECUTE DBT PROJECT in task", "automate dbt runs", "Snowflake task for dbt" |
Load schedule/SKILL.md |
| MONITOR |
"dbt execution logs", "dbt artifacts", "dbt archive", "dbt execution history", "download artifacts" |
Load monitoring/SKILL.md |
| MIGRATE |
"migrate", "env_var", "environment variable", "env.yml", "env yml", "migration", "prepare for snowflake" |
⚠️ You MUST Read migrate/SKILL.md before taking any action. Migration has complex, non-obvious requirements that will cause failures if skipped. Do NOT attempt migration from general knowledge. |
| SEMANTIC VIEW |
"semantic view", "create semantic view", "dbt_semantic_view", "cortex analyst semantic", "semantic_view materialization" |
Load references/semantic-views.md |
⚠️ Critical: Incremental Model Fixes Require --full-refresh
After fixing an incremental model's logic (e.g., restoring a missing is_incremental() guard, changing the unique key, or altering the incremental strategy), you MUST execute with --full-refresh. Without it, the existing table still contains data built by the broken logic — a normal incremental run only processes new rows and won't fix the bad data.
Quick Reference
# Deploy (add --external-access-integration if project needs external network access)
snow dbt deploy my_project --source /path/to/dbt --database my_db --schema my_schema --external-access-integration MY_EAI
# Deploy with default environment
snow dbt deploy my_project --source /path/to/dbt --database my_db --schema my_schema --default-env prod
# PREVIEW model output (does NOT create objects)
snow dbt execute -c default --database my_db --schema my_schema my_project show --select model_name
# Execute/RUN models (creates tables/views)
snow dbt execute -c default --database my_db --schema my_schema my_project run
# Execute with a specific environment
snow dbt execute --env prod my_project run
# Execute with variable overrides (all keys in one JSON object)
snow dbt execute --env-vars '{"DBT_KEY": "value", "DBT_KEY_2": "value2"}' my_project run
# Full refresh (REQUIRED after fixing incremental model logic)
snow dbt execute -c default --database my_db --schema my_schema my_project run --full-refresh
# Execute specific models with dependencies
# Upstream deps of target:
snow dbt execute -c default --database my_db --schema my_schema my_project run --select +target_model
# Downstream deps of target:
snow dbt execute -c default --database my_db --schema my_schema my_project run --select target_model+
# Both sides:
snow dbt execute -c default --database my_db --schema my_schema my_project run --select +target_model+
# List (omit --database to use connection default)
snow dbt list --in schema my_schema --database my_db
# Schedule (via SQL - always use EXECUTE DBT PROJECT)
CREATE TASK my_db.my_schema.run_dbt_daily
WAREHOUSE = my_wh
SCHEDULE = 'USING CRON 0 6 * * * UTC'
AS
EXECUTE DBT PROJECT my_db.my_schema.my_project
ARGS = 'run'
ENVIRONMENT = 'prod';
Workflow
User Request
↓
Intent Detection
↓
├─→ DEPLOY → Load deploy/SKILL.md
├─→ EXECUTE → Load execute/SKILL.md
├─→ MANAGE → Load manage/SKILL.md
├─→ SCHEDULE → Load schedule/SKILL.md
├─→ MONITOR → Load monitoring/SKILL.md
├─→ MIGRATE → ⚠️ MUST Read migrate/SKILL.md first (complex requirements) → Then follow its steps exactly
└─→ SEMANTIC VIEW → Load references/semantic-views.md
Stopping Points
- ⚠️ Before any destructive operation (DROP, RENAME)
Output
- Deployed dbt projects in Snowflake
- Materialized tables/views/semantic views from dbt models
- Test results from dbt test
- Scheduled TASK objects for automated execution
- Execution logs and artifacts for debugging
1---2name: dbt-projects-on-snowflake3description: "ONLY for dbt projects deployed INTO Snowflake as native objects via the `snow dbt` CLI, OR for authoring dbt models using Snowflake-native features (e.g., semantic_view materialization via dbt_semantic_view package). NOT for normal dbt development. Invoke ONLY when the user explicitly mentions: `snow dbt` commands (deploy, execute, list), `EXECUTE DBT PROJECT` SQL, a deployed dbt project object (e.g., DB.SCHEMA.MY_PROJECT), `ALTER/DROP/DESCRIBE/SHOW DBT PROJECT` SQL, scheduling a deployed dbt project with CREATE TASK, generating documentation/catalog/lineage for a deployed project, OR authoring Snowflake-specific dbt materializations (semantic_view, dbt_semantic_view), OR adding a semantic view to an existing dbt project. Do NOT invoke for standard dbt workflows: dbt run, dbt build, dbt test, dbt seed, dbt init, dbt compile, dbt debug, dbt snapshot, dbt deps, dbt clean, dbt retry, dbt ls, profiles.yml, dbt_project.yml, model editing, source freshness, Jinja/macro development, CI/CD pipelines, or any dbt command run from a terminal. The key distinction: this skill is about dbt-as-a-Snowflake-object (snow dbt deploy), not dbt-as-a-CLI-tool (dbt run). Triggers: snow dbt, snow dbt deploy, snow dbt execute, snow dbt list, EXECUTE DBT PROJECT, deployed dbt project, ALTER DBT PROJECT, DROP DBT PROJECT, DESCRIBE DBT PROJECT, SHOW DBT PROJECTS, VERSION$, external-access-integration, dbt project object, migrate, prepare for snowflake, docs generate deployed, documentation deployed project, data catalog deployed, lineage deployed project, generate documentation for deployed, semantic_view materialization, dbt_semantic_view, semantic view in dbt project, add semantic view to dbt, dbt project semantic view, analytical access dbt project."4metadata:5 source: https://skillmd.com/skills/s-14-h/dbt-projects-on-snowflake6---78# Snowflake-Native dbt Projects910## Mandatory Rules1112**Before writing AI function SQL, read `../../sql/references/sql-authoring-rules.md`.**1314Deploy and run dbt Core projects directly **inside Snowflake** using the `snow` CLI and `EXECUTE DBT PROJECT` SQL. Also covers authoring dbt models with Snowflake-specific materializations like `semantic_view`.1516**SCOPE:** This skill covers dbt projects deployed as Snowflake objects — created via `snow dbt deploy`, executed via `snow dbt execute` or `EXECUTE DBT PROJECT` SQL, and managed via `ALTER/DESCRIBE/DROP/SHOW DBT PROJECT` SQL. It also covers authoring dbt models that use Snowflake-specific materializations (e.g., `semantic_view` via the `dbt_semantic_view` package).1718**DO NOT use this skill when:**19- The user is running dbt locally against Snowflake (standard `dbt run`, `dbt build`, `dbt test`, `dbt seed`)20- The user is editing dbt models, fixing SQL bugs, writing macros, or doing dbt development work21- The user has a local `profiles.yml` with password/authenticator fields (this is normal for local dbt)22- The user is configuring `dbt_project.yml`, `packages.yml`, or project structure23- The user mentions `dbt init`, `dbt debug`, `dbt deps`, `dbt clean`, `dbt compile`, `dbt snapshot`, `dbt retry`, `dbt ls`24- The user asks about CI/CD, GitHub Actions, source freshness, or dbt documentation25- There is NO mention of `snow dbt`, a deployed project, a project in a Snowflake schema, `EXECUTE DBT PROJECT`, or Snowflake-specific materializations (`semantic_view`)2627If the user's request matches the above, do NOT load any sub-skills — just answer using standard dbt knowledge.2829**WHY THIS SKILL EXISTS:** Snowflake's native dbt integration uses unique syntax (`snow dbt`, `EXECUTE DBT PROJECT`) that differs from standard dbt CLI. This skill provides the correct syntax for that specific workflow, plus guidance on Snowflake-specific dbt materializations like `semantic_view`.3031> **Semantic views:** For creating semantic views as part of a dbt project, this skill provides the `dbt_semantic_view` package workflow (see SEMANTIC VIEW intent below). For ongoing optimization of existing semantic views (auditing, VQR mining, Cortex Analyst tuning), use the `semantic-view` skill instead.3233---3435If the request involves writing dbt model SQL with AI or Cortex functions, read `../../sql/references/sql-authoring-rules.md` before generating any SQL.3637## Intent Detection3839**Only match these intents when the user is explicitly working with Snowflake-native dbt (deployed projects, `snow dbt`, `EXECUTE DBT PROJECT`).** Do NOT match for standard local dbt CLI work.4041| Intent | Triggers | Action |42|--------|----------|--------|43| **DEPLOY** | "snow dbt deploy", "deploy dbt project to snowflake", "create dbt project in snowflake", "upload dbt", "external access integration" | Load `deploy/SKILL.md` |44| **EXECUTE** | "snow dbt execute", "EXECUTE DBT PROJECT", "run deployed project", "execute deployed project", "snow dbt show", "run the deployed", "run in deployed", "execute in deployed", "docs generate", "generate documentation", "documentation", "data catalog", "catalog", "lineage" | **⚠️ You MUST read `execute/SKILL.md`** - it has CRITICAL syntax for docs generate |45| **MANAGE** | "snow dbt list", "list dbt projects", "show dbt projects", "describe dbt project", "drop dbt project", "rename dbt project", "SHOW DBT PROJECTS", "ALTER DBT PROJECT", "add version", "VERSION$", "set comment", "set default target", "download project files", "get model SQL from deployed", "inspect deployed project", "access project files", "list files in project" | Load `manage/SKILL.md` |46| **SCHEDULE** | "schedule dbt project", "CREATE TASK for dbt", "EXECUTE DBT PROJECT in task", "automate dbt runs", "Snowflake task for dbt" | Load `schedule/SKILL.md` |47| **MONITOR** | "dbt execution logs", "dbt artifacts", "dbt archive", "dbt execution history", "download artifacts" | Load `monitoring/SKILL.md` |48| **MIGRATE** | "migrate", "env_var", "environment variable", "env.yml", "env yml", "migration", "prepare for snowflake" | ⚠️ **You MUST `Read` `migrate/SKILL.md` before taking any action.** Migration has complex, non-obvious requirements that will cause failures if skipped. Do NOT attempt migration from general knowledge. |49| **SEMANTIC VIEW** | "semantic view", "create semantic view", "dbt_semantic_view", "cortex analyst semantic", "semantic_view materialization" | Load `references/semantic-views.md` |5051## ⚠️ Critical: Incremental Model Fixes Require `--full-refresh`5253After fixing an incremental model's logic (e.g., restoring a missing `is_incremental()` guard, changing the unique key, or altering the incremental strategy), you **MUST** execute with `--full-refresh`. Without it, the existing table still contains data built by the broken logic — a normal incremental run only processes new rows and won't fix the bad data.5455## Quick Reference5657```bash58# Deploy (add --external-access-integration if project needs external network access)59snow dbt deploy my_project --source /path/to/dbt --database my_db --schema my_schema --external-access-integration MY_EAI6061# Deploy with default environment62snow dbt deploy my_project --source /path/to/dbt --database my_db --schema my_schema --default-env prod6364# PREVIEW model output (does NOT create objects)65snow dbt execute -c default --database my_db --schema my_schema my_project show --select model_name6667# Execute/RUN models (creates tables/views)68snow dbt execute -c default --database my_db --schema my_schema my_project run6970# Execute with a specific environment71snow dbt execute --env prod my_project run7273# Execute with variable overrides (all keys in one JSON object)74snow dbt execute --env-vars '{"DBT_KEY": "value", "DBT_KEY_2": "value2"}' my_project run7576# Full refresh (REQUIRED after fixing incremental model logic)77snow dbt execute -c default --database my_db --schema my_schema my_project run --full-refresh7879# Execute specific models with dependencies80# Upstream deps of target:81snow dbt execute -c default --database my_db --schema my_schema my_project run --select +target_model82# Downstream deps of target:83snow dbt execute -c default --database my_db --schema my_schema my_project run --select target_model+84# Both sides:85snow dbt execute -c default --database my_db --schema my_schema my_project run --select +target_model+8687# List (omit --database to use connection default)88snow dbt list --in schema my_schema --database my_db8990# Schedule (via SQL - always use EXECUTE DBT PROJECT)91CREATE TASK my_db.my_schema.run_dbt_daily92 WAREHOUSE = my_wh93 SCHEDULE = 'USING CRON 0 6 * * * UTC'94AS95EXECUTE DBT PROJECT my_db.my_schema.my_project96 ARGS = 'run'97 ENVIRONMENT = 'prod';98```99100## Workflow101102```103User Request104 ↓105Intent Detection106 ↓107├─→ DEPLOY → Load deploy/SKILL.md108├─→ EXECUTE → Load execute/SKILL.md109├─→ MANAGE → Load manage/SKILL.md110├─→ SCHEDULE → Load schedule/SKILL.md111├─→ MONITOR → Load monitoring/SKILL.md112├─→ MIGRATE → ⚠️ MUST Read migrate/SKILL.md first (complex requirements) → Then follow its steps exactly113└─→ SEMANTIC VIEW → Load references/semantic-views.md114```115116## Stopping Points117118- ⚠️ Before any destructive operation (DROP, RENAME)119120## Output121122- Deployed dbt projects in Snowflake123- Materialized tables/views/semantic views from dbt models124- Test results from dbt test125- Scheduled TASK objects for automated execution126- Execution logs and artifacts for debugging