cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a personalized message to email.

EcuaCrisCar
New Contributor III

Greetings community, I am new to using databricks and for some time I have tried some scripts in notebook. I would like your help on a task: Carry out a personalized mailing where,

First, a query of the number of records in the test table is performed, the notebook should be executed if it meets the range of 80,000 to 90,000 records, otherwise the notebook should not be executed.

Second, the result of that must notify by mail the current amount of that table and details of why the notebook was not executed.

Third, the message that is sent to the mail must be from the user who runs the notebook and send to corresponding senders.

I really wanted to try it with notifications or alerts but I have not achieved the expected result.

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @EcuaCrisCar

  • To query the number of records in your test table, you can use SQL or DataFrame APIs in Databricks.
  • Next, you’ll need to check if the record count falls within the specified range (80,000 to 90,000). If it does, proceed with the notebook execution; otherwise, skip it.
  • To send an email notification, you can use Databricks’ built-in email notifications.
  • To customize the email content, you can include additional information in the email body. 
  • If you encounter any issues or need further 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