DATA OPS

BigQuery Schema-Drift Gate on dbt Pull Requests

On every pull request that touches a dbt model, compares the proposed BigQuery output schema against the live table and posts a pass/fail check plus a column-level diff comment.

CategoryData Ops
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitHub pull request touches a dbt modelGitHubGitHub
  • ActionDry-compile dbt to get proposed schemaShell
  • ActionFetch live table schema from BigQueryGoogle BigQueryBigQuery
  • LogicBranch: compatible passes, breaking continues
  • OutputPost PR diff comment and set failing checkGitHubGitHub

What it does

It turns schema drift into a code-review gate instead of a production surprise. When a pull request changes a dbt model, it runs a dry compile to get the model's projected output schema, fetches the current live table schema from BigQuery, and diffs them. Backward-compatible changes get an approving check; breaking changes (removed or retyped columns that downstream consumers depend on) post a blocking review comment with the exact offending columns.

When to use it

Use it when analysts ship dbt changes through GitHub PRs and you want contract enforcement at merge time rather than after deploy. It keeps the warehouse's public-facing tables stable for the BI tools and reverse-ETL jobs that read them.

How it works

  1. 1A GitHub pull_request event on the dbt repo triggers the run.
  2. 2Run the dbt dry-compile in a shell step to produce the proposed column schema.
  3. 3Fetch the live table schema from BigQuery for each changed model.
  4. 4Branch: compatible diff posts a passing check; breaking diff continues.
  5. 5Post a GitHub PR review comment listing the breaking column changes and set a failing status check.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Connect ShellRun sandboxed commands inside the workspace.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.