Snowflake Data Clean Rooms におけるクロスクラウドの自動複製の管理¶
クロスクラウド自動複製について¶
デフォルトのclean room環境では、clean roomは同じクラウドリージョン内のアカウントとしか共有できません。つまり、プロバイダーとコンシューマーは同じクラウドリージョンにいなければなりません。
If you want to collaborate with a collaborator whose account is in a different region than you, you must enable Cross-Cloud Auto-Fulfillment for your clean room environment and your clean room as shown on this page.
自分のクラウドリージョンを定義するには、 SELECT CURRENT_REGION(); を実行します
注釈
クロスクラウド自動複製は*LAF*と呼ばれることがあります。これは、listings auto-fulfillment(リストの自動フルフィルメント) の略です。
クロスクラウド自動複製を有効にする¶
API または UIのいずれかを使用して、クロスクラウド自動複製を有効にすることができます。ただし、クロスリージョンコラボレーションの制限 に注意してください。
前提条件¶
In order to enable Cross-Cloud Auto-Fulfillment for an account, an org admin for all collaborators must first enable it on the account by calling SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT.
詳細は 自動フルフィルメント および 自動フルフィルメント権限の管理 をご参照ください。
Enabling Cross-Cloud Auto-Fulfillment in the UI¶
クリーンルーム管理者は、以下のステップに従って、新規および既存のすべてのクリーンルームに対して、アカウントレベルでのクロスクラウド自動フルフィルメントを有効にします。
管理者アカウントで クリーンルームにサインインします UI。
Admin > Snowflake Admin を閲覧します。
Cross-Cloud Auto-Fulfillment を切り替えます。
:emph:`UI でクリーンルームを作成または結合する ` 場合、プロバイダーまたはコンシューマーは追加の手順を必要としません。ただし、後から :emph:`API でクリーンルームを作成または結合する ` 場合は、プロバイダーおよびコンシューマー向けの API 指示に従う必要があります。
Enabling Cross-Cloud Auto-Fulfillment in the API¶
すでに UI でクロスクラウド自動フルフィルメントを有効にしている場合でも、API でクリーンルームを作成またはインストールするには、こちらの手順に従ってください。
Account administrator actions¶
To enable Cross-Cloud Auto-Fulfillment for an account using the API, administrators in both the provider and consumer accounts must run the following SQL code using the ACCOUNTADMIN role. You need to run this only once per account.
USE ROLE ACCOUNTADMIN;
-- Optionally check first to see if LAF is enabled on the account.
CALL samooha_by_snowflake_local_db.library.is_laf_enabled_on_account();
-- If LAF is not enabled, enable it.
CALL samooha_by_snowflake_local_db.library.enable_laf_on_account();
Provider and consumer actions¶
アカウントでクロスクラウド自動フルフィルメントを有効にした後、クリーンルームの作成またはインストール時にクロスクラウド自動フルフィルメントを有効にする方法は次のとおりです。
**プロバイダー**は
provider.create_or_update_cleanroom_listingを呼び出すことで、通常の方法でクリーンルームを公開します。**コンシューマー**は
consumer.install_cleanroomを呼び出すことで、クリーンルームをインストールします。コンシューマーがプロバイダーとは異なるクラウドリージョンにある場合、consumer.install_cleanroomは失敗し、クロスクラウド自動フルフィルメントの複製がインストール中であるというメッセージが表示されます。**コンシューマー**は成功が返されるまで、
consumer.install_cleanroomを呼び出し続けます。インストールには数分かかります。At this point, the consumer has basic clean room functionality. To support client custom template requests, provider-run analyses, and provider activation, follow this additional step:
The provider calls
provider.mount_request_logs_for_all_consumersuntil the procedure reports success. This means that communication from the consumer to the provider is enabled.
完全な設定コード例:
プロバイダー: プロバイダーは、標準的な方法でclean roomを作成、共有、公開します。
USE WAREHOUSE APP_WH; USE ROLE SAMOOHA_APP_ROLE; SET cleanroom_name = 'LAF example'; SET consumer_locator = '<CONSUMER_LOCATOR>'; SET consumer_account_name = '<CONSUMER_DATA_SHARING_ACCOUNT_ID>'; CALL SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.provider.cleanroom_init($cleanroom_name); CALL SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.provider.set_default_release_directive( $cleanroom_name, 'V1_0', '0'); CALL SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.provider.add_consumers( $cleanroom_name, $consumer_locator, $consumer_account_name); CALL SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.provider.create_or_update_cleanroom_listing($cleanroom_name);
**コンシューマー:**コンシューマーはクリーンルームをインストールします。
USE WAREHOUSE APP_WH; USE ROLE SAMOOHA_APP_ROLE; SET cleanroom_name = 'LAF example'; SET provider_locator = '<PROVIDER_LOCATOR>'; -- Initial call starts the process and returns a cross-cloud/region replication failure. -- Continue to call this procedure until it returns a success message. CALL SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.consumer.install_cleanroom( $cleanroom_name, $provider_locator); -- Continue with standard clean room configuration and use. -- The consumer can run analyses, but client custom templates, provider run, and provider analysis -- aren't supported until the provider takes the action shown in the next step. ...
Provider: After the consumer installs the clean room, the provider must mount the requests share to enable request-based actions between the provider and consumer. Request-based actions include provider requests to run an analysis and consumer requests to add a template to the clean room.
-- Call mount_request_logs_for_all_consumers until it reports success. provider.mount_request_logs_for_all_consumers($cleanroom_name);
プロバイダー/コンシューマー機能がすべて利用可能になりました。
クロスリージョンアカウントのリフレッシュ頻度¶
異なるクラウドリージョン上にある場合のプロバイダーとコンシューマー間のリクエストおよびデータは、複製頻度設定の対象となります。
Requests and data from provider to consumer¶
This includes all data and requests from the provider to the consumer, such as creating or updating a clean room, changing provider data, requests for permission (such as provider-run analyses), and approvals for requests (such as consumer templates).
set_laf_dcr_refresh_schedule を呼び出すことで、プロバイダーをコンシューマーのリフレッシュレートに変更できます。
データ |
Default refresh rate |
|---|---|
以下のようなプロバイダークリーンルームデータ。
|
|
Requests and data from consumer to provider¶
The following table shows the default refresh frequency for data and requests from the consumer to the provider.
You can control the consumer to provider refresh rate for each clean room.
データ |
Default refresh rate |
|---|---|
次のようなリクエスト、承認、および変更。
|
|
プロバイダーのアクティベーションデータ。 |
|
クロスリージョンコラボレーションに関連するコスト¶
コラボレーターが別のリージョンにいる場合、追加費用が発生します。これらのコストがどのように発生するかについて詳しくは、 自動フルフィルメントコスト をご覧ください。
クロスリージョンコラボレーションの制限¶
クロスリージョンのコラボレーションには、以下のような制約があります:
When using the clean rooms UI, you can enable cross-region collaboration with other UI users in the same UI gateway region. For example, accounts in AWS US East (Ohio) can share with accounts in AWS US West (Oregon) because they have the same UI gateway region (AwS US East (N. Virginia). Accounts in AWS US East (Ohio) can't collaborate with accounts on AWS Canada, because they don't share a gateway region. However, any account can be configured for cross-region collaboration when using the API.
プロバイダーは、クリーンルーム内で差分プライバシーを使用することはできません。
クリーンルーム内では、外部テーブルとIcebergテーブルをリンクすることはできません。
コンシューマーが複数プロバイダーの分析を実行することはできません。
アカウントは、複製タイプの競合が発生する可能性があるため、クロスクラウドコラボレーションのシナリオでプロバイダーとコンシューマーの両方として機能することはできません。
クロスリージョンコラボレーションを有効にする際の追加の考慮事項 をご参照ください。