CertSafari
    Databricks Certified Data Engineer Professional - October 9 onwards· Lessons

    Domain 8 · Lesson 42/46

    Debugging Lakeflow Pipelines with the Event Log

    Use event logs and the Spark UI to debug pipelines and Spark workloads.

    11 min read
    2% of exam
    4 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Open a pipeline's event log from the monitoring UI or with the event_log() function, and say who can query it by default
    • Publish the event log and share it safely through a view
    • Use the event_type, level, error and details fields to find why an update or flow failed
    • Query the pipeline_events system table for errors across all pipelines, then follow the failure workflow to fix and re-run

    Key concept

    Pipeline event log — A Delta table that every Lakeflow pipeline writes to as it runs. Each row is a structured event, such as an update starting, a flow failing or an expectation dropping records. When a pipeline breaks, this table is where you find the full error and the context around it.

    1.Where the event log lives and who can read it

    Most people first see the event log in the UI. When a pipeline update has errors, they appear in the bottom pane of the monitoring page, and a View logs button opens the event log for that run. In the Lakeflow Pipelines Editor the same errors show up in the Issues pane. Behind both views is an ordinary Delta table that you can query with SQL. For anything beyond a quick look, querying the table is the stronger skill.

    By default, the pipeline writes its event log to a hidden Delta table in the pipeline's default catalog and schema. The table is named event_log_{pipeline_id}, where the pipeline's UUID has its dashes replaced by underscores. You can see the table in system.information_schema.tables, but not in Catalog Explorer or any other workspace UI page. The only way to read it is the event_log() table-valued function, called with the pipeline ID:

    Query a pipeline's event log as the run-as usersql
    SELECT * FROM event_log(<pipelineId>);

    Two operational rules follow. First, never delete the event log, or the catalog or schema it is published in. If you do, future updates of the pipeline can fail. Second, the event log keeps history the UI drops. Pipelines keep 60 days of past updates in the update history drop-down. Older updates disappear from that list but stay in the event log, so the table is where you go to investigate a failure from three months ago.

    Checkpoint 1 of 5· Check yourself

    An engineer wants to inspect the hidden event log table of a Unity Catalog pipeline. They search Catalog Explorer and can't find it. What is the correct way to read it?

    Sources12

    2.Publishing the event log and sharing it through a view

    If a team needs to query the log by name, you can publish it in the pipeline's Advanced settings. Give it a table name and, if you want, a catalog and schema. In the pipeline settings JSON this is the event_log object:

    Pipeline settings that publish the event log to a named tablejson
    {
      "id": "ec2a0ff4-d2a5-4c8c-bf1d-d9f12f10e749",
      "name": "billing_pipeline",
      "event_log": {
        "catalog": "catalog_name",
        "schema": "schema_name",
        "name": "event_log_table_name"
      }
    }

    The event log location also serves as the schema location for any Auto Loader queries in the pipeline. That is one more reason to treat the table carefully. Before you widen access, Databricks recommends that you create a view over the table instead of sharing the table itself. With some compute settings, users who are given the table directly could gain access to schema metadata. The documentation's debugging queries all assume a view called event_log_raw. For an unpublished log, the view selects from event_log(<pipelineId>) instead of a table name.

    Create the event_log_raw view that the example debugging queries usesql
    CREATE VIEW event_log_raw
    AS SELECT * FROM <catalog_name>.<schema_name>.<event_log_table_name>;

    In Unity Catalog, views support streaming queries. That means you can follow the event log as it grows, for example to feed a monitor, instead of re-running batch queries.

    Checkpoint 2 of 5· Fill the gap

    Which call makes this Python sample read the event_log_raw view as a stream?

    df = spark. ? .table("event_log_raw")

    Sources2

    3.Reading an event: event_type, level, error and details

    Every row has the same top-level fields. timestamp is in UTC. message is a readable summary. origin identifies the pipeline, update, flow and dataset. error holds the failure details when something went wrong. details is a JSON string whose shape depends on event_type, and it is the primary field for analysis. You parse it with the : operator or from_json. So when you debug, you usually filter on event_type and level, then dig into details and error.

    Event types you will use most when debugging
    event_typeWhat it tells you
    create_updateThe complete configuration used to start a pipeline update
    update_progressLifecycle of an update: starting, running, completed or failed
    flow_progressLifecycle of one flow: starting, running, completed or failed
    flow_definitionSchema and query plan of a flow; used for lineage and the explained plan
    planning_informationWhy a materialized view was refreshed incrementally or fully recomputed
    user_actionWho created the pipeline or started or canceled an update

    The level field has four values. INFO marks routine events. WARN marks unexpected but non-critical issues. ERROR marks failures that might need your attention. The fourth value, METRICS, is easy to overlook: these high-volume events are stored only in the Delta table and are never shown in the pipelines UI. So a metric you can't find in the UI may still be in the table. Finally, check maturity_level before you build alerts on a field. Fields marked EVOLVING or DEPRECATED may change or stop appearing.

    Checkpoint 3 of 5· Match them up

    Match each event_type to the debugging question it answers

    Tap a term, then the definition that fits it.

    Sources3

    4.From the system table to a fixed pipeline

    The per-pipeline event log covers one pipeline. To look across all of them, Databricks recommends the pipeline_events system table, which is in Beta. It holds events for every pipeline in every workspace of a region. To read it, a user must either be both a metastore admin and an account admin, or hold USE and SELECT on the system schemas. The query below finds the most recent error for each pipeline in the last seven days, along with its outermost exception:

    Most recent error per pipeline from the pipeline_events system tablesql
    SELECT
      workspace_id,
      pipeline_id,
      event_time,
      message,
      error.exceptions[0].error_class AS exception_error_class,
      error.exceptions[0].sql_state   AS exception_sql_state
    FROM
      system.lakeflow_pipeline_events_preview.pipeline_events
    WHERE
      level = 'ERROR'
      AND event_time >= current_timestamp() - INTERVAL 7 DAYS
    QUALIFY
      ROW_NUMBER() OVER (PARTITION BY workspace_id, pipeline_id ORDER BY event_time DESC) = 1
    ORDER BY
      event_time DESC

    For a single failed update, the documentation lays out a workflow:

    1. Start where the UI points you. That is the Issues pane in the editor, or the bottom pane of the monitoring page. 2. Find what failed in the Graph view. Failed tables and flows are highlighted there, so you can see whether the failure stayed in one table or spread to its downstream tables. 3. Query the event log for the full error. The UI can truncate messages, while the error and details columns hold the full stack trace. 4. Re-run only what failed. Refresh failed tables retries the failed tables plus everything downstream of them.

    If the failure looks like a code or configuration problem, run Validate before a full update. Validate re-checks the graph and source code without materializing any data.

    Checkpoint 4 of 5· Put it in order

    Put the steps for working through a failed pipeline update in order

    1. 1.Use Refresh failed tables to retry the failed tables and their downstream tables
    2. 2.Query the event log's error and details columns for the full stack trace
    3. 3.Find the failed tables and flows highlighted in the Graph view
    4. 4.Open the Issues pane or the monitoring page's bottom pane and click View logs

    Checkpoint 5 of 5· Exam question

    A Lakeflow Spark Declarative Pipeline updates several streaming tables nightly. One downstream table has started lagging noticeably behind its upstream source, and the on-call engineer wants to confirm whether the flow is falling behind because of a growing backlog rather than an outright failure. Which query against the pipeline's event log surfaces this most directly? ```sql SELECT timestamp, details:flow_progress.status, details:flow_progress.metrics FROM event_log(<pipeline_id>) WHERE event_type = 'flow_progress' AND origin.flow_name = 'downstream_table' ORDER BY timestamp DESC ```

    Sources41

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.The default event log table can be found and opened in Catalog Explorer like any other table.Why is that wrong?

      The default event log is hidden. It is listed in information_schema.tables but not shown in Catalog Explorer, and you read it with event_log().

      Covered in Where the event log lives and who can read it

    2. 2.Once an update drops out of the 60-day update history, its events are gone.Why is that wrong?

      The UI keeps 60 days of updates, but older updates stay in the event log table.

      Covered in Where the event log lives and who can read it

    3. 3.Every event in the log can also be seen in the pipelines UI.Why is that wrong?

      Events with level METRICS are stored only in the Delta table, so you have to query the log to see them.

      Covered in Reading an event: event_type, level, error and details

    4. 4.A failure that reproduces in the editor will fail the same way when the pipeline runs on a schedule.Why is that wrong?

      Updates started manually from the editor have automatic retries off. Scheduled and API-triggered updates retry recoverable failures automatically.

      Covered in From the system table to a fixed pipeline

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “the errors appear in the bottom pane with a View logs button to access the event log for that run”
      ↩︎ Where the event log lives and who can read it
      “The UI can truncate messages. The event log's error and details columns carry the full stack trace and structured context.”
      ↩︎ From the system table to a fixed pipeline
      “Use Refresh failed tables to retry just the failed tables plus anything downstream of them”
      ↩︎ From the system table to a fixed pipeline
      “Updates older than the retention window no longer appear here but remain in the event log.”
      ↩︎ Exam trap 2
      “Updates triggered manually from the editor disable automatic retries so you see errors immediately”
      ↩︎ Exam trap 4
      “When an update fails, start at the Issues pane in the Lakeflow Pipelines Editor or the bottom pane of the monitoring page.”
      ↩︎ Checkpoint
    2. 2.
      “Deleting the event log might result in your pipeline failing to update during future runs.”
      ↩︎ Where the event log lives and who can read it
      “Databricks recommends creating a view over the event log table before modifying the privileges”
      ↩︎ Publishing the event log and sharing it through a view
      “The event log location also serves as the schema location for any Auto Loader queries in the pipeline.”
      ↩︎ Publishing the event log and sharing it through a view
      “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 1
      “By default, only the pipeline's run-as user can query the event log table.”
      ↩︎ Prediction
      “it is not visible in Catalog Explorer or other workspace UI pages. You must access it using the event_log() function.”
      ↩︎ Checkpoint
    3. 3.
      “This is the primary field used for analyzing events.”
      ↩︎ Reading an event: event_type, level, error and details
      “It is not recommended to build monitoring or alerts based on EVOLVING or DEPRECATED fields.”
      ↩︎ Reading an event: event_type, level, error and details
      “METRICS: Used for high-volume events stored only in the Delta table, and not shown in the pipelines UI.”
      ↩︎ Exam trap 3
      “Describes the lifecycle of a flow from starting, running, to completed or failed.”
      ↩︎ Checkpoint
    4. 4.
      “The pipeline_events system table contains events for all pipelines across the workspaces in a region and is the recommended way to query events.”
      ↩︎ From the system table to a fixed pipeline

    Continue to page 2 of 2

    Debugging Spark Workloads with the Spark UI, Thread Dumps and Logs

    Spotted a mistake, or was something unclear? Tell us.