DATA OPS

Snowflake Drift Detector that Blocks the dbt Pull Request on GitHub

When a pull request touches dbt models, it compares the models' source columns against the live Snowflake schema and posts a blocking check on the PR if the code references…

CategoryData Ops
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitHub pull request opened or updatedGitHubGitHub
  • ActionRead changed dbt models and extract referenced columnsGitHubGitHub
  • ActionQuery live source schema from SnowflakeSnowflakeSnowflake
  • LogicCompare referenced columns to live schema; pass or fail
  • OutputPost blocking check status on the GitHub PRGitHubGitHub

What it does

This sentinel runs at code-review time instead of runtime. When a dbt pull request opens, it parses the source columns the changed models depend on, queries Snowflake's `INFORMATION_SCHEMA` for the real current shape of those tables, and fails the PR check if the code assumes columns that upstream has dropped or retyped. Reviewers see the exact mismatch inline.

When to use it

Use it when your transformation code and your upstream warehouse evolve on different schedules and you want drift caught before merge, not in a 2 a.m. pager. Ideal for teams enforcing a data-contract gate in CI.

How it works

  1. 1A GitHub pull-request opened/synchronized event triggers the flow.
  2. 2Read the changed dbt model files from the PR to extract referenced source tables and columns.
  3. 3Query Snowflake `INFORMATION_SCHEMA.COLUMNS` for the live shape of those source tables.
  4. 4Branch: every referenced column exists with a compatible type -> pass; otherwise -> fail.
  5. 5Post a commit status / check back to the GitHub PR (success or blocking failure with the mismatch list).

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.