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:
- Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER‘
- Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
- Post the URL in the comments of the challenge
5 responses to “Week 26 – Intermediate”
-
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.
- Solution URL – https://github.com/ChrisHastieIW/Frosty-Friday
-
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
- Solution URL – https://github.com/apd-jlaird/frosty-friday/blob/main/week_26/ff_week_26.sql
-
It was an interesting challenge. I also used system$send_snowflake_notification() !
- Solution URL – https://github.com/allllllllez/frosty_friday/blob/main/sql/week-26.sq
-
I posted the wrong URL… 🙁
- Solution URL – https://github.com/allllllllez/frosty_friday/blob/main/sql/week-26.sql
Leave a Reply
You must be logged in to post a comment.