- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 09:06 AM - edited 02-27-2025 09:06 AM
So you could do this via the api and combine with alerts. The challenge is obtaining the query_ids needed to create the notification and the notification destinations themselves - it would go something like this -
- Save your queries as actual "queries" in Databricks
- Create a table storing your metadata, so the query display name, email recipients, a column for the trigger column and a column for the query_id
- Use the notification_destination api, iterate through your table and create a destination per email in your table
- Use the queries api, iterate through the queries you own using
- Now you've got your query_ids and notification defined, you can then iterate through your table to create your actual alerts, passing through your destinations and queries that you've now defined, there's an example here
Might sound a bit clunky - if you're happy to wait i'm building a POC for a customer as we speak doing this very thing, if you're happy to wait a few days i'll share the final code here 🙂