- Categories:
User & Security DDL (Third-Party Service Integrations)
CREATE NOTIFICATION INTEGRATION¶
Creates a new notification integration in the account or replaces an existing integration. A notification integration is a Snowflake object that provides an interface between Snowflake and third-party cloud message queuing services.
In this Topic:
Features¶
Notification integrations are integral to the following features per cloud storage service:
- Amazon Web Services (AWS)
Push notifications:
- Google Cloud (GCP)
Automated data loads or metadata refreshes:
Push notifications:
- Microsoft Azure (Azure)
Automated data loads or metadata refreshes:
Push notifications:
Syntax¶
Automated data loads or metadata refreshes
CREATE [ OR REPLACE ] NOTIFICATION INTEGRATION [IF NOT EXISTS]
<name>
ENABLED = { TRUE | FALSE }
TYPE = QUEUE
cloudProviderParamsAuto
[ COMMENT = '<string_literal>' ]
Push notifications
CREATE [ OR REPLACE ] NOTIFICATION INTEGRATION [IF NOT EXISTS]
<name>
ENABLED = { TRUE | FALSE }
DIRECTION = OUTBOUND
TYPE = QUEUE
cloudProviderParamsPush
[ COMMENT = '<string_literal>' ]
Where:
cloudProviderParamsAuto (for Google Cloud Storage) ::= NOTIFICATION_PROVIDER = GCP_PUBSUB GCP_PUBSUB_SUBSCRIPTION_NAME = '<subscription_id>'cloudProviderParamsAuto (for Microsoft Azure storage) ::= NOTIFICATION_PROVIDER = AZURE_EVENT_GRID AZURE_STORAGE_QUEUE_PRIMARY_URI = '<queue_URL>' AZURE_TENANT_ID = '<directory_ID>';cloudProviderParamsPush (for Amazon SNS) ::= NOTIFICATION_PROVIDER = AWS_SNS AWS_SNS_TOPIC_ARN = '<topic_arn>' AWS_SNS_ROLE_ARN = '<iam_role_arn>'cloudProviderParamsPush (for Google Pub/Sub) ::= NOTIFICATION_PROVIDER = GCP_PUBSUB GCP_PUBSUB_TOPIC_NAME = '<topic_id>'cloudProviderParamsPush (for Microsoft Azure Event Grid) ::= NOTIFICATION_PROVIDER = AZURE_EVENT_GRID AZURE_EVENT_GRID_TOPIC_ENDPOINT = '<event_grid_topic_endpoint>' AZURE_TENANT_ID = '<directory_ID>';
Required Parameters¶
name
String that specifies the identifier (i.e. name) for the integration; must be unique in your account.
In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g.
"My object"
). Identifiers enclosed in double quotes are also case-sensitive.For more details, see Identifier Requirements.
ENABLED = TRUE | FALSE
Specifies whether to initiate operation of the integration or suspend it.
TRUE
enables the integration.FALSE
disables the integration for maintenance. Any integration between Snowflake and a third-party service fails to work.
TYPE = QUEUE
Specify the type of integration:
QUEUE
: Creates an interface between Snowflake and a third-party cloud message queuing service.
Optional Parameters¶
DIRECTION = OUTBOUND
Direction of the cloud messaging with respect to Snowflake. Required only when configuring push notifications to a cloud messaging service.
OUTBOUND
: Specifies that Snowflake produces the notification sent to the cloud messaging service.
Cloud Provider Parameters for Automated Data Loads or Metadata Refreshes (cloudProviderParamsAuto
)¶
Google Cloud Storage
NOTIFICATION_PROVIDER = GCP_PUBSUB
Specifies Google Cloud Pub/Sub as the third-party cloud message queuing service.
GCP_PUBSUB_SUBSCRIPTION_NAME = '<subscription_id>'
Pub/Sub topic subscription ID used to allow Snowflake access to event messages.
Microsoft Azure storage
NOTIFICATION_PROVIDER = AZURE_EVENT_GRID
Specifies Microsoft Azure Event Grid as the third-party cloud message queuing service.
AZURE_STORAGE_QUEUE_PRIMARY_URI = 'https://storage_queue_account.queue.core.windows.net/storage_queue_name'
Specifies the queue ID for the Azure Queue Storage queue created for Event Grid notifications.
Note
An Azure Queue Storage queue supports a single notification integration. Referencing a single storage queue in multiple notification integrations can result in missing data in target tables because event notifications are split between notification integrations.
AZURE_TENANT_ID = 'ad_directory_id'
Specifies the ID of the Azure Active Directory tenant used for identity management. This ID is needed to generate the consent URL that grants Snowflake access to the Event Grid notification subscription.
Cloud Provider Parameters for Push Notifications (cloudProviderParamsPush
)¶
Amazon Simple Notification Service
NOTIFICATION_PROVIDER = AWS_SNS
Specifies Amazon Simple Notification Service (SNS) as the third-party cloud message queuing service.
AWS_SNS_TOPIC_ARN = '<topic_arn>'
Amazon Resource Name (ARN) of the Amazon SNS (SNS) topic to which notifications are pushed.
AWS_SNS_ROLE_ARN = '<iam_role_arn>'
ARN of the IAM role that has permissions to publish messages to the SNS topic.
Google Pub/Sub
NOTIFICATION_PROVIDER = GCP_PUBSUB
Specifies Google Cloud Pub/Sub as the third-party cloud message queuing service.
GCP_PUBSUB_TOPIC_NAME = '<topic_id>'
Identification of the Pub/Sub topic to which Snowpipe pushes notifications.
Microsoft Azure Event Grid
NOTIFICATION_PROVIDER = AZURE_EVENT_GRID
Specifies Microsoft Azure Event Grid as the third-party cloud message queuing service.
AZURE_EVENT_GRID_TOPIC_ENDPOINT = '<event_grid_topic_endpoint>'
Event Grid topic endpoint to which Snowpipe pushes notifications.
AZURE_TENANT_ID = 'ad_directory_id'
ID of the Azure Active Directory tenant used for identity management. This ID is needed to generate the consent URL that grants Snowflake access to the Event Grid topic.
Optional Parameters¶
COMMENT = 'string_literal'
String (literal) that specifies a comment for the integration.
Default: No value
Access Control Requirements¶
A role used to execute this SQL command must have the following privileges at a minimum:
Privilege |
Object |
Notes |
---|---|---|
CREATE INTEGRATION |
Account |
Only the ACCOUNTADMIN role has this privilege by default. The privilege can be granted to additional roles as needed. |
For instructions on creating a custom role with a specified set of privileges, see Creating Custom Roles.
For general information about roles and privilege grants for performing SQL actions on securable objects, see Access Control in Snowflake.
Usage Notes¶
Creating a single notification integration for multiple Microsoft Azure storage queues or Google Cloud Pub/Sub subscriptions is not supported.
Regarding metadata:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata Fields in Snowflake.