QuestionQ57

VerifiedMonitoring and Alerting

A data engineer operates a production Lakeflow Spark Declarative Pipeline that processes customer transaction data. The pipeline contains several data-quality expectations, including transaction_amount > 0 and customer_id IS NOT NULL.

These expectations are specified with the SQL EXPECT clause. The engineer wants to monitor pipeline data quality by analyzing the numbers of records that passed or failed each expectation in the latest pipeline update. The Lakeflow Spark Declarative Pipelines event logs are stored in a Delta table called event_log_table.

For the latest pipeline update, identify a programmatic way to extract details such as each expectation’s name, associated dataset, number of records that passed the expectation, and number of records that failed it.

Which method retrieves the required data-quality metrics from the Lakeflow Spark Declarative Pipelines event log?

Explanation

Lakeflow Spark Declarative Pipelines stores expectation metrics in flow_progress events. The nested details.flow_progress.data_quality.expectations JSON array contains expectation result records with name, dataset, passed_records, and failed_records; it can be parsed and exploded after filtering to the latest update. Databricks documents this exact event type, field path, and result schema.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!