TL;DR: AI can write a data pipeline in seconds, but "runs green" isn't the same as "correct." Mehdi Ouazza (DevRel at MotherDuck) walks through the habits that turn a lazy one-shot prompt into a pipeline you can trust, using a NOAA climate dataset with Claude and MotherDuck. There's a companion blog post and the slide deck if you want to follow along.
Why AI pipelines break
AI is non-deterministic and can't see your data. It guesses your schema, units, and duplicates, and those guesses become silent bugs that still produce plausible-looking numbers. In the demo, a NOAA temperature pipeline reports 179-degree averages because the source stores temperature in tenths of a degree and nothing divided by ten.
Give your AI eyes on the data
The single biggest fix is letting the agent read real production data through an MCP server or a CLI. That way it inspects the actual schema, partitions, and quality flags instead of guessing. The MCP workflows docs cover setup for your coding agent.
Foundations still matter
Parametrize by time window. Make loads idempotent with delete-and-insert or merge. Prefer incremental loads over full snapshots. Inspect the data before you transform it. Same data engineering fundamentals as always — you're just prompting for them now instead of writing them by hand.
Judge the output against a contract
Write a contract: the business logic the pipeline has to satisfy. Have the agent iterate against that goal rather than against the code. Let it deploy to a serverless Python runtime like MotherDuck Flights, read the logs when a run fails, and fix itself.
Package it as a skill
Once the pipeline works, capture the whole discipline — eyes on data, foundations, tests, contract — in a reusable skill so you can re-run it with one command instead of re-explaining it every time.



