DATA OPS
BigQuery Scheduled-Query Failure Triage Agent
When a Datadog monitor fires on a BigQuery scheduled-query failure, an agent pulls the failing query's SQL and error, diagnoses the likely root cause.
How it runs
The automated pipeline, trigger to output.
- TriggerDatadog monitor webhook on failureDatadog
- ActionFetch failing query SQL and errorBigQuery
- LogicDiagnose root cause and route by severity
- ActionCreate pre-filled triage ticketLinear
- OutputLink ticket in SlackSlack
What it does
It turns a raw BigQuery failure alert into an actionable, pre-triaged ticket. An agent gathers the failing scheduled query's definition and error message, reasons about the likely cause (schema drift, missing partition, permissions, quota), and opens a Linear issue so an engineer starts from a diagnosis instead of a blank alert.
When to use it
Use it when scheduled-query failures need a tracked, assignable work item rather than just a ping, and when you want first-pass root-cause analysis done automatically. Good for teams that manage data-pipeline work in Linear.
How it works
- 1A Datadog monitor webhook fires when a scheduled-query failure is detected.
- 2A BigQuery action retrieves the failing query's SQL definition, last error, and recent run history.
- 3An agent step analyzes the error against the SQL to propose a root cause and a candidate fix.
- 4A logic step routes by severity and assigns the right owning team label.
- 5A Linear action creates a ticket with the diagnosis, SQL excerpt, error, and suggested fix.
- 6A Slack output links the new ticket into the data-eng channel.
Set it up
What you configure once, before turning it on.
- 1Connect DatadogMetrics, traces, log search.
- 2Connect BigQueryDatasets, queries, schemas.
- 3Connect LinearIssues, projects, cycles, triage.
- 4Connect SlackChannels, DMs, threads, mentions.
- 5Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 6Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 7Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More Data Ops workflows
Weekly BigQuery Cost Trend Sheet and Exec Digest
Compiles week-over-week BigQuery scheduled-query cost by owner and dataset into a Google Sheet with trend columns.
Daily BigQuery Scheduled-Query Cost Attribution to Owners
Each morning, totals the prior day's on-demand bytes-billed per scheduled query, maps each query to its owner from a label, and posts a per-owner cost leaderboard to Slack.
BigQuery Per-Team Budget Breach Alert to PagerDuty
Tracks month-to-date BigQuery scheduled-query spend per team and, when a team crosses its monthly budget, pages the team's on-call in PagerDuty and snapshots the spend breakdown…
dbt source freshness watcher with severity-routed alerts
Checks Snowflake loaded-at timestamps against each dbt source's freshness SLA, then routes warnings to Slack and hard breaches to a PagerDuty incident so stale data never…
dbt orphan model detector with Linear cleanup tickets
Scans your dbt manifest for models that no other model, exposure, or BI tool consumes.
Raw Sensor Telemetry Archive to BigQuery
Captures every incoming building sensor reading via webhook, normalizes the payload into a consistent schema.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
