Slim CI for dbt Projects on Snowflake, without an artifact store

dbt Projects on Snowflake can now reuse production run artifacts for Slim CI, deferral and failed-run recovery. How to set it up and what to migrate first.

Code for this article

cloudcentrix-labs/dbt-snowflake-slim-ci

A layered dbt project with Slim CI working end to end on DuckDB, and a GitHub Actions template for dbt Projects on Snowflake.

In CI. Builds and tests the project on DuckDB, then fails unless Slim CI rebuilds exactly the models a change affects.

1 post is written against it

Slim CI is the practice of building and testing only the dbt models a pull request changed, and reading everything else from production. It is the difference between a ten-minute check and a two-hour one. The catch has always been the artifacts: CI needs the manifest from the last production run, so teams end up maintaining a bucket and a few scripts just to move one JSON file around.

On 10 September 2026 Snowflake made this built in for dbt Projects on Snowflake. Artifacts from recent production runs can be reused directly, with no separate store.

What you get

  • Slim CI. Run only what changed, and its downstream models.
  • Defer to production. Unchanged upstream models resolve to the production relations, so CI does not rebuild them.
  • Recovery from failed runs. Re-run from the point of failure.
  • Concurrent executions of one deployed project, which is what makes per-pull-request runs practical.

The CI run

The CI role needs MONITOR on the production project so it can read that project's artifacts:

SQL
GRANT MONITOR ON DBT PROJECT <database>.<schema>.<production_project>
  TO ROLE <ci_role>;

The CI execution then points dbt at the imported state and selects modified models:

SQL
EXECUTE DBT PROJECT my_db.my_schema.my_dbt_project
  ARGS = 'run --defer --state ./imports/state --select state:modified+';

The state comes from the last successful production run, which Snowflake exposes through SYSTEM$DBT_GET_LAST_SUCCESSFUL_RUN_TARGET. The documentation shows the full statement, including how the import is wired in.

Recovering a failed run uses the same idea with a different selector:

SQL
  ARGS = 'build --state ./imports/state/target --select result:error+'

Running pull requests side by side

By default a run writes its results back to the project object, and two runs doing that at once can conflict. For concurrency, turn writeback off:

SQL
ALTER DBT PROJECT my_db.my_schema.my_dbt_project
  SET DEFAULT_WRITEBACK = FALSE;

Then give every run its own target and log paths, for example by pull request number:

SQL
  ARGS = 'run --target-path target/pr_123 --log-path logs/pr_123';

Paths must sit inside the project, and two concurrent runs must not share them.

Prerequisites that are easy to miss

  • A recent production run. The production project needs a qualifying execution in the last 14 days. A project that only runs monthly will not have reusable artifacts, so schedule it at least fortnightly.
  • A separate place for CI output. Use a dedicated database or schema so CI never writes into production.
  • The live-version model. Project objects must use a single mutable live version, which arrived with the 2026_06 behaviour change bundle. Existing versioned objects are migrated with SYSTEM$MIGRATE_DBT_PROJECT. Do this first, in a quiet week.
  • Runners other than GitHub must pass Git metadata explicitly.

Is it worth moving?

If your dbt project already runs on Snowflake and your CI rebuilds everything, yes. This is one of the cheaper wins available: a grant, two statements, and a decision about writeback. If your project still runs from an external orchestrator with its own artifact handling that works, the benefit is smaller, and the live-version migration is the real cost to weigh.

Either way, measure before and after. Pull request build time and CI warehouse credits are the two numbers that show whether it worked.

Further reading

More on Snowflake.

The only post on dbt-snowflake-slim-ci so far. These share its topic.

All 18 posts

Put this to work on your dbt project.

Merylene Schoeman wrote this post. Send us a few lines about your dbt project and how it is deployed today.

Talk to an engineerWe reply within one business day.

What happens next

  1. You send a few lines about the problem.
  2. One of us replies within one business day.
  3. You talk it through with the engineer who would do the work.
  4. You get a fixed scope, timeline and price before any work starts.

We sign an NDA before the first conversation if you want one.

Or write to info@cloudcentrix.co.za or call +27 82 445 4311.