Databricks - Data Engineer Professional Study Guide

    5: Monitoring and Alerting

    This chapter covers the production observability and notification surface for Databricks workloads, spanning system tables for cost and audit telemetry, the Query Profile and Spark UI for query-level diagnosis, the REST API and CLI for job and pipeline state monitoring, Lakeflow Spark Declarative Pipelines event logs for pipeline introspection, and the alerting paths through Databricks SQL Alerts and Lakeflow Jobs notification destinations. Each surface is paired with its data model, the queries that extract operational signal, and the failure modes that distinguish a clean monitoring rollout from one that pages on noise.

    Learning Objectives

    By the end of this chapter, you will be able to:

    • Use system tables for observability over resource utilization, cost, auditing and workload monitoring.
    • Use Query Profiler UI and Spark UI to monitor workloads.
    • Use the Databricks REST APIs/Databricks CLI for monitoring jobs and pipelines.
    • Use Lakeflow Spark Declarative Pipelines Event Logs to monitor pipelines.
    • Use SQL Alerts to monitor data quality.
    • Use the Lakeflow Jobs UI and Jobs API to set up notifications for job status and performance issues.

    Executive Summary

    • System tables under the system catalog are the source-of-truth for billing, lineage, audit, and compute telemetry; the Spark UI and the Query Profile are per-query execution evidence and complement system tables rather than replace them.
    • Lakeflow Jobs and Lakeflow Spark Declarative Pipelines each emit their own observability tables (system.lakeflow.* plus the pipeline event_log()), which combine for end-to-end workflow visibility.
    • The REST API and CLI are the programmatic retrieval surface for run history; paginated list calls plus a get-by-id pattern are required for any external scheduler or on-call automation.
    • Alerting splits cleanly between data-quality conditions (SQL Alerts on a Databricks SQL query) and workflow conditions (Lakeflow Jobs notification destinations on task and job state), and conflating the two leads either to noisy pages or to silent failures.

    Assumptions

    • Unity Catalog system schemas referenced in this chapter are enabled per workspace; system.access, system.billing, system.compute, system.lakeflow, system.query, and system.serverless may require explicit enablement by a metastore admin via the SystemSchemas API.
    • Examples use the cross-cloud Databricks REST API (/api/2.2/jobs/*, /api/2.0/pipelines/*, /api/2.0/sql/alerts) and the Databricks CLI v0.x command shape (databricks jobs ...).
    • Notification destinations (email lists, webhook URLs, PagerDuty integrations, Slack channels, Microsoft Teams connectors) are assumed pre-created at the workspace level by an admin before any job or alert references them.

    Sections in this chapter

    1. Free
    2. Free with account
    3. Free with account