This week we’ll be looking at a feature that has just hit Preview Feature – Open :
Sending Email Notifications.
We’re asking you to use this feature in conjunction with linked tasks to create a very small chain while tackling 2 different subjects.
The Challenge
The assignment for this week is two-fold :
- Create a scheduled task (task #1) that inserts the current timestamp into a table every 5 minutes
- Create a linked task (task #2) that sends an email that confirms the running of task #1 that contains the following information:
“Task has successfully finished on <Account> which is deployed on <region> region at <timestamp>
Remember, if you want to participate:
I feel like my solution to retrieve the message variables from the table with a Stored Procedure isn’t the right way to go about this. Anybody know of a way of passing variables from the output of one task into the another task?
My solution still works though, we just have a Python Stored Procedure grabbing the most recent timestamp from the table after the first task has run.
Interesting one today. Wondering how much people would use the email notification feature.
no dbt, as it would be just passing a long SQL file —
I used the SYSTEM$SET_RETURN_VALUE to configure the value passed to the children tasks — need to wrap that around a begin / end though.
https://github.com/dsmdavid/frostyfridays-sf/blob/main/models/challenge_26_nodbt.sql
I have my inbox flooded with the incoming emails, so it seems to be working — and now it’s a reminder to suspend the parent task!
This seems like a handy feature