0

Can anyone provide use-case on new notification integration of type email

I wanted to implement this feature in snowpipe and task but i got error

"MY_EMAIL_INT" is a notification integration of type email which i have created 1

but when i used this integration on snowpipe parameter "Error_Integration = MY_EMAIL_INT" i got an error saying "SQL compilation error: Integration 'MY_EMAIL_INT' is not a notification integration."

Similarly in Task, when I used email type notification integration in error_integration parameter of task " SQL compilation error: Integration 'ERROR_INTEG' is not a valid notification integration for UserTasks."

  • 2
    Please update your question with what you’ve managed to achieve so far e.g. the definition of your notification object and how you are using it. When you followed the instructions here (https://docs.snowflake.com/en/user-guide/email-stored-procedures) what issues did you have? – NickW Apr 02 '23 at 14:39
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 02 '23 at 19:45
  • Pease don’t link to images, add all information to your question as editable text. Please show the DDL for your integration object, the DDL for the task and the DDL for the Snowpipe – NickW Apr 03 '23 at 07:05

1 Answers1

0

You're getting an error because you're trying to use the wrong feature for the scope.

You want to push error notifications for Snowpipe, therefore you need to create a push notification and not an email one, something like this example:

CREATE [ OR REPLACE ] NOTIFICATION INTEGRATION [IF NOT EXISTS]
  <name>
  ENABLED = { TRUE | FALSE }
  DIRECTION = OUTBOUND
  TYPE = QUEUE
  cloudProviderParamsPush
  [ COMMENT = '<string_literal>' ]

Check the distinction between push notifications versus email notifications on this link.

If you want an email notification, that can only work in a task when called like a stored procedure, something like this:

CALL SYSTEM$SEND_EMAIL(
    'my_email_int',
    'person1@example.com, person2@example.com',
    'Email Alert: Task A has finished.',
    'Task A has successfully finished.\nStart Time: 10:10:32\nEnd Time: 12:15:45\nTotal Records Processed: 115678'
);
Sergiu
  • 4,039
  • 1
  • 13
  • 21