CREATE NOTIFICATION INTEGRATION(来自 Google Pub/Sub 主题的入站)

在账户中创建新的通知集成或替换现有集成以便接收来自 Google Pub/Sub 主题的消息。

See also:

ALTER NOTIFICATION INTEGRATION (inbound from a Google Pub/Sub 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 = GCP_PUBSUB
  GCP_PUBSUB_SUBSCRIPTION_NAME = '<subscription_id>'
  [ 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 = GCP_PUBSUB

将 Google Cloud Pub/Sub 指定为第三方云消息队列服务。

GCP_PUBSUB_SUBSCRIPTION_NAME = 'subscription_id'

用于允许 Snowflake 访问事件消息的 Pub/Sub 主题订阅 ID。

Note

一个通知集成支持一个 Google Cloud Pub/Sub 订阅。在多个通知集成中引用相同的 Pub/Sub 订阅可能会导致目标表中缺少数据,因为事件通知在通知集成之间是分开的。

可选参数

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.

使用说明

  • 不支持为多个 Google Cloud Pub/Sub 订阅创建单个通知集成。

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

Notification queue already in use with another integration.
  • Using the same Google Cloud Pub/Sub subscription 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.

  • 云提供商的政府区域不允许向或从其他商业区域发送事件通知。

示例

请参阅以下主题: