Tasks & Transactions: Snowflake SnowPro Core Certification
Seventeenth Chapter: Tasks & Transactions in Snowflake
We are coming to the end of the Snowflake SnowPro Core course, but we can’t forget about Tasks and Transactions in Snowflake, which will allow us to extend the functionality of our favorite Cloud Data Warehouse. Let’s get to it!
Remember that all the chapters from the course can be found in the following link:
Road to SnowFlake SnowPro Core Certification: Complete Course
An overview for the SnowFlake SnowPro Core Certification preparation course, the data-warehousing platform built for…
INTRODUCTION TO TASKS
Snowflake tasks are schedulable scripts that are run inside your Snowflake environment. No event source can trigger a task; instead, a task runs on a schedule, which can be defined when creating a task, and they run with the privileges of the task owner. A task can execute a single SQL statement, including a call to a Stored Procedure. This last part is important and usually appears in the Snowflake SnowPro Core Exam.
Snowflake ensures only one instance of a task with a schedule is executed at a given time. If a task is still running when the next scheduled execution time occurs, that scheduled time is skipped. Imagine that we have a task that it’s executed every 5 minutes. If the first execution hasn’t finished by the time the second one should start, Snowflake will skip the second one. Tasks also have a maximum duration of 60 minutes by default. If they haven’t finished by then, they will be automatically terminated.
You can also specify a CRON expression and time zone for periodically running a scheduled task. When you first create a task, it will be suspended by default. You can…