Compile-time schema validation checks a pipeline's schema before the pipeline runs, so a mismatch fails at build time instead of after data has already been written. Most data tools validate schema at runtime, which means the error surfaces only once the pipeline has executed and, often, already produced output. Bauplan is the execution layer for AI-generated data changes: it validates schema when it compiles the run graph, before any data is read or written, so a wrong-schema run never starts.
"Compile time" is borrowed from programming, where a compiler checks a program before it runs. For a data pipeline, the equivalent moment is graph construction: before executing, the platform assembles the pipeline into a run graph of steps and their data dependencies. Validating schema at that point means checking, ahead of execution, that each step will receive the shape it expects and produce the shape the next step needs. Nothing has read or written data yet, so a failure here costs nothing but a corrected error. This is distinct from runtime, where the pipeline is already executing and data is already moving.
Runtime validation is the common model, and it comes in two familiar shapes. Great Expectations validates data during or after a pipeline run, so a schema problem is flagged once the data exists, and whether it is already in production depends on how the check is wired. Confluent Schema Registry enforces schema at the serialization boundary for streaming messages, which is strong for message compatibility but governs individual messages in flight, not a transformation's output across a pipeline.
Both are useful, and both share the same timing property: the check runs at or after execution. By the time it fires, the pipeline has run, so a schema failure is something you detect and then clean up, not something you prevented.
Bauplan moves the schema check ahead of execution. When you define a pipeline with typed schema contracts, Bauplan verifies those contracts as it compiles the run graph. If a step would receive the wrong type, a missing column, or a shape that does not match what the next step requires, compilation fails with a clear error, and the pipeline does not run. No data is read, nothing is written, and there is nothing to clean up. Execution only begins on a graph whose schema contracts are satisfied end to end. Content-level checks still happen later, in the audit step before merge, but structural schema errors are caught before a single row moves.
The two approaches differ most in what a failure costs.
A runtime schema failure happens after the pipeline has executed. Best case, it failed loudly and you lost the run and some compute. Worse case, it wrote data that is the wrong shape to a production table, downstream consumers read it, and now you are into diagnosis, rollback, and backfill, at whatever hour it happened. The failure is expensive because it is late.
A compile-time failure happens before anything runs. It is a build-time error with a clear message, caught in development or in CI, fixed in minutes, with no production impact and no data to reconcile. Same underlying mistake, a schema mismatch, but the earlier it is caught, the cheaper it is, and compile time is the earliest point it can be caught.
Compile-time schema validation checks a pipeline's schema before the pipeline runs, at the point where the platform builds the execution graph. Instead of validating data after it has been produced, it verifies ahead of execution that each step will receive and produce the expected schema. A mismatch fails as a build-time error, so the pipeline never runs with a bad schema and no incorrect data is written. It is the earliest point at which a schema error can be caught.
Bauplan compiles a pipeline into a run graph before executing it. Schema contracts you annotate in the pipeline are checked at that compilation step, verifying that every step's inputs and outputs match end to end. If a contract is violated, a wrong type, a missing column, a mismatched hand-off between steps, compilation fails and the pipeline does not run. Because this happens before any data is read or written, a schema error costs a corrected error rather than a production cleanup.
Most affordable schema tooling is runtime-based: Great Expectations and Pandera validate at execution, and schema registries validate messages at the serialization boundary. Compile-time schema validation for the pipeline itself is less common, because it requires the platform to compile the pipeline into a graph and check contracts before running. Bauplan provides this as part of its execution model, so for complex pipelines you get schema errors caught before execution rather than assembling runtime checks and hoping they are placed correctly.