โ08-05-2024 10:53 AM
What is the best way to promote Databricks objects from one workspace to another? For example, DABs are great for code and models. However, SQL alerts do not seem to fall into DABs. The API allows for retrieving queries and creating them via API in the new workspace, but when creating alerts on the queries, there appears to be no programmatic way to schedule them. Am I missing something?
โ08-05-2024 05:07 PM
Alerts are available as an object under the SQL task in a Workflow/job using DAB. I also see from the docs that creating and maintaining alerts via the API is still in Public Preview. So, I'd be sure to wait until GA prior to using it in production.
Create a new job | Jobs API | REST API reference | Azure Databricks
โ08-06-2024 11:57 AM
I see. So, a SQL task can be an alert that is scheduled in a workflow using DABs. Thank you
โ08-05-2024 06:18 PM
We can leverage open source tools like https://github.com/prometheus/alertmanager#amtool to interact with alert manager.
โ08-05-2024 06:22 PM
https://docs.databricks.com/api/workspace/queries
https://docs.databricks.com/en/sql/dbsql-api-latest.html#changes-to-the-alerts-api
The API path is now api/2.0/sql/alerts
, replacing the legacy path of /api/2.0/preview/sql/alerts
.
https://docs.databricks.com/api/workspace/permissions
I believe this is what you are look for?
โ08-06-2024 11:55 AM
Sadly, no. The API does not have the ability to schedule the alerts.
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