9 min readIntermediate§ Snowflake

dbt Projects on Snowflake: Running dbt Inside Snowflake

How dbt Projects on Snowflake works: deploying a DBT PROJECT object, EXECUTE DBT PROJECT, scheduling with tasks, Slim CI with IMPORTS, roles and limits.

By Dinesh ChandraSenior Data and AI Engineer · SnowPro certified
Illustrated overview of dbt Projects on Snowflake: Running dbt Inside Snowflake
Fig. 1 · Snowflake
  1. 1.dbt Projects on Snowflake is generally available. Your dbt project becomes a schema-level DBT PROJECT object that Snowflake runs with EXECUTE DBT PROJECT.
  2. 2.Deploy through CI with snow dbt deploy; use Workspaces and Git stages for development, not as a shortcut to production.
  3. 3.Every run involves two roles: the calling role needs USAGE on the project object, and the profile role decides what dbt can touch.
  4. 4.Schedule with user-managed tasks in the same schema as the project object. Serverless tasks are not supported.
  5. 5.Pin DBT_VERSION per object. Snowflake runs dbt Core 1.x and the Rust-based dbt 2.x engine, and decommissions versions only on its own lifecycle.
Table of contents

Running dbt in production usually means running something next to your warehouse: a container with dbt installed, an orchestrator to call it, a secrets store for credentials, and somewhere to keep the logs and manifest.json. That is a lot of infrastructure for a tool whose real work happens inside Snowflake anyway.

dbt Projects on Snowflake removes most of that. Your project becomes a Snowflake object. You deploy it with a CLI command or SQL, run it with EXECUTE DBT PROJECT, schedule it with Snowflake tasks, and read run history, logs and artifacts in Snowsight. Snowflake made it generally available on November 6, 2025, and in September 2026 made Slim CI, defer to production, failed-run recovery and concurrent execution generally available too.

This post walks through a production setup end to end and the limits you should know before you move a project.

The problem

A self-hosted dbt deployment has many moving parts that are not dbt. You build and patch an image. You store a Snowflake key or password for a service user somewhere outside Snowflake. You wire the orchestrator to run dbt build, upload artifacts after each run, and download them again for CI. Each piece is reasonable alone; together they are a platform that someone has to own.

The common wrong approach

The common mistake when adopting dbt Projects on Snowflake is to use its convenience features as the production path. You edit in a Workspace, click Redeploy, and production changes. Or you point the production object at a Git repository stage and run ALTER DBT PROJECT ... DEPLOY after every merge by hand.

Snowflake’s own documentation warns against this. Deploying directly from a Git stage or a Workspace bypasses pull request review and CI tests, so broken models reach production undetected. Those paths are for development and testing objects. Production should be deployed by a CI/CD pipeline.

The approach that works

flowchart LR
  ws["Workspace or local IDE"] --> pr["Pull request"]
  pr --> ci["CI: snow dbt deploy test object"]
  ci --> merge["Merge to main"]
  merge --> prod["snow dbt deploy prod object"]
  prod --> task["Task runs EXECUTE DBT PROJECT"]

Develop anywhere, deploy production only from CI, schedule with tasks.

Step 1: Write a Snowflake-side profile

Each project needs a dbt_projects_profiles.yml or profiles.yml that names the warehouse, database, schema and role, with type: snowflake. If both files exist, Snowflake uses dbt_projects_profiles.yml. Standard dbt ignores that file name, so your team’s local ~/.dbt/profiles.yml keeps working unchanged.

# dbt_projects_profiles.yml
analytics:
  target: prod
  outputs:
    prod:
      type: snowflake
      account: ''
      user: ''
      role: transformer
      warehouse: transform_wh
      database: analytics
      schema: marts
      threads: 8

The account and user can be empty because the project runs under the current account and user context. There is no password to store. Snowflake’s best practices suggest eight threads as a setting that suits most warehouses.

Step 2: Allow package downloads

If packages.yml pulls from the dbt package hub or GitHub, Snowflake needs an external access integration. An administrator creates it once:

CREATE OR REPLACE NETWORK RULE dbt_network_rule
  MODE = EGRESS
  TYPE = HOST_PORT
  VALUE_LIST = ('hub.getdbt.com', 'codeload.github.com');

CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION dbt_ext_access
  ALLOWED_NETWORK_RULES = (dbt_network_rule)
  ENABLED = TRUE;

GRANT USAGE ON INTEGRATION dbt_ext_access TO ROLE transformer;

The alternative is to run dbt deps in your CI pipeline and deploy the project with dbt_packages included, which needs no integration at all.

Step 3: Deploy from CI with the Snowflake CLI

Snowflake recommends snow dbt deploy in a CI/CD pipeline. It uploads the project and creates the object, or replaces the live version of an existing one, in a single operation:

snow dbt deploy analytics_dbt \
  --source . \
  --default-target prod \
  --dbt-version 1.12.3 \
  --external-access-integration dbt_ext_access

The SQL equivalent, useful for a development object built from a Git repository stage, looks like this:

CREATE DBT PROJECT analytics.dbt.analytics_dbt
  FROM '@analytics.integrations.dbt_repo/branches/main'
  DBT_VERSION = '1.12.3'
  DEFAULT_TARGET = 'prod'
  EXTERNAL_ACCESS_INTEGRATIONS = (dbt_ext_access)
  COMMENT = 'Analytics marts';

To update an existing object, use ALTER DBT PROJECT ... DEPLOY FROM. Avoid CREATE OR REPLACE, and avoid --force on the CLI, which runs it: both may remove the object’s run history.

Step 4: Run it

EXECUTE DBT PROJECT takes the dbt command and flags as a string:

EXECUTE DBT PROJECT analytics.dbt.analytics_dbt
  ARGS = 'build --select marts+ --target prod';

If you pass flags without a command, dbt runs run. The result includes a success flag, any exception, the dbt stdout, and an archive URL holding the logs and target/ artifacts. Supported commands include build, run, test, seed, snapshot, compile, deps, retry, run-operation, show, list, source freshness and docs generate. The flags --profiles-dir, --project-dir, --log-format and --log-format-file are not supported.

Step 5: Schedule with tasks

A task that runs a dbt project must use a user-managed warehouse and live in the same database and schema as the project object:

CREATE OR ALTER TASK analytics.dbt.run_analytics_dbt
  WAREHOUSE = transform_wh
  SCHEDULE = 'USING CRON 0 5 * * * UTC'
AS
  EXECUTE DBT PROJECT analytics.dbt.analytics_dbt
    ARGS = 'build --target prod';

Use the same warehouse in the task as in the profile. Otherwise one run wakes two warehouses and you pay for both. For multi-step pipelines, chain tasks with AFTER, the same way you would in a streams and tasks pipeline. Remember to ALTER TASK ... RESUME after creating it.

Step 6: Slim CI with imported state

Instead of uploading manifest.json to external storage, a CI object can import the artifacts of the last successful production run directly:

EXECUTE DBT PROJECT ci_db.dbt.pr_check
  ARGS = 'build --state ./imports/state --defer --select state:modified+'
  IMPORTS = (
    SYSTEM$DBT_GET_LAST_SUCCESSFUL_RUN_TARGET('analytics.dbt.analytics_dbt')
      AS 'state'
  );

The role running this needs MONITOR on the production object, and that object needs a successful run in the previous 14 days. The selection logic is the same as in Slim CI with state and defer; only the artifact plumbing moves into Snowflake.

Step 7: Recover a failed run

To rerun only what failed, and everything downstream of it, import the artifacts of the most recent failed execution:

EXECUTE DBT PROJECT analytics.dbt.analytics_dbt
  ARGS = 'build --state ./imports/state --select result:error+'
  IMPORTS = (
    SYSTEM$DBT_GET_LAST_FAILED_RUN_TARGET('analytics.dbt.analytics_dbt')
      AS 'state'
  );

Edge cases and changes

Two roles on every run. The calling role, which is your session role or the task owner, needs USAGE on the project object. The profile role decides what dbt can read and write. Operations are limited to what both allow, and both need USAGE on the warehouse. Snowflake also notes that output tables do not automatically become readable by the role that ran the pipeline; analysts need explicit grants. The RBAC design guide covers how to structure those roles.

Versions. Snowflake’s supported list includes dbt Core 1.9.4, 1.10.15, 1.11.11 and 1.12.3, and dbt 2.0.0 plus earlier 2.0.0 preview builds. Any DBT_VERSION of 2.0 or higher runs the Rust engine. If you set no version and the account has no DEFAULT_DBT_VERSION, the default is 1.9.4, so pin a version. dbt Labs end-of-life dates do not stop pinned objects from running; Snowflake promises at least three months’ notice before decommissioning a version.

Concurrent runs. Two executions of the same object can collide when both write artifacts back to the live version. Use WRITEBACK = FALSE for runs that do not need to update it.

Stored procedures. Call EXECUTE DBT PROJECT from a caller’s rights procedure. The same applies to deployment when AUTO_COMPILE = TRUE, which is the default.

Trade-offs

What you gain is less infrastructure. There is no dbt image to patch, no credential stored outside Snowflake, no artifact bucket, and run history sits beside query history. Snowflake states there are no extra licensing or per-user fees; you pay for the warehouse time.

What you give up is some flexibility. You cannot use serverless tasks. A deployed project folder can contain at most 100,000 files, including target, dbt_packages and logs. Workspace output is shown only when a command finishes, and the DAG view shows up to 300 models at a time. dbt platform (dbt Cloud) projects are not supported, only dbt Core and dbt Fusion projects. If you orchestrate many systems beyond Snowflake, Airflow can still call EXECUTE DBT PROJECT, so you are not forced onto tasks.

Pitfalls

  • Unpinned version. New objects may default to 1.9.4. Set DBT_VERSION or the account’s DEFAULT_DBT_VERSION.
  • Different warehouses in task and profile. Two warehouses bill per run. Use the same one in both.
  • Deploying prod from a Workspace. No review or tests run. Deploy production only from CI.
  • CREATE OR REPLACE on updates. Run history may be lost. Use ALTER DBT PROJECT ... DEPLOY.
  • Missing external access. dbt deps fails with a network error. Attach an integration or vendor dbt_packages in CI.

FAQ

Is dbt Projects on Snowflake generally available?

Yes. Snowflake announced general availability on November 6, 2025, after a preview that began in June 2025. Slim CI, defer to production, failed-run recovery and concurrent execution became generally available on September 10, 2026.

Does it replace the dbt platform?

It covers running and scheduling dbt Core or dbt v2 projects inside Snowflake. The documentation states that dbt platform projects are not supported, so features specific to the hosted dbt platform do not carry over. Compare the two the way you would in dbt Core vs dbt Cloud.

Can I develop locally and still run in Snowflake?

Yes. Snowflake supports local IDEs with the Snowflake CLI, browser Workspaces, and Cortex Code Desktop. Keep your personal profiles.yml for local runs and a dbt_projects_profiles.yml in the repository for Snowflake.

How do I see logs and artifacts?

Each execution returns an archive URL with logs and target/ artifacts, and Snowsight shows run history and the DAG. Detailed logs and traces require setting LOG_LEVEL and TRACE_LEVEL on the project object.

What does it cost?

You pay for warehouse compute. The warehouse of the calling session and the warehouse in the profile are each billed while active, which is why matching them matters. The usual levers apply: right-size the warehouse and keep auto-suspend short.

What this means for your pipelines

If your dbt project only transforms data inside Snowflake, the external runtime around it is overhead. dbt Projects on Snowflake lets you remove the container, the stored credential and the artifact bucket while keeping your project unchanged.

Keep the engineering discipline that made the external setup safe. Deploy production from CI with snow dbt deploy, pin the dbt version on every object, use one warehouse per run, and give tasks a dedicated owner role. Then use IMPORTS for Slim CI and failure recovery, which is the part that used to need the most glue.

Sources: dbt Projects on Snowflake, GA release note, Slim CI and defer GA release note, CREATE DBT PROJECT, EXECUTE DBT PROJECT, Deploy dbt project objects, Schedule execution, Supported dbt versions, Limitations, Access control, Best practices.

Free toolSnowflake cost calculatorEstimate your monthly bill with editable prices.
Share this post:X / TwitterLinkedInRedditWhatsApp
D

Dinesh Chandra

Senior Data & AI Engineer · SnowPro Core & Gen AI Certified

4+ years building production data platforms on Snowflake, Databricks, AWS, and Azure. I write from hands-on experience with Medallion architectures, dbt, Airflow, PySpark, and Snowflake Cortex AI. Every tutorial on this blog reflects real pipeline decisions, not documentation rewrites.

Read more about the author →
RE

Related entries

§ SnowflakeIntermediate
Illustrated overview of Snowflake Budgets and Cost Anomalies: Catch Spend Early

· 9 min

Snowflake Budgets and Cost Anomalies: Catch Spend Early

Set up Snowflake account and custom budgets, tag-based limits, threshold actions and cost anomaly alerts so a runaway pipeline shows up in days, not invoices.

  • #snowflake
  • #cost
  • #finops
§ SnowflakeIntermediate
Illustrated overview of Snowflake Semantic Views: Metrics as Database Objects

· 9 min

Snowflake Semantic Views: Metrics as Database Objects

Define metrics once in a Snowflake semantic view, query them with plain SQL or Cortex Analyst, and add materializations without forking definitions.

  • #snowflake
  • #semantic-layer
  • #sql

Search DataLane

↑↓ navigatealt ↑↓ jump group↵ openesc close