cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional email notification based on if statement - dbutils

racicot
New Contributor

Is it possible to trigger an email notification based on a conditional statement in Python without exiting the process?

Specifically, I have a robustness check in my prediction pipeline that performs simple imputation when encountering missing data. This check is very rarely needed, but it becomes necessary when a new entity is forecasted and one of the input tables hasn't been updated properly. In those instances, I much rather using an imputing strategy than breaking the whole pipeline but I want to be alerted when this occurs so I can investigate and update the problematic data if necessary.

I know this can be achieved by writing a function to send an email, with a separate job or with many other ways but I'm wondering if there's a way to do this using the dbutils package, similar to dbutils.notebook.exit(). Is there a function that inherits the job notification parameters that we could leverage to send this information? I feel like this would be much cleaner, but let me know if you see an issue with this practice. 

Thanks for your time!

0 REPLIES 0

Connect with Databricks Users in Your Area

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