Optional data quality rules declared with CONSTRAINT ... EXPECT on the tables and views a pipeline defines. Each incoming record is checked; on failure the pipeline can just record a warning (the default), discard the record or halt the update, and the results are logged.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Expectations in context, with comparison tables and the common traps.
Terms in this definition
- Constraint
Set by someone other than the architect, it fixes a limit the design cannot change, such as reusing existing hardware, a fixed budget or having just one data centre. Its effect is recorded and worked around, and any gap it leaves is logged as a risk.
- EXPECT
Sets a data quality rule on a dataset in a SQL pipeline. To discard failing rows, add
ON VIOLATION DROP ROW; to halt everything,ON VIOLATION FAIL UPDATE; with neither, those rows are kept and recorded in the logs. - Pipeline
Groups activities logically so that, together, they move and transform data, either one after another or side by side; found in both Azure Data Factory and Microsoft Fabric.
- CRUD
Shorthand for create, read, update and delete, the four basic things you do with data. Data-plane roles in Azure Cosmos DB, for instance, authorise those operations on items.
Related terms
- make_judge
Build your own LLM-based judge in MLflow with this function. The instructions you give it have to mention
inputs,outputs,expectationsortrace, as template variables. - Pipeline edition
A Lakeflow pipeline setting called
edition.COREcovers streaming ingest,PRObrings in CDC, andADVANCED, which applies if you set nothing, brings in expectations as well. - Pipeline product edition
The
editionsetting for a Lakeflow pipeline:COREcovers streaming ingestion,PROadds CDC andADVANCED, the default, adds expectations. If the pipeline uses a feature its edition lacks, the update fails. - Reserved keys
expected_facts,guidelinesand similar entries underexpectationsin evaluation data, which the stock judges and scorers recognise by name. - SDP
Spark Declarative Pipelines: open-source Apache Spark tooling to declare batch or streaming data flows in Python or SQL. Databricks extends it as Lakeflow Spark Declarative Pipelines, adding
AUTO CDC, expectations and a queryable event log. - SME
Someone with the domain knowledge to judge whether an application answers correctly. They respond through the MLflow Review App, and what they label can serve as expectations in evaluation.