SnowPro Advanced: Architect — Question 155
Three tables (A, B and C) are loaded with an INSERT statement. Each INSERT statement is executed by a separate Snowflake task: TASK_A, TASK_B, or TASK_C. All tasks are scheduled for a daily execution at the same time. TASK_C has the longest average execution duration.
How can an Architect create an aggregated data object based on a join of tables A, B and C?
Answer options
- A. Create a materialized view based on a join of tables A, B and C.
- B. Create a task, TASK_D, to join tables A, B and C and INSERT the data into a target table. Set the predecessor of TASK_D to TASK_C.
- C. Create a task, TASK_D, to join tables A, B and C and INSERT the data into a target table. Set the predecessor of TASK_D to TASK_A, TASK_B, and TASK_C.
- D. Create a materialized view based on a join of tables A, B and C. Create TASK_D to execute a refresh of the materialized view once each hour.
Correct answer: C
Explanation
The correct answer is C because it ensures that TASK_D waits for all preceding tasks, TASK_A, TASK_B, and TASK_C, to complete before executing the join operation. This is essential since TASK_C has the longest execution time, and not accounting for it could lead to incomplete data. Options A, B, and D do not account for the dependencies needed to ensure that all data is ready for aggregation.