liveBook · Manning

Schema validation

As explained in Designing Deep Learning Systems: A guide for software engineers

Schema enforcement is the validation of incoming records against a predefined data schema during writing.

Schema validation checks incoming records against a predefined, strongly typed schema when they are written. It prevents data pollution and turns the schema into a safety guard between changing data collection and downstream consumers. section 2.3.1 section 2.1.2

In a dataset-management service, enforcement keeps raw ingested data and produced training data consistent with specifications. This protects model-training code from upstream changes and preserves backward compatibility for upstream and downstream clients. section 2.1.2

Use schema validation as part of a controlled dataset workflow:

  • Write batch or streaming data into Delta Lake tables in object storage, where table metadata and schema enforcement are managed alongside the data. section 2.3.1
  • Keep raw source inputs in bronze tables, clean and transform them into silver tables, then filter and purify results into gold tables. section 2.3.1
  • Version schemas when needed, but prefer one schema per dataset when possible; make compatible updates, and create a new dataset type for breaking changes. section 2.1.2

Delta Lake table writes

A Delta Lake table supports querying, inserting, updating, and merging like a SQL table. Schema validation during writes rejects incompatible data before it can pollute the table; table history and time travel then support rollback to an earlier state. section 2.3.1

Figure 2.16 Delta Lake data ingestion and processing workflow. Both stream data and batch data can be saved as Delta Lake tables, and the Delta Lake tables are stored in the cloud object storage, such as Amazon S3.

The workflow locates Delta Lake tables between batch or streaming ingestion and cloud object storage, where schema enforcement accompanies managed table metadata. section 2.3.1

How Designing Deep Learning Systems: A guide for software engineers covers it

How deep it goes
Explains enforcement through typed-schema responsibilities, compatibility guidance, and Delta Lake write-time behavior; it does not detail validation rules or type-resolution internals.
Examples
Uses Delta Lake tables, bronze-silver-gold ETL stages, and a batch-or-streaming ingestion workflow in cloud object storage.
What it assumes
Assumes familiarity with datasets, upstream and downstream clients, and model-training code while defining the role of a strongly typed schema.
What you can do after
Operate/configure it by enforcing strongly typed dataset schemas and handling compatible versus breaking schema changes.
How it connects
Connects schema validation to Delta Lake, ACID transactions, time travel, ETL, object storage, and backward compatibility.

Also explained in

Compare how 7 books explain schema validation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing Deep Learning Systems: A guide for software engineers. The section links point to the parts of the book it draws on.