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!

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @racicot

Unfortunately, the dbutils package in Databricks doesn’t directly provide a built-in function for sending email notifications like dbutils.notebook.exit()

You can submit feedback directly to the product team to influence the Databricks product roadmap in the following ways:

  • To quickly submit feedback about your experience with Databricks, fill out the feedback form in your workspace.

  • To interactively contribute to the product roadmap, submit a feature request in the Ideas Portal. You can view, comment, and vote up other users’ requests. You can also monitor the progress of your favourite ideas as the Databricks product team goes through their product planning and development process.

If you have any further questions or need additional assistance, feel free to ask! 😊🚀

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!