Databricks - Data Engineer Professional Study Guide

    9: Debugging and Deploying

    This chapter covers the production troubleshooting and release surfaces of the Databricks Data Intelligence Platform: how the Spark UI, cluster logs, system tables, and Query Profile UI combine to triage failed runs, how Lakeflow Jobs repair runs with parameter overrides resume work from the failed task, how Lakeflow Spark Declarative Pipelines event logs expose flow-level failures, and how Databricks Asset Bundles plus Databricks Git Folders ship the resulting fixes through reviewed, version-controlled CI/CD.

    Learning Objectives

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

    • Identify pertinent diagnostic information using Spark UI, cluster logs, system tables, and query profiles to troubleshoot errors.
    • Analyze the errors and remediate the failed job runs with job repairs and parameter overrides.
    • Use Lakeflow Spark Declarative Pipelines event logs and the Spark UI to debug Lakeflow Spark Declarative Pipelines and Spark pipelines.
    • Build and deploy Databricks resources using Databricks Asset Bundles.
    • Configure and integrate with Git-based CI/CD workflows using Databricks Git Folders for notebook and code deployment.

    Executive Summary

    • A failure on a Databricks workload is rarely diagnosed from one surface alone. The exam expects you to traverse the four evidence layers (Spark UI for execution detail, cluster logs for driver and executor stdout/stderr, system tables for cost and orchestration history, Query Profile UI for SQL warehouse plans) in a fixed triage order rather than guessing at root cause.
    • Lakeflow Jobs repair runs are the canonical remediation path for a partially failed multi-task job. Successful upstream tasks are NOT re-executed; only failed and skipped downstream tasks are re-run, and per-run parameter overrides let you patch a single bad input without editing the job definition.
    • Lakeflow Spark Declarative Pipelines event logs are first-class debugging surfaces. The event_log(<pipeline_id>) table-valued function and the published event_log UC table expose flow_progress, data_quality, update_progress, planning_information, and cluster_resources events, with details JSON carrying the exception, expectation outcomes, and backlog metrics that the Spark UI cannot show on its own.
    • Databricks Asset Bundles are the canonical CI/CD surface for shipping jobs, pipelines, models, experiments, and serving endpoints from a Git repository to one or more Databricks workspaces. The legacy dbx tool is no longer the recommended path. Bundles render databricks.yml into REST-API calls and reconcile workspace state on every bundle deploy --target, so promotion across dev, staging, and prod targets is a deterministic, reviewable artifact.
    • Databricks Git Folders (the renamed Databricks Repos) are the workspace-side mirror of a Git branch. Production folders are read-only by convention and updated only by CI through databricks repos update; direct workspace edits in production folders are an anti-pattern that breaks the deployment contract Bundles enforce.

    Assumptions

    • The reader has shipped at least one Databricks pipeline into production, has run a Spark job at the cluster scale where diagnostics matter, and has used Git through a CLI before. We do not introduce Spark, Delta Lake, or Lakeflow concepts from scratch in this chapter; they are anchored from prior chapters and named only by the exact term established earlier.
    • Code samples target the Databricks CLI v0.220+ syntax (the databricks bundle … namespace), Unity Catalog as the default metastore, and serverless Lakeflow Jobs / Lakeflow SDP compute where applicable. Where multi-cloud differences matter (S3 vs ADLS Gen2 vs GCS paths, regional endpoints) the snippet uses placeholder hostnames and the exam-relevant pattern remains identical.
    • The databricks.yml examples use a three-target layout (dev, staging, prod) with workspace-host substitution and a single OAuth machine-to-machine service principal per target. Personal access tokens (PATs) are shown only as legacy fallbacks; the recommended authentication path is OAuth M2M.
    • Pipeline and job IDs in examples are illustrative; the exam does not test specific IDs.

    Sections in this chapter

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