Recall & Review
beginner
What is a Task in Snowflake?
A Task in Snowflake is a way to schedule and automate SQL statements to run at specific times or intervals without manual intervention.
Click to reveal answer
beginner
How do you create a simple recurring Task in Snowflake?
Use the CREATE TASK statement with a schedule clause, for example: CREATE TASK my_task WAREHOUSE = my_wh SCHEDULE = 'USING CRON 0 * * * * UTC' AS SELECT CURRENT_TIMESTAMP(); This runs every hour.
Click to reveal answer
intermediate
What is the purpose of the WAREHOUSE parameter in a Snowflake Task?
The WAREHOUSE parameter specifies which compute resource runs the SQL statements of the Task. Snowflake automatically resumes the warehouse if it is suspended.
Click to reveal answer
beginner
How can you enable or disable a Task in Snowflake?
Use ALTER TASK <task_name> RESUME; to enable and ALTER TASK <task_name> SUSPEND; to disable the Task.
Click to reveal answer
intermediate
What happens if a Task's SQL statement fails during execution?
The Task logs the failure in the TASK_HISTORY view. The Task will try to run again at the next scheduled time. Failures do not stop future executions automatically.
Click to reveal answer
Which Snowflake object is used to schedule SQL statements automatically?
✗ Incorrect
Tasks are designed to schedule and automate SQL statements in Snowflake.
What is required for a Task to run its SQL statements?
✗ Incorrect
A Warehouse must be specified in the Task; Snowflake automatically resumes it if suspended.
How do you stop a Task from running temporarily?
✗ Incorrect
SUSPEND pauses the Task without deleting it.
Which schedule format can be used in Snowflake Tasks?
✗ Incorrect
Snowflake Tasks support CRON expressions for scheduling.
Where can you find the history of Task executions and errors?
✗ Incorrect
TASK_HISTORY shows execution details and errors for Tasks.
Explain how to create, enable, and schedule a Task in Snowflake.
Think about the SQL commands and parameters needed.
You got /4 concepts.
Describe what happens when a Task fails and how to monitor its execution.
Consider error handling and monitoring tools.
You got /3 concepts.