CREATE NOTIFICATION INTEGRATION(来自 Azure 事件网格主题的入站)

在账户中创建新的通知集成或替换现有集成以便接收来自 Azure 事件网格主题的消息。

See also:

ALTER NOTIFICATION INTEGRATION (inbound from an Azure Event Grid topic) , DESCRIBE NOTIFICATION INTEGRATION , DROP INTEGRATION , SHOW NOTIFICATION INTEGRATIONS

语法

CREATE [ OR REPLACE ] NOTIFICATION INTEGRATION [ IF NOT EXISTS ] <name>
  ENABLED = { TRUE | FALSE }
  TYPE = QUEUE
  NOTIFICATION_PROVIDER = AZURE_STORAGE_QUEUE
  AZURE_STORAGE_QUEUE_PRIMARY_URI = '<queue_url>'
  AZURE_TENANT_ID = '<ad_directory_id>';
  [ USE_PRIVATELINK_ENDPOINT = { TRUE | FALSE } ]
  [ COMMENT = '<string_literal>' ]

必填参数

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 (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive.

For more information, 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.

The value is case-insensitive.

The default is TRUE.

TYPE = QUEUE

Specifies that this is an integration between Snowflake and a third-party cloud message-queuing service.

NOTIFICATION_PROVIDER = AZURE_STORAGE_QUEUE

将 Microsoft Azure 事件网格指定为第三方云消息队列服务。

AZURE_STORAGE_QUEUE_PRIMARY_URI = 'queue_url

指定为事件网格通知创建的 Azure 队列存储队列的队列 URL。使用以下格式的 URL:

https://storage_queue_account.queue.core.windows.net/storage_queue_name

Note

单个通知集成支持单个 Azure 存储队列。在多个通知集成中引用同一存储队列可能会导致目标表中缺少数据,因为事件通知会在多个通知集成之间拆分。

AZURE_TENANT_ID = 'ad_directory_id'

指定用于身份管理的 Azure Active Directory 租户的 ID。需要此 ID 才能生成允许 Snowflake 访问事件网格通知订阅的同意 URL。

可选参数

USE_PRIVATELINK_ENDPOINT = { TRUE | FALSE }

Specifies whether to use private connectivity. For information about using this parameter, see Private connectivity to external stages and Snowpipe automation for Microsoft Azure.

COMMENT = 'string_literal'

String (literal) that specifies a comment for the integration.

Default: No value

访问控制要求

A role used to execute this operation must have the following privileges at a minimum:

权限对象备注
CREATE INTEGRATION账户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 Overview of Access Control.

使用说明

  • 不支持为多个 Microsoft Azure 存储队列创建单个通知集成。

使用与另一个通知集成具有相同队列 URL 的通知集成创建新管道时,管道创建会失败并显示错误:

Notification queue already in use with another integration.
  • Using the same Microsoft Azure Storage queue for multiple inbound notification integrations is not supported for automated data loads or metadata refreshes.

  • 关于元数据:

    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.

  • The OR REPLACE and IF NOT EXISTS clauses are mutually exclusive. They can’t both be used in the same statement.
  • CREATE OR REPLACE <object> statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.

示例

请参阅以下主题: