Complete the code to create a task that runs every hour.
CREATE OR REPLACE TASK hourly_task WAREHOUSE = my_warehouse SCHEDULE = '[1]' AS CALL my_procedure();
The schedule '1 HOUR' makes the task run every hour.
Complete the code to set a task dependency on another task.
CREATE OR REPLACE TASK dependent_task
WAREHOUSE = my_warehouse
AFTER [1]
AS
CALL another_procedure();The AFTER clause specifies the task that must complete before this one runs. 'hourly_task' is the correct dependency.
Fix the error in the task creation by completing the missing clause.
CREATE OR REPLACE TASK my_task
WAREHOUSE = my_warehouse
[1]
AS
CALL my_procedure();The SCHEDULE clause is required for standalone tasks without an AFTER clause. '1 DAY' schedules the task to run daily.
Fill both blanks to create a task tree where task_b runs after task_a and task_c runs after task_b.
CREATE OR REPLACE TASK task_b WAREHOUSE = my_warehouse AFTER [1] AS CALL procedure_b(); CREATE OR REPLACE TASK task_c WAREHOUSE = my_warehouse AFTER [2] AS CALL procedure_c();
task_b depends on task_a, and task_c depends on task_b, forming a chain.
Fill all three blanks to create a task that runs every day, depends on task_x, and calls the correct procedure.
CREATE OR REPLACE TASK daily_task WAREHOUSE = [1] SCHEDULE = [2] AFTER [3] AS CALL daily_procedure();
The warehouse is 'my_warehouse', schedule is '1 DAY' for daily runs, and the task depends on 'task_x'.