โ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