A Snowflake user wants to design a series of transformations that need to be executed in a specific order, on a given schedule.
What Snowflake objects should be used?
Correct Answer: B
* Tasks in Snowflake are used to create workflows or schedules for executing SQL statements, including transformations, in a specific order.
* By defining dependencies between tasks, users can ensure they execute in a defined sequence.
* Example:
sql
CopyEdit
CREATE TASK task_1
SCHEDULE = '5 MINUTE'
AS
INSERT INTO transformed_table SELECT * FROM raw_table;
CREATE TASK task_2
AFTER task_1
AS
DELETE FROM raw_table WHERE processed = TRUE;
* Tasks can also run on a fixed schedule or be triggered by preceding tasks in a chain.
Why Other Options Are Incorrect:
* A. Pipes: Automates data loading but does not handle transformation workflows.
* C. Streams: Tracks table changes but does not schedule or sequence transformations.
* D. Sequences: Generate unique numbers, unrelated to task scheduling or transformations.
References:
* Snowflake Tasks Documentation