cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Shutdown Cluster in script if there is any failure

sahesh1320
New Contributor

I am working on incremental load from sql server to Delta lake tables stored in ADLS gen2. DUring the script i need to qrite a logic to

  • Shut down the DB cluster on failure (there needs to be logging added to ensure that shutdown happens promptly to prevent guardrail violations). 

What is the optimal way to achieve this?

1 REPLY 1

Wojciech_BUK
Contributor III

If you run your notebook via workflow and error happen and there are no retires on job, then job cluster will be terminated immidietly after failure.

You can add python block of try catch and if error occurs , you catch the error and log somewhere before job will be terminated 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.