Basically I have a databricks notebook which has an if
condition, where if the condition is True
, I wish to send an email to users.
For example:
if ( (df.query('documenttype_id == 20').shape[0] > 0)==True ): True
If the code above evaluates to True
, I wish to send out an email detailing why it is True
etc. Is it possible to do this? I already know how to create Job emails for Successes and Failures, but I'm not sure how to create a Job which will send out an email based on if a value is True or False etc. (Databricks Alerts can't be used by me unfortunately).
EDIT: Sorry I should have been a little clearer, this question is about email creation - how do I send an email using Databricks if the check condition above is True
?