Back to Blog

The Agent-Written Data Pipeline: The Review Bottleneck Nobody Priced In

Prateek SinghJuly 25, 202610 min read
The Agent-Written Data Pipeline: The Review Bottleneck Nobody Priced In

AI agents can now write dbt models, SQL transforms, and backfills that pass CI and ship. The catch: a wrong number doesn't crash, it quietly poisons every dashboard downstream. The hard part moved from authoring to verification.

On a Tuesday in May, an agent opened a clean pull request. It refactored a dbt staging model, "enriched" the orders fact table by joining in a promotions source, added two tests, regenerated the docs, and updated the lineage graph. CI went green. The diff was readable. A human skimmed it, nodded, and merged. Total elapsed time from prompt to production: under an hour.

Three weeks later, finance flagged that reported Q2 net revenue was running about 4% hot. No alert had fired. No job had failed. Freshness was green, row counts looked normal, every test still passed. The cause, once someone finally bisected the lineage by hand, was almost embarrassing: the promotions table has multiple rows per order — one per promo code — so the agent's tidy left join fanned out the grain, and sum(order_total) quietly counted some orders twice. The pipeline didn't break. It lied, fluently, for twenty-one days.

The agents are genuinely good at this now

Let's get the easy part out of the way: this is no longer a demo. The agents can really write pipelines, and the data platforms have leaned all the way in.

dbt Labs rebuilt its core around AI. The Rust-based Fusion engine ships native SQL comprehension and roughly 30x faster parsing, which exists largely so an LLM can get rich, real-time metadata about your project. On top of it, the Developer Agent (preview, May 6, 2026) is pitched as the next evolution of dbt Copilot: describe a change in natural language and it builds, refactors, tests, and documents models — grounded in lineage, the Semantic Layer, and governance, with every change auditable. Copilot even added bring-your-own-key for Anthropic.

The warehouses matched it. Databricks launched Genie Code on March 11, 2026 — an autonomous agent that builds pipelines, debugs production failures, and stands up dashboards from inside notebooks, the SQL editor, and the Lakeflow Pipelines editor; Databricks reported its text-to-SQL accuracy jumping from 32% to over 90% on an internal benchmark. Snowflake's Cortex Code, already used by more than half its customers, now positions one governed agent across Snowflake, dbt, Airflow, AWS Glue, and Postgres, and as of an April 13 release its Cortex Agents generate SQL directly instead of delegating it.

And the general-purpose agents are wiring straight into the data plane. Google's Jules added MCP connectors on February 2 — and tellingly, the launch set was data infrastructure: Neon, Tinybird, Supabase, Linear, Context7. With the Neon connector, Jules spins up an isolated database branch per feature, applies schema migrations, and opens a PR without ever touching production. Pair that with Devin 2.2, Claude Code, and OpenAI's Codex on GPT-5.5, and the agent isn't suggesting SQL in your editor anymore. It has hands on the warehouse.

The bottleneck didn't vanish — it moved

Here's the part the launch keynotes skip. Authoring a transform was never the costly step in data engineering. Ask anyone who has shipped a production pipeline where the time actually goes: it's not typing the SELECT. It's confirming the join grain is right, that the metric matches the definition finance uses, that a backfill won't double-count, that nothing downstream silently depends on the column you just renamed. The work is verification, not composition.

So when an agent makes composition nearly free, it doesn't remove the bottleneck — it relocates it, entirely, onto review. And it makes that review harder, because now you're auditing code you didn't write, reasoning you can't fully see, against assumptions the agent inferred rather than asked about. The PR volume goes up. The context behind each PR goes down. That is a worse trade than it looks.

A crashing pipeline tells you it's broken. A wrong pipeline tells you nothing — it just keeps serving numbers that are confidently, precisely incorrect.

A wrong number doesn't crash — it compounds

This is the data-specific failure mode, and it's nastier than anything in application code. When an agent breaks a web app, you get a 500 and a stack trace. When an agent breaks a pipeline, you get a number. The number renders fine in the dashboard. It exports cleanly to the board deck. It feeds the churn model, which feeds the budget, which feeds the headcount plan. There is no exception to catch because nothing threw.

Worse, errors in a DAG don't stay local — they propagate. VentureBeat has been documenting how agent actions generate "chaos engineering" failures enterprises don't track yet: the blast radius isn't the one model the agent edited, it's everything downstream of it, in a system state the agent never had a complete picture of. A small per-step error rate becomes catastrophic across a chain. The same survey work pegs that roughly 43% of AI-generated code changes need debugging in production — and in a pipeline, "needs debugging in production" often means "has already corrupted a quarter of reporting before anyone notices."

Why your tests passed and the number was still wrong

The fan-out bug is instructive precisely because the safety net was in place and still didn't catch it. Look at what the agent shipped:

-- the agent's "enrichment" refactor
select
  o.order_id,
  sum(o.order_total) as revenue          -- summed once per promo row, not per order
from orders o
left join order_promotions p             -- many rows per order_id
  on p.order_id = o.order_id
group by o.order_id

The upstream uniqueness test on order_id passed — because it ran on the orders staging model, before the join changed the grain. The not-null test on revenue passed, because the inflated number is still very much not null. Freshness passed. The data contract passed too, and this is the part worth sitting with:

models:
  - name: fct_revenue
    config:
      contract: { enforced: true }
    columns:
      - name: revenue
        data_type: numeric            # guarantees the TYPE
                                      # guarantees nothing about the TRUTH

A data contract enforces shape. It does not enforce meaning. "Is this a numeric column?" is a different question from "does this number equal the general ledger?", and the second question is the only one that mattered. Agents are excellent at satisfying the constraints you wrote down. They are oblivious to the constraints you assumed — the ones that live in a senior engineer's head, not in the schema. That gap, between schema-valid and semantically-correct, is exactly where agent-written pipelines go wrong, and it is invisible to every automated check that only asserts structure.

This is the 95% bucket, and it's a verification bucket

Zoom out and the macro numbers tell the same story the fan-out bug does at micro scale. MIT's Project NANDA found in 2025 that around 95% of enterprise GenAI pilots delivered zero measurable P&L impact — and concluded the cause was organizational, not technological: the inability to integrate AI into real workflows with real guardrails. Gartner predicted in June 2025 that over 40% of agentic-AI projects will be canceled by the end of 2027, citing cost, unclear value, and weak risk controls, while warning that "agent washing" had flooded the market (it estimated only about 130 of thousands of agentic vendors were the real thing).

The governance side is no better prepared. Deloitte's State of AI in the Enterprise 2026 found only 21% of organizations have a mature governance model for autonomous agents, even as agents scale faster than the guardrails meant to contain them. And the security research increasingly argues the failures are structural: OWASP's GenAI work (reported June 11, 2026) frames prompt injection and agent compromise as systemic and architectural rather than classical, patchable CVEs — see CVE-2026-22708 against Cursor, where an allowlist meant to be a safety control auto-approved the exact commands an attacker needed. The pattern across all of it is the same: the teams landing in the failure bucket aren't failing at generation. They're failing at verification and governance.

The boring stuff is now the moat

If composition is free and verification is the whole game, then the unglamorous disciplines data engineers have been told to care about for a decade stop being hygiene and become your actual competitive surface. Concretely, in an agent-heavy stack:

  • Tests must assert meaning, not shape. Not-null and unique are table stakes. You need relationship tests on the post-join grain, reconciliation tests that tie revenue to a source of truth, row-count and aggregate diffs against the prior run, and anomaly checks on the metrics themselves. The agent will satisfy whatever you assert — so assert the thing that actually matters.
  • Contracts are a floor, not a ceiling. Enforce them, but never mistake a passing contract for a correct number. Pair every contract with a semantic check that a human signed off on.
  • Lineage and freshness become safety equipment. When the bug is silent, your only early warning is a column-level lineage graph that shows blast radius and freshness/volume SLAs that scream when a grain quietly changes.
  • Every agent change gets a human-owned gate. Not a skim — an owner who understands the business definition the column encodes. The agent can write the test; a human must decide it's the right test.

Fast junior, never autonomous author

The mental model that works is the one good teams already use for human juniors. A strong junior engineer who can produce a transform in minutes is enormously valuable — and you would still never let them push to the revenue pipeline without review, without tests they didn't write the acceptance criteria for, without an owner on the merge. The speed is real. The need for a gate is also real. Neither cancels the other.

The teams that will end up in the cancellation bucket are the ones that hear "the agent can write the pipeline" and quietly drop the second clause: "...and the agent can own the pipeline." It can't. Not because the SQL is bad — the SQL is often fine — but because ownership is accountability for the number being true, and an agent has no skin in a board meeting where the revenue figure is wrong. Let the agent author. Keep the contracts, the tests, and the merge button human.

The take

Data engineering's "agent moment" is being sold as an authoring revolution. It isn't. It's a verification crisis wearing an authoring revolution's clothes. The cost of writing a transform fell to roughly zero, and every dollar of that saving moved — not disappeared, moved — into the cost of trusting what got written. If your team responds by shipping more agent-authored pipelines with the same review rigor you had in 2024, you are not 10x more productive. You are 10x faster at generating silent, plausible, expensive lies.

The winners won't be the teams with the most autonomous agents. They'll be the teams that paired fast agents with ruthless verification — the ones who understood that in data, the bottleneck was never the code. It was always the trust. The agent didn't change that. It just made the trust the only thing left worth paying for.

Share this article

Related Posts

We Published Our 110× Loss. One Release Later, It Was Gone.
Data Engineering9 min read

We Published Our 110× Loss. One Release Later, It Was Gone.

A reviewer on gpudb's DuckDB community-extensions PR asked the question every GPU project dreads: forget the kernel benchmarks — what does a user actually see end-to-end? We ran it honestly. Native DuckDB won every query shape, by 3× to 109×, against our own extension. We published those numbers in our own release notes — and the act of writing them down produced the structural diagnosis that closed the entire gap in the very next release. The fix was the opposite of what a GPU database is supposed to do: delete the GPU from the hot path. This is the full story, with every number.

Read
The Inference Hardware Wars: Why Your Token Bill Is Decided in a Fab, Not a Prompt
Data Engineering10 min read

The Inference Hardware Wars: Why Your Token Bill Is Decided in a Fab, Not a Prompt

The token-price crash everyone cheers isn't software magic. It's a hardware war: Cerebras and Groq attacking on speed, NVIDIA's Rubin counterpunching on cost-per-token. The winner of that fight, not your prompt, sets your inference bill and your latency floor.

Read
samkhya v1.1: Never Regress — Putting a Model in Your Query Optimizer Without Letting It Wreck the Plan
Data Engineering10 min read

samkhya v1.1: Never Regress — Putting a Model in Your Query Optimizer Without Letting It Wreck the Plan

samkhya is a Rust SDK that lets a model — a gradient-boosted tree, TabPFN-2.5, even an LLM — correct the row-count estimates your query optimizer runs on, under a provable ceiling that a hallucinating model can never breach. This is the deep dive: the never-regress clamp, the portable Iceberg sidecar, the three swappable backends, and the honest benchmark I pre-registered and then failed — reported as such.

Read