SnowPro Advanced: Data Engineer — Question 77
A Data Engineer needs to configure a task in Snowflake to automatically send error notifications in case of a data loading failure. The Engineer wants to use an existing task that inserts data into a table every 5 minutes. The Engineer set up a notification integration with Amazon Secure Notification Service (SNS) named my_notification_int.
How should the task be updated to automatically send error notifications if it fails?
Answer options
- A. Add an ALERT clause in the task definition to link it to the notification service.
- B. Add the command: ALTER TASK MYTASK SET ERROR_INTEGRATION = ‘my_notification_int’; to the notification.
- C. Use the NOTIFICATION INTEGRATION = ‘my_notification_int’ parameter in the task configuration.
- D. Add NOTIFICATION_PROVIDER = ‘my_notificacion_int’ to the task schedule.
Correct answer: B
Explanation
The correct answer is B because it directly sets the error integration for the task to the specified notification integration, ensuring that error notifications are sent when the task fails. Options A and C are incorrect as they do not properly configure the error notification settings for the task, and option D contains a typo in the notification provider name, which would prevent proper configuration.