DATA OPS

Block dbt merge requests that break a BigQuery source contract

On every dbt merge request, compare the columns each changed model selects against live BigQuery schemas and fail the MR check when a model references a column that no longer…

CategoryData Ops
Enginesim
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab merge-request webhookGitLabGitLab
  • ActionFetch MR diff and changed dbt modelsGitLabGitLab
  • ActionQuery live source columns from BigQueryGoogle BigQueryBigQuery
  • LogicFlag selected columns missing from live schema
  • OutputSet MR check status and post inline commentGitLabGitLab

What it does

Acts as a pre-merge guard. When a developer opens or updates a dbt merge request in GitLab, this checks every model touched in that MR against the real BigQuery source schema and blocks the merge if a model selects a column that has been dropped or renamed upstream, posting the exact offending lines back as an MR comment.

When to use it

Use it when broken column references slip through review and only surface as runtime errors in the warehouse. It moves the failure left to the merge request, so reviewers see the problem before approving instead of debugging a red production run.

How it works

  1. 1A GitLab merge-request webhook fires when an MR is opened or pushed.
  2. 2The workflow fetches the diff and collects the set of dbt models changed in the MR.
  3. 3For each model it resolves the upstream source tables and selected columns.
  4. 4It queries BigQuery `INFORMATION_SCHEMA` for the live columns of those source tables.
  5. 5A logic step flags any selected column missing from the live schema.
  6. 6If violations exist it posts a failing check and an inline comment on the GitLab MR; otherwise it passes the check green.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  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.