列表的自动履行
如果您是提供商,则可以对列表使用 Cross-Cloud Auto-Fulfillment(自动履行)来自动将您的数据产品复制到其他 Snowflake 区域,而无需手动复制数据。
当为列表启用自动履行时,Snowflake 会根据需要自动将您的数据产品履行到使用者区域。数据产品是附加到您的列表中的任何共享或应用程序包。
通过使用自动履行,您可以避免手动复制数据产品和批准列表请求,从而帮助使用者更快地访问您的列表。
Note
Using Cross-Cloud Auto-Fulfillment in a Snowflake Native App with Snowpark Container Services is only supported on Amazon Web Services (AWS) and Microsoft Azure. See Understand limitations in the Snowflake Native App Framework for more information.
了解自动履行
Note
自动履行不适用于试用账户。自动履行是在列表上配置的,要提供列表,您必须使用完整账户。
自动履行让您可以根据您为列表选择的可用性和访问选项在任何受支持的 Snowflake 区域提供数据产品,而无需手动复制数据。
当列表处于草稿或已发布状态时,您可以配置和启用自动履行。当为列表启用自动履行时,Snowflake 会根据需要自动将列表的产品履行到相应的区域。
您如何在其他区域提供数据产品取决于您的数据产品以及使用者如何访问您的列表:
- 如果您的数据产品是应用程序包,请使用自动履行功能在其他区域提供数据产品。
- 如果您的数据产品是共享,则可在大多数情况下使用自动履行:
- For free or limited trial listings on the Snowflake Marketplace, you can use Cross-Cloud Auto-Fulfillment or manually replicate the data.
- 对于付费列表,您可以使用自动履行。
- For all listings shared with specific consumer accounts, Snowsight automatically detects whether or not the target account is in a different region and enables auto-fulfillment. You cannot manually replicate private listings to other regions.
When you make a data product available in other regions, you incur additional costs. See Auto-fulfillment costs.
自动履行的工作原理
作为提供商,您为列表设置 Cross-Cloud Auto-Fulfillment 后,Snowflake 会管理 安全共享区 (SSA) 的配置以及将数据产品自动履行到远程区域。SSA 由 Snowflake 管理。如果您的数据产品已经存在于远程区域,则该区域的使用者可以立即获取数据产品。
每个列表都有关联的数据产品(共享或应用程序包)。该数据产品包含来自一个或多个数据库的对象以及应用程序包的应用程序逻辑。您的数据产品自动履行到远程区域的确切时间取决于您提供列表的方式:
- 在指定的使用者获得您的列表后,私密列表会自动履行。
- Public listing shared on Snowflake Marketplace are auto-fulfilled after a consumer in the specific region gets the listing.
当您的数据产品首次自动履行到新区域时,它将被转移到该区域的 SSA。自动履行功能可通过 SUB_DATABASE 或 SUB_DATABASE_WITH_REFERENCE_USAGE 设置进行配置。
- SUB_DATABASE 允许按需提供所选对象。
- SUB_DATABASE_WITH_REFERENCE_USAGE 为应用程序包提供账户级计划。
Note
为自动履约刷新类型指定 FULL_DATABASE 的设置已弃用。
多个列表可以使用同一数据库,但该数据库仅自动履行到新区域一次。
Note
对于 Business Critical Edition (BCE),共享数据的处理不同于高安全性部署(如 VPS)。虽然 BCE 不需要为每个区域创建单独的 SSA,但它强制执行严格的数据安全性,并遵守 Tri-Secret Secure 加密等功能。
对于 Virtual Private Snowflake (VPS) 和政府特定的 Snowflake 环境等部署,每个部署都有一个单独的安全共享区 (SSA)。这可确保自动履行始终符合这些环境特有的严格安全和数据隔离要求。
自动履行如何刷新数据
当您为列表设置自动履行时,您可以为数据产品配置刷新间隔。
初次将数据产品自动履行到某个区域的 SSA 后,对数据产品的更改将根据配置的数据刷新从您的账户同步:
| Data refresh type | Description |
|---|---|
| Trigger-based data refresh | Providers can use SYSTEM$TRIGGER_LISTING_REFRESH to trigger an on-demand data refresh, ensuring that consumers receive the most current information. 如果上游提取-转换-加载 (ETL) 管道进程完成,并且您希望在数据准备就绪后触发复制,Snowflake 建议使用基于触发的数据刷新。例如,如果您是向金融机构提供股票分析服务的数据提供商,则可以在上游 ETL 管道中更新新数据集后,立即触发向所有分析师更新,提供新数据集。 注意: 此功能仅在使用 SQL 的情况下可用。 |
| Trigger-based refresh of an application package | If the data product of a listing is an application package, providers can set the SYSTEM$TRIGGER_LISTING_REFRESH to trigger an on-demand refresh of the application package. However, providers must run this function each time the application package needs to be refreshed. To configure the application package to refresh each time the release directive is modified, use the LISTING_AUTO_REFRESH clause of the ALTER APPLICATION PACKAGE command. |
| Interval-based data refresh | 提供商可以为列表的所有使用者建立基于间隔的数据刷新,时间段从 1 分钟到 8 天不等。与数据库关联的每个列表都按相同的刷新间隔运行。 Interval-based data refresh configuration is recommended when you require updates at a predefined cadence. For example, providers who refresh datasets weekly can use interval-based refresh to update their database on the same schedule. Each refresh completion triggers the next refresh according to the cadence. See Set the account-level refresh interval for details. Note: This feature is available using SQL or Provider Studio in Snowsight. |
| Schedule-based data refresh | 提供商可以建立列表的所有使用者的数据刷新时间戳和计划。每个使用数据库的列表都将遵循相同的刷新计划。 对于需要按照特定时间戳和计划进行列表更新的用例,建议使用基于计划的数据刷新。例如,需要为所有使用者提供刷新时间的可预测时间戳的数据提供商。 Interval-based and scheduled-based data refreshes cannot be used simultaneously. If both are set up, one will override the other. For example, if a cron expression is set up for a scheduled refresh that already has a refresh interval, it will be overridden to support scheduled refresh. See `auto_fulfillment` for details. Note: This feature is available using SQL or Provider Studio in Snowsight. |
将数据产品视为共享与应用程序包
当您为列表设置自动履行时,您提供的数据产品将决定您如何设置数据刷新。
- If your data product is a share, set a data refresh when you configure auto-fulfillment for a listing. The data refresh applies to the database associated with the listing. If multiple listings share objects from that database, they share the same data refresh type and schedule/interval.
- 如果您的数据产品是应用程序包,可以在账户级别设置数据刷新,该刷新适用于您账户中可用的每个应用程序包。
自动履行的注意事项
当您对列表使用自动履行功能时,请考虑以下事项:
-
Snowflake 支持使用多个同名数据库。自动履行会在目标区域创建一个安全共享区域 (SSA) 账户,而 SSA 不能有两个同名的数据库。因此,如果您的源账户中有两个或更多同名数据库,则自动履行将在数据库名称后面附加一个唯一的前缀,以避免 SSA 账户中出现冲突。例如,想象一下以下场景:
- 一个组织有两个账户,即生产账户和开发账户。
- Production and dev each have a database named
AnyCompanyData.
Because the destination will always have one SSA account with two databases, auto-fulfillment will append a prefix to the duplicate database name, resulting in two databases:
AnyCompanyDataandPrefixXXXXX_AnyCompanyData. -
If you signed up for Snowflake using AWS Marketplace, Google Cloud Marketplace, or Azure Marketplace, you can only create accounts and SSAs in those clouds. Fulfilling listings to regions outside of your current cloud service region will fail.
-
Depending on the size of your data product, it can take some time for the data product to be available to the consumer. The size of your data product can also affect the cost of auto-fulfillment. See Auto-fulfillment costs for details about cost.
-
默认情况下,使用对象级模式 (SUB_DATABASE)。
-
(Deprecated) If a listing uses objects that are located in a database that’s already in full database mode (FULL_DATABASE), a warning displays in Snowsight and the database remains in full database mode.
-
Snowflake 会整理列表自动履行的刷新历史记录,并每天针对列表刷新失败的情况发送电子邮件。这些邮件会发送到列表上指定的电子邮件地址。
-
如果提供商的标签包含 账户 级别的掩码策略,则自动履行功能在自动履行数据产品时不会考虑该掩码策略。对于自动履行,共享范围是数据库、架构和表级别,但不是账户级别。
-
Auto-fulfillment enforces a 10TB limit on the size of the data product. For more information, refer to the The database is larger than 10 terabytes troubleshooting topic. After assessing the cost implications, you can contact Snowflake Support to increase the size limit.