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! 😊🚀

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