DATA OPS

PR-time Snowflake schema contract check on dbt model changes

When a pull request changes a dbt model, it compares the model's declared output columns against the live Snowflake table it will replace and blocks the merge with a GitHub check…

CategoryData Ops
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPull request opened or updatedGitHubGitHub
  • ActionParse proposed output columns from changed dbt modelsGitHubGitHub
  • ActionRead live table column shape from SnowflakeSnowflakeSnowflake
  • LogicClassify changes as additive, breaking, or approved
  • OutputPost pass/fail schema-contract check to the PRGitHubGitHub

What it does

It shifts drift detection left to code review. When a PR touches a dbt model, the workflow reads the model's intended output columns from the changed SQL and compares them to the column shape of the table currently in Snowflake. Breaking changes that aren't accompanied by a contract update get posted as a failing GitHub check with a line-by-line diff, so reviewers see the blast radius before merge.

When to use it

Use it on warehouse repos where analysts ship model changes directly. It stops accidental column removals and type narrowing from ever reaching production instead of catching them after deploy.

How it works

  1. 1A GitHub pull request event triggers the run.
  2. 2Read the changed dbt model files from the PR and derive the proposed output column set.
  3. 3Query Snowflake for the current production table's column shape.
  4. 4Diff proposed vs. live to classify each change as additive, breaking, or contract-approved.
  5. 5If breaking changes lack a contract update, post a failing GitHub check with the diff; otherwise post a passing check.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect SnowflakeWarehouses, queries, shares.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.