cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Alert ID within job yaml file - different environments

halsgbs
New Contributor

Hi, I am trying to trigger an alert through a job, and the issue I'm experiencing is that we have the same alert name in our dev/test/pre/prod environments but they will all have different alert IDs. And I have to input an alert id within the job yaml file. I tried passing it as a notebook task value and using a notebook to get the alert id from the name but that doesnt work. Is there any other way to use the alert name instead of the alert id or any workaround for this? 

Thanks

1 REPLY 1

Raman_Unifeye
Contributor III

@halsgbs your notebook task workaround failed as Databricks Jobs expect a static alert_id at the time the job is submitted or created, not a dynamic variable evaluated during the run.

The best way to deal with this is Asset Bundle (DAB) where you get this alert-id resolved at deploy-time instead of runtime. Alert ID will remain static for a given environment once it is deployed.

in databricks.yml, use a variable. in your CICD pipeline, use DB-CLI to fetch the ID and then inject that ID into your variable file before running deploy (databricks run deploy)


RG #Driving Business Outcomes with Data Intelligence