What you will be able to do
- Explain where a pipeline's event log is stored and how to query it with the event_log() function or a published table
- Read the event log schema, including level, maturity_level, event_type and the JSON details field
- Use create_update and update_progress events to report the outcome and duration of pipeline updates
Key concept
Pipeline event log — A Delta table that each pipeline writes. Every row is an event: its event_type says what kind of event it is, and its details field holds JSON whose shape depends on that type. The pipeline UI is built on the same events, and you query this table yourself whenever you need history or want to script a check.
1.Why the event log is the source of truth
The exam calls them Spark Declarative Pipelines. The Databricks docs call them Lakeflow pipelines. Both names refer to the same pipelines, and you can monitor them at three levels of detail. The Jobs & Pipelines list shows status indicators for the last five runs. The pipeline monitoring UI shows the graph colour-coded by status, per-table row counts, data quality metrics and backlog for the selected update. Under both of these sits the event log.
The observability page describes the event log as a structured Delta table that you query for programmatic or historical questions, such as update outcomes, data quality trends and resource usage. The same entries are available in three places: the monitoring UI, the Pipelines REST API, and direct SQL against the table. This lesson uses direct SQL. To be alerted on pipeline events, configure notifications. Set them directly on a pipeline that runs on its own schedule, or as job notifications when the pipeline runs inside a Lakeflow Job. Event hooks let you run custom actions, such as sending an alert, when an event is logged, and the event log records their status in hook_progress events. Configuring hooks is covered elsewhere.
Checkpoint 1 of 6· Check yourself
An analyst wants to report on update outcomes and data quality trends across several weeks, using SQL. Which source should they query?
The event log is the structured Delta table meant for programmatic or historical questions. The list and graph are quick glances built on top of it.
“It's a structured Delta table that you query for anything programmatic or historical”Source: docs.databricks.com
The pipeline monitoring user interface, the Pipelines REST API, and querying the event log directly.
2.Finding and querying the event log
This section covers the default behaviour for Unity Catalog pipelines in the default publishing mode. Unity Catalog pipelines that use legacy publishing mode, and Hive metastore pipelines, have their own behaviour and syntax in separate docs, so do not assume everything below applies to them. The pipeline writes its event log to a hidden Delta table in the default catalog and schema configured for the pipeline. The table is named event_log_{pipeline_id}, where the pipeline ID has its dashes replaced by underscores. It is listed in system.information_schema.tables, but Catalog Explorer and the other workspace UI pages do not show it. By default, only the pipeline's run-as user can query it. To read it, pass the pipeline ID to the event_log() table-valued function:
SELECT * FROM event_log(<pipelineId>);Checkpoint 2 of 6· Fill the gap
A colleague searches Catalog Explorer and cannot find the event log of a pipeline that has not been published. Which function do they need?
SELECT * FROM ? (<pipelineId>);The hidden table can only be reached through the event_log() function. event_log_raw is a view you create yourself, and pipeline_events is the region-wide system table, not a function.
Source: docs.databricks.comTo make the log a named table, publish it from the pipeline's Advanced settings. You give the table a name and can optionally choose a catalog and schema. The event log location is also where any Auto Loader queries in the pipeline keep their schema.
{
"id": "ec2a0ff4-d2a5-4c8c-bf1d-d9f12f10e749",
"name": "billing_pipeline",
"event_log": {
"catalog": "catalog_name",
"schema": "schema_name",
"name": "event_log_table_name"
}
}Before you give anyone else access, create a view over the table and grant on the view. The docs warn that some compute settings can expose schema metadata if the table itself is shared. The view also gives every monitoring query a stable name, and because Unity Catalog views support streaming queries, you can read it with spark.readStream. Never delete the event log, or the catalog or schema it is published in, because the pipeline may then fail to update.
CREATE VIEW event_log_raw
AS SELECT * FROM <catalog_name>.<schema_name>.<event_log_table_name>;Checkpoint 3 of 6· Check yourself
A data steward needs to read a pipeline's event log. What is the recommended way to give them access?
Sharing the table directly can expose schema metadata under some compute settings, so the docs recommend a view. By default only the run-as user can query the log, and deleting it can break future updates.
“Databricks recommends creating a view over the event log table before modifying the privileges”Source: docs.databricks.com
Sources2
3.Reading the event schema
Every row has the same top-level fields. id identifies the record. timestamp is in UTC. origin carries the pipeline_id, pipeline_name, update_id (the equivalent of a run ID), flow_name and dataset_name. message is human-readable text, and error holds error details when something failed. You will filter mostly on event_type and level. details is the main field for analysis: it is a JSON string whose layout depends on event_type, and you extract values from it with the : operator, as in details:flow_progress.status.
level has four values. INFO is informational, WARN is an unexpected but non-critical issue, ERROR is an event failure that may need attention, and METRICS covers the high-volume events described above. maturity_level tells you whether an event's schema is stable. STABLE and NULL both mean stable; NULL appears on records written before the field was added. EVOLVING means the schema may change. DEPRECATED means the runtime may stop emitting the event at any time. Databricks advises against building monitoring or alerts on EVOLVING or DEPRECATED fields. The event types you will use most often are listed below.
| event_type | What its details describe |
|---|---|
| create_update | The full configuration used to start a pipeline update |
| update_progress | The lifecycle of an update, from starting and running to completed or failed |
| flow_progress | The lifecycle of a flow, plus row metrics, backlog and data quality |
| flow_definition | Schema and query plan for a flow; the edges of the DAG, used for lineage |
| user_action | User actions such as creating a pipeline or starting or canceling an update |
| planning_information | Why a materialized view was fully recomputed instead of incrementally refreshed |
| stream_progress | Information about the progress of a pipeline |
| hook_progress | The current status of a user hook during the pipeline run, used for monitoring event hooks, for example to send to external observability products |
| cluster_resources / autoscale | Resource and autoscaling information, populated only for classic compute |
For failures, filter on level = 'ERROR'. The docs' example dashboard does this against the pipeline_events system table, which covers all pipelines in a region, and the query below counts errors per pipeline per hour so you can spot spikes. Read message and the error field on those rows to see what went wrong.
SELECT
pipeline_id,
date_trunc('HOUR', event_time) AS hour,
count(*) AS num_errors
FROM
system.lakeflow_pipeline_events_preview.pipeline_events
WHERE
level = 'ERROR'
AND event_time >= current_timestamp() - INTERVAL 7 DAYS
GROUP BY
pipeline_id,
date_trunc('HOUR', event_time)
ORDER BY
hour DESCCheckpoint 4 of 6· Match them up
Match each event_type to the question it answers
Tap a term, then the definition that fits it.
Each event type puts a different JSON object in details. To answer a question, you first pick the event_type that carries the answer.
“This is the primary field used for analyzing events. The JSON string format depends on the event_type.”Source: docs.databricks.com
4.Reporting update health from update events
To check pipeline health, start with the update. The docs' run-overview query combines two event types. The earliest create_update timestamp is the start time. The end time is the latest update_progress event whose state is terminal: COMPLETED, FAILED or CANCELED. If no terminal state exists yet, which is normal for a continuous pipeline, the query uses current_timestamp(). Both events are grouped by origin.update_id. The latest state per update is the update_progress row ranked first by timestamp descending, and that state is pulled out of the JSON like this:
FROM_JSON(details, 'struct<update_progress: struct<state: string>>').update_progress.state AS last_update_state,Checkpoint 5 of 6· Check yourself
In the docs' update-duration query, which update_progress states mark the end of an update?
The query takes the latest timestamp among the three terminal states. If none exists, it uses the current time.
“FROM_JSON(details, 'struct<update_progress: struct<state: string>>').update_progress.state IN ('COMPLETED', 'FAILED', 'CANCELED')”Source: docs.databricks.com
Below the update, origin.flow_id tells you whether a flow is still refreshing incrementally. It stays the same across updates while the flow refreshes incrementally. It changes on a full refresh, a checkpoint reset or a full recomputation. When a materialized view unexpectedly refreshes in full, look at the planning_information details for that flow.
One access caveat applies to every query in this lesson. By default, only the pipeline's run-as user can query the hidden event log through event_log(), so a data engineer who is not that user needs access granted first, ideally through a view. When an update fails, filter the same log on level = 'ERROR' and read message and error alongside the update_progress state.
Checkpoint 6 of 6· Exam question
A data engineer wants to inspect the event log of a running Lakeflow Declarative Pipeline directly from a notebook, without changing any pipeline settings or waiting for an admin to configure anything. The pipeline ID is known. Which approach reads the event log data with no configuration change required?
Correct answer: A — Run `SELECT * FROM event_log('<pipeline_id>')` in a notebook attached to a cluster or SQL warehouse, reading the pipeline's hidden Delta event log table directly by ID.
- A. The `event_log()` table-valued function reads the pipeline's default hidden event log table by pipeline ID with no advance setup, which matches the no-configuration-change requirement.
- B. Publishing the event log to a visible catalog table is an optional convenience for governed access, not a prerequisite for querying it, so this adds an unnecessary configuration step.
- C. `system.lakeflow.pipelines` holds pipeline-level metadata for billing and auditing rather than per-flow progress or expectation metrics, so it cannot answer this event-level question.
- D. The Jobs API reports task and run status for jobs, not the flow-level `data_quality` metrics that only appear inside the pipeline event log's `flow_progress` events.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.If an event isn't in the pipeline UI's event list, the pipeline never recorded it.Why is that wrong?
Events at the METRICS level are written only to the Delta table and are never shown in the UI. You have to query the event log to see them.
Covered in Reading the event schema
2.Any field in the event log is a safe basis for production alerts.Why is that wrong?
Only STABLE (or NULL) maturity fields are safe to alert on. EVOLVING fields may change shape, and DEPRECATED events may stop being emitted.
Covered in Reading the event schema
3.If the event log isn't in Catalog Explorer, it wasn't created and you have to publish it before you can query it.Why is that wrong?
By default the log is a hidden table. It still exists and can be queried through the event_log() function.
Covered in Finding and querying the event log
4.Dropping an old event log table to save storage is harmless housekeeping.Why is that wrong?
The pipeline depends on its event log. Deleting the log, or the catalog or schema that holds it, can make future updates fail.
Covered in Finding and querying the event log
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://docs.databricks.com/aws/en/ldp/observabilityOfficial docs
“The event log is the ground truth underneath both.”
↩︎ Why the event log is the source of truth“To alert on pipeline events, configure notifications.”
↩︎ Why the event log is the source of truth“It's a structured Delta table that you query for anything programmatic or historical”
↩︎ Checkpoint - 2.
“You can view event log entries in the pipeline monitoring user interface, the Pipelines REST API, or by directly querying the event log.”
↩︎ Why the event log is the source of truth“You can also define custom actions to run when events are logged, for example, sending alerts, with event hooks.”
↩︎ Why the event log is the source of truth“By default, a pipeline writes the event log to a hidden Delta table in the default catalog and schema configured for the pipeline.”
↩︎ Finding and querying the event log“By default, only the pipeline's run-as user can query the event log table.”
↩︎ Finding and querying the event log“For behavior and syntax for Hive metastore pipelines, see Work with the event log for Hive metastore pipelines.”
↩︎ Finding and querying the event log“You can publish the event log by editing the Advanced settings for your pipeline.”
↩︎ Finding and querying the event log“The event log location also serves as the schema location for any Auto Loader queries in the pipeline.”
↩︎ Finding and querying the event log“In Unity Catalog, views support streaming queries.”
↩︎ Finding and querying the event log“By default, only the pipeline's run-as user can query the event log table.”
↩︎ Reporting update health from update events“The pipeline event log contains all information related to a pipeline, including audit logs, data quality checks, pipeline progress, and data lineage.”
↩︎ Key concept“it is not visible in Catalog Explorer or other workspace UI pages. You must access it using the event_log() function.”
↩︎ Exam trap 3“Deleting the event log might result in your pipeline failing to update during future runs.”
↩︎ Exam trap 4“Databricks recommends creating a view over the event log table before modifying the privileges”
↩︎ Checkpoint“FROM_JSON(details, 'struct<update_progress: struct<state: string>>').update_progress.state IN ('COMPLETED', 'FAILED', 'CANCELED')”
↩︎ Checkpoint - 3.
“Databricks supports the : operator to parse JSON fields.”
↩︎ Reading the event schema“The id of a single execution of the pipeline. This is equivalent to run ID.”
↩︎ Reading the event schema“ERROR: Event failure that might need user attention”
↩︎ Reading the event schema“Used for monitoring the status of event hooks, for example, to send to external observability products.”
↩︎ Reading the event schema“Describes the lifecycle of a pipeline update from starting, running, to completed, or failed.”
↩︎ Reporting update health from update events“As long as the flow_id is the same, the flow is incrementally refreshing.”
↩︎ Reporting update health from update events“METRICS: Used for high-volume events stored only in the Delta table, and not shown in the pipelines UI.”
↩︎ Exam trap 1“It is not recommended to build monitoring or alerts based on EVOLVING or DEPRECATED fields.”
↩︎ Exam trap 2“METRICS: Used for high-volume events stored only in the Delta table, and not shown in the pipelines UI.”
↩︎ Prediction“This is the primary field used for analyzing events. The JSON string format depends on the event_type.”
↩︎ Checkpoint - 4.
“This query counts errors per pipeline per hour so you can spot spikes.”
↩︎ Reading the event schema