Skip to content
All posts
Engineering 7 min

Why pipelines should compile

DataAstra

Most AI data tools generate text into a void. There is no type system checking column names, no resolver checking that asset://sales.orders exists, no pass checking that the graph is acyclic. The engineer reads the output and becomes the compiler.

We think that is backwards.

The hallucination problem is structural

When an assistant writes a query with revenue_amount and your table calls it order_amount, that is not a model failure. The model was never shown the table. It generated unconstrained text with no feedback loop, and the first feedback it got was a failed run.

A better model does not fix this. A closed output space does.

Generate into a grammar, against a catalog

DataAstra's four grammars (.flow for pipelines, .dq for quality rules, .api for data products, .app for apps) have a formal grammar and a compiler. When you describe a pipeline in English, the prompt is grounded in that grammar and in your live catalog: the set of assets and columns that exist at that point in the graph. What comes back is compiled before it is called a success. Diagnostics go into a repair loop, and you are shown what the compiler said, not a confident paragraph.

That removes syntactic hallucination. The semantic passes remove the logical kind.

What the compiler checks

  • Name resolution. Every asset:// and connection:// reference resolves against the live catalog. An unknown reference is a compile error, not a runtime surprise.
  • Contracts. A source declares the shape it was written against. A supplier adding or renaming a column is a compile error on your desk, not a page at 3 a.m.
  • Types. Join compatibility, nullability and aggregation types are proven before anything runs.
  • Lineage. The compiler already knows which output column came from which input column, because it resolved them while type-checking. Lineage is a by-product of compilation, recorded when a run completes, never inferred from names.
  • Quality placement. An assert stops a run. An expect records a reason and lets it finish. A rule naming a column that is not there fails to compile, so it cannot be published and then quietly never fire.

Why this matters beyond the transformation

Transformation tools now compile too. dbt and SQLMesh validate at compile time and produce column-level lineage. The difference is scope. DataAstra compiles what comes after the transformation: the quality rules that guard the output, the API that serves it, and the app on top. One type system, one catalog, one lineage graph across all four.

That is what makes the governance story possible. Because the compiler knows which column became which, a classification on a source column propagates itself to every derived column and is enforced where the bytes leave the platform. We wrote that up separately in Classify once, mask everywhere.

A pipeline that passes is correct with respect to your catalog

An AI-generated pipeline that passes every compiler pass is not just syntactically valid. It is semantically correct with respect to the catalog it was compiled against, on the day it was compiled. Keeping that true as the catalog changes is the compiler's job, and that is the job the engineer should never have had.