Title
Page icon
Create new category
Edit page index title
Edit category
Edit link
Databricks Webhook + OpenLineage Setup Runbook
In some Databricks job execution and termination scenarios, the Spark application lifecycle does not reliably invoke the SparkListener.onApplicationEnd() callback that the OpenLineage Spark integration relies on. Because OpenLineage depends on Spark lifecycle callbacks, it may emit a START event without the corresponding terminal COMPLETE or FAIL event, even after the Databricks job has finished.
When the terminal event is missing:
The lineage run remains stuck in the RUNNING state in ADOC.
Downstream lineage graph processing and pipeline run status tracking cannot complete correctly.
Monitoring policies that depend on terminal run events may not evaluate.
This runbook explains how to configure Databricks job webhooks so ADOC can detect the job's terminal state and synthesize the missing terminal lineage event.
Assumptions
The OpenLineage Spark Databricks integration is already set up and working (transport, listeners, parent lineage, and so on). See OpenLineage for Spark on Databricks.
You have your ADOC access key and secret key for your tenant.
You have Databricks workspace admin (or equivalent) permission to create Notification Destinations.
Overview
Step | What | Where |
|---|---|---|
1 | Create a Notification Destination (one-time, workspace-level) | Databricks Workspace Settings |
2 | Capture the webhook destination ID | Databricks UI or API |
3 | Attach the webhook to jobs | Airflow DAG or Spark job definition |
4 | Configure | Spark conf on the job cluster |
The Databricks webhook (Notification Destination) is a central, workspace-level configuration. Create the URL and credentials once, under Workspace Settings → Notification Destinations — do not recreate or reconfigure the webhook URL separately for each job.
Creating the destination does not automatically enable it for all jobs. Every applicable execution path must include both the webhook destination ID and the required OpenLineage captured properties:
For an Airflow-submitted run, pass the destination ID under
webhook_notificationsin the DAG's Databricks run payload, and addspark.openlineage.capturedPropertiesto the submitted cluster'sspark_conf.For a Databricks job cluster, add the destination ID under
webhook_notificationsin the job definition, and addspark.openlineage.capturedPropertiesto the job cluster'sspark_conf.
The captured properties are required in both cases, because they correlate the OpenLineage START event with the webhook notification.
Step 1: Create the Notification Destination (one-time)
Official Databricks documentation: Create a new notification destination
Open your Databricks workspace.
Go to Workspace Settings → Notifications → Notification Destinations.
Click Add destination.
Fill in the following fields:
Field
Value
Name
A clear name, for example
acceldata-openlineage-webhookURL
https://<tenant-host>/torch-pipeline/api/v1/openlineage/databricks/webhookUser Name
<access_key>Password
<secret_key>Replace:
<tenant-host>— your ADOC tenant base URL host (for example,your-tenant.acceldata.app)<access_key>/<secret_key>— your ADOC API credentials for that tenant
Save the destination.
Databricks may send a probe request (type=webhooks.probe) when the destination is created or validated. The ADOC endpoint acknowledges probes with an HTTP 200 response.
Step 2: Get the webhook destination ID
After creating the destination, you need its ID (a UUID) to attach it to jobs.
Option A — Databricks UI:
Open Workspace Settings → Notifications → Notification Destinations.
Open the destination you created.
Copy the destination ID (UUID format, for example
781b5c74-3f61-4669-a3d4-ce31b88f8872).
Option B — Databricks REST API:
Find your destination by name in the response and copy its id.
You'll use this ID in webhook_notifications.on_success and webhook_notifications.on_failure.
Step 3: Attach the webhook to jobs
Configure both on_success and on_failure with the same destination ID, so terminal lineage events are synthesized for both successful and failed runs.
This attachment is required per job or run, even though the Notification Destination itself is created only once.
3.1 Passing the webhook through Airflow DAGs
This assumes other OpenLineage Spark parameters are already configured.
Add webhook_notifications to the Databricks run payload — for example, using DatabricksSubmitRunOperator:
Replace <webhook-destination-id> with the UUID from Step 2.
3.2 Passing the webhook directly on Spark or Databricks jobs
This assumes other OpenLineage Spark parameters are already configured.
In the job definition JSON (Jobs API, Terraform, or UI JSON edit):
Step 4: Configure capturedProperties (required)
Until OpenLineage exposes Databricks identifiers on every event, each job must capture the following runtime properties. ADOC uses these values to correlate Databricks webhook notifications with the corresponding OpenLineage runs.
Add spark.openlineage.capturedProperties to the job cluster's Spark configuration. If this setting already exists, append the properties below to the existing comma-separated list instead of replacing it.
Airflow DAG
When the DAG defines the Databricks cluster, add the setting to the cluster's spark_conf:
Databricks job cluster
Add the following key-value pair to the job cluster's Spark configuration:
These properties are used to correlate:
Property | Used for |
|---|---|
| workspaceId |
| jobId, runId |
Without capturedProperties, the START event may lack Databricks identifiers, no tracking entry is created, and the webhook cannot synthesize a terminal event.
Configuration examples
Airflow DAG
Minimal pattern showing the webhook, OpenLineage transport, and capturedProperties together. Replace secrets and IDs with your environment's values — do not commit real credentials to source control.
Databricks job cluster (YAML)
The following Databricks Job YAML example configures webhook notifications and the required OpenLineage settings for a shared job cluster:
Replace all placeholder values with settings for your environment. Store your ADOC credentials in a secrets manager, or inject them during deployment, instead of committing plaintext keys.
Verification checklist
After setup, confirm:
The Notification Destination exists and the probe or auth check succeeds (no persistent 401 errors).
The job JSON includes
webhook_notificationsfor bothon_successandon_failure.The Spark conf includes
spark.openlineage.capturedPropertieswith the Databricks properties listed above.After running a job:
The OpenLineage START event arrives in ADOC.
On job completion, Databricks fires the webhook.
The pipeline run moves to COMPLETED or FAILED, and is not stuck in RUNNING.
Troubleshooting
Symptom | Likely cause | Action |
|---|---|---|
Run stuck in RUNNING after the job ends | Webhook not attached to the job | Add the destination ID under |
Webhook returns 401 | Wrong access or secret key on the destination | Update the User Name / Password on the Notification Destination |
Webhook received but no terminal event | Missing | Confirm captured properties are set, and confirm the START event exists |
Wrong tenant | Keys belong to another tenant | Use that tenant's ADOC credentials on the destination |
Quick reference
What's next
For the base Databricks Spark OpenLineage setup this runbook extends, see OpenLineage for Spark on Databricks.
For additional help, contact www.acceldata.force.com OR call our service desk +1 844 9433282
Copyright © 2025