SnowPro Advanced: Data Engineer — Question 116
A Data Engineer needs to monitor a continuous data pipeline that is processing data. The data is ingested into Snowflake using a pipe from an Amazon S3 bucket, then it is transformed using a series of tasks and streams. The pipeline provides notifications if there is a failure during data importation.
How should the Engineer add a notification signaling that there is a failure of a task involved with data transformations?
Answer options
- A. Create a queue-type error integration and assign it to this root task: CREATE INTEGRATION my_error_notify TYPE = QUEUE - ENABLED = TRUE - DIRECTION = OUTBOUND - NOTIFICATION-PROVIDER = AWS_SNS - AWS_SNS_TOPIC_ARN = 'arn:aws:sns:us-east-2:111122223333:my_topic' AWS_SNS_ROLE_ARN = 'arn:aws:iam::111122223333:role/error_sns_role'; ALTER TASK order_start SET ERROR_INTEGRATION = my_error_notify;
- B. Create a Snowflake alert and assign it to this root task: CREATE ALERT pipeline_failure - WAREHOUSE = MY_WH - NOTIFY = my_user1, my_user2; ALTER TASK order_start - set ERROR_INTEGRATION = pipeline_failure;
- C. Create an email notification and assign it to this root task: CREATE NOTIFICATION INTEGRATION my_email_notify TYPE = EMAIL - ENABLED = TRUE - DEFAULT RECIPIENTS = ('[email protected]'); ALTER TASK order_start - set NOTIFICATION_INTEGRATION = my_email_notify;
- D. Create a queue notification integration error and assign it to this root task: CREATE NOTIFICATION INTEGRATION mv_error_notify TYPE = QUEUE - ENABLED = TRUE - DIRECTION = OUTBOUND - NOTIFICATION_PROVIDER = AWS_SNS - AWS_SNS_TOPIC_ARN = 'am:aws:sns:us-east-2:111122223333:my_topic' AWS_SNS_ROLE_ARN = 'arn:aws:iam::111122223333:role/error sns role'; ALTER TASK order_start SET ERROR_INTEGRATION = my_error_notify;
Correct answer: D
Explanation
The correct answer is D because it correctly sets up a queue notification integration that can signal errors during task execution in Snowflake. Options A, B, and C do not implement the required error notification mechanism effectively, as they either focus on different types of notifications or configurations not specifically designed for task failures.