06-14-2023 09:54 AM
After creating the delta pipeline, I would like to get details from the dlt maintenance job automatically created by Databricks, like the scheduled time when the dlt maintenance tasks will be executed. However, it seems the Job API 2.1 doesn't cover this type of job in the list operation. Is there a workaround?
06-15-2023 07:36 AM
Hi @Debayan Mukherjee,
Although undocumented, I figured out that the Databricks Jobs API list endpoint has a `job_type` parameter that I can set `MAINTENANCE_PIPELINE` to get the DLTs maintenance jobs. The following command works: `curl -H "Authorization: Bearer $DATABRICKS_AAD_TOKEN" "https://$databricks_host/api/2.1/jobs/list?limit=25&job_type=MAINTENANCE_PIPELINE"`
Please update the Databricks Jobs API documentation!!!
06-15-2023 12:18 AM
Hi,
You can list DLT pipelines. https://learn.microsoft.com/en-us/azure/databricks/delta-live-tables/api-guide#--list-pipeline-event...
Please let us know if this helps. Also, please tag @Debayan Mukherjee with your next comment so I will be getting notified.
06-15-2023 03:13 AM
Hi @Debayan Mukherjee,
Unfortunately this doesn't help. The Pipelines API events endpoint only covers update events, not maintenance events. I need details about DLTs maintenance tasks performed automatically by Databricks under the hood. The Jobs API list endpoint should also cover DLTs maintenance jobs created by Databricks automatically when delta pipelines are created. There must be a way for knowing which maintenance jobs exist.
06-15-2023 07:36 AM
Hi @Debayan Mukherjee,
Although undocumented, I figured out that the Databricks Jobs API list endpoint has a `job_type` parameter that I can set `MAINTENANCE_PIPELINE` to get the DLTs maintenance jobs. The following command works: `curl -H "Authorization: Bearer $DATABRICKS_AAD_TOKEN" "https://$databricks_host/api/2.1/jobs/list?limit=25&job_type=MAINTENANCE_PIPELINE"`
Please update the Databricks Jobs API documentation!!!
06-15-2023 11:57 PM
Thanks for the confirmation, we are glad that it has been fixed.
06-16-2023 01:38 AM
Hi @Debayan Mukherjee ,
Actually the Databricks Jobs API documentation has not been fixed yet. The parameter `job_type` should be included in the list endpoint request documentation. Please do this in order to avoid unnecessary questions here in the Databricks Community portal.
Thanks!
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.
If there isn’t a group near you, start one and help create a community that brings people together.
Request a New Group