自動複製の設定¶
ここでは、セキュアシェアデータ製品およびアプリケーションパッケージデータ製品のクロスクラウド自動フルフィルメントのセットアップ方法について説明します。また、リストにオブジェクトレベルの自動フルフィルメントをセットする方法についても説明します。
自動複製を設定する前に、データ製品をリストに追加する必要があります。また、自動フルフィルメントのセットアップ手順は、提供するデータ製品やリストの可用性によって異なります。
オブジェクトレベルの自動複製の設定¶
自動フルフィルメントを設定して、リストに関連付けられたデータ製品を自動的に他のSnowflakeリージョンに転送することができます。SUB_DATABASE 自動フルフィルメントを使用して、データ製品のテーブルとビューのみを自動フルフィルメントを使用してリモートリージョンにフルフィルメントするように選択することもできます。これにより、自動フルフィルメントデータ製品のコストを削減し、管理負担を軽減することができます。
以下の手順では、リストにオブジェクトレベルの自動フルフィルメントをセットする方法を説明します。一般的なワークフローの一環として、リージョンの可用性をセットアップするとき (Snowflake Marketplace に公開されたリストの場合)、または別のリージョンにいるコンシューマーを追加するとき(非公開で共有されたリストの場合)に、オブジェクトレベルの自動フルフィルメントを設定します。
リストを作成。新規リストの作成 を参照してください。
サポートされているオブジェクトのみを含むデータ製品を追加します。
共有するリージョンまたはアカウントを設定し、自動フルフィルメントの設定を開始します。
Snowflake Marketplace に公開されるリストの場合:
Region Availability セクションを見つけて、 Add を選択します。
Region availability の場合、デフォルトの All regions のままにするか、 Custom regions を選択します
非公開で共有されるリストについては、リモートリージョンのコンシューマーアカウントを追加します。
リモートリージョンのデータ更新間隔を選択します。
リストを公開するか、ドラフトとして保存します。
Set up auto-fulfillment for a listing that spans databases¶
Providers can create a single listing that spans databases, eliminating the need to create one combined database per listing. In this case, all listings associated with a database are auto-fulfilled together.
Workflow¶
A provider has a database (main database) that they want to share. They also have views in that database that reference objects in another database (referenced database).
The provider creates a share in the main database.
Using GRANT <権限> ... TO SHARE, the provider grants the following required privileges to the share:
The provider grants the USAGE privilege on the main database that contains the view to the share.
The provider grants the REFERENCE_USAGE privilege on the referenced database to the share.
The provider grants the USAGE privilege on the schema that contains the view to the share.
The provider grants the SELECT privilege on the view to the share.
The provider creates a listing with the share and enables auto-fulfillment for cross-region cross-cloud consumers.
For more information, see 複数データベースからのデータの共有.
Supported reference types¶
When REFERENCE_USAGE is granted on a database to a share, the following reference types are supported:
A view referencing a table or view in another database.
Tables or views with policies when these policies are stored in another database.
Tables or views with tags when these tags are stored in another database.
注釈
A tag without an attached policy in a different database will only be replicated if reference usage is granted. Otherwise, replication will be skipped. See GRANT <権限> ... TO SHARE for more information. If the tag is used in tag-based masking, then the share is treated as a table or view with row-access policies.
Limitations¶
Snowflake groups listings together when refreshing the data. Setting up listings that span multiple databases can change the way listings are grouped. As a result, the following might be affected:
The listing refresh history can be missing or incorrect after update the auto-fulfillment schedule.
Setting the
refresh_schedule_overrideoption may be required. When this option is missing, a resulting error message will include the list of listings that were affected by the change in the order that the listings were grouped.
Usage notes¶
When setting up auto-fulfillment, if the selected and referenced databases include existing listings, then the values in the Data product refresh section default to the existing refresh schedule. As a result, changes to the auto-fulfillment refresh schedule apply to all other listings associated with this database and with the referenced database.
Examples¶
For examples on how to create a secure view that references objects and other views in one or more databases, see the Share data from multiple databases examples.
After you create a secure view, you can create a listing that includes the secure view and set up auto-fulfillment on the listing. For examples on how to create listings on the Snowflake Marketplace, see Create and publish a listing.