0
0
Snowflakecloud~20 mins

Tasks for scheduling SQL in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Snowflake Task Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Task Scheduling Frequency Behavior

You create a Snowflake task with a schedule set to run every 10 minutes. The task runs a SQL statement that inserts data into a table. What happens if the previous run of the task is still executing when the next scheduled time arrives?

AThe new run is skipped and will not start until the next scheduled time after the current run finishes.
BThe new run starts immediately in parallel with the current run.
CThe task scheduler throws an error and disables the task.
DThe new run queues and waits until the current run finishes, then starts immediately.
Attempts:
2 left
💡 Hint

Think about how Snowflake handles overlapping task executions.

Configuration
intermediate
2:00remaining
Correct Syntax for Creating a Scheduled Task

Which of the following SQL statements correctly creates a Snowflake task that runs every hour and executes a simple insert statement?

ACREATE TASK hourly_task WAREHOUSE = mywh SCHEDULE = '1 HOUR' AS INSERT INTO my_table VALUES (CURRENT_TIMESTAMP());
BCREATE TASK hourly_task WAREHOUSE = mywh SCHEDULE = 'USING CRON * * * * * UTC' AS INSERT INTO my_table VALUES (CURRENT_TIMESTAMP());
CCREATE TASK hourly_task WAREHOUSE = mywh SCHEDULE = 'USING CRON 0 0 * * * UTC' AS INSERT INTO my_table VALUES (CURRENT_TIMESTAMP());
DCREATE TASK hourly_task WAREHOUSE = mywh SCHEDULE = 'USING CRON 0 * * * * UTC' AS INSERT INTO my_table VALUES (CURRENT_TIMESTAMP());
Attempts:
2 left
💡 Hint

Check the cron expression for running every hour at minute zero.

Architecture
advanced
3:00remaining
Designing a Task Chain for Data Pipeline

You want to design a Snowflake task chain where Task A loads raw data, Task B transforms it, and Task C aggregates results. Each task should start only after the previous one completes successfully. Which architecture best achieves this?

ACreate three independent scheduled tasks with the same schedule time.
BCreate one task that runs all three SQL statements sequentially in a single script.
CCreate Task A with a schedule, then create Task B and Task C as tasks triggered by the completion of the previous task.
DCreate Task A with a schedule, and Task B and Task C scheduled with a delay to allow previous tasks to finish.
Attempts:
2 left
💡 Hint

Think about how Snowflake tasks can trigger other tasks.

security
advanced
2:00remaining
Task Execution Permissions

Which role must own a Snowflake task to ensure it can execute SQL statements that modify tables in a specific schema?

AThe role that owns the task must have EXECUTE privilege on the task only.
BThe role that owns the task must have OWNERSHIP on the target schema and tables.
CAny role with USAGE privilege on the warehouse only.
DAny role with SELECT privilege on the tables.
Attempts:
2 left
💡 Hint

Consider what privileges are needed to modify data in tables.

Best Practice
expert
3:00remaining
Handling Task Failures Gracefully

You have a critical Snowflake task that runs daily to update reports. Sometimes it fails due to transient errors like network issues. What is the best practice to ensure the task recovers and completes successfully without manual intervention?

AConfigure the task with a retry mechanism using a separate monitoring script to rerun failed tasks.
BCreate a task chain with a downstream task that checks the previous task's success and reruns it if failed.
CUse a task with a schedule and a conditional SQL statement that retries the operation internally on failure.
DManually monitor the task daily and rerun it if it fails.
Attempts:
2 left
💡 Hint

Think about automation and monitoring outside the task itself.