Provider-run analysis

默认的 Clean Room 配置仅允许用户在 Clean Room 中进行分析。不过,提供商可以请求使用者允许在特定 Clean Room 中利用使用者数据运行模板。可使用 Clean Room UI 或代码启用和运行由提供商运行的分析。

备注

提供商可以通过两种方法在 Clean Room 中进行分析:作为标准模板,在每次查询时返回结果;另一种是激活,将结果保存到提供商账户中的文件。如果您需要为自己持久保存数据或将数据导出到第三方,或者需要根据大型数据集优化结果,通常最好将 结果激活 到您的账户。如果您想使用新的参数或数据重新运行一个模板,并且不需要保留结果,使用此处描述的标准提供商运行的查询就是正确的做法。

支持的模板

由提供商运行的分析可在给定 Clean Room 的模板级别上启用。以下模板支持由提供商运行的分析:

  • 重叠与分段分析

  • SQL 查询(仅限 UI)

  • 自定义模板(仅限 API)

账单详情

Provider-run analyses are run in the consumer's account, and consumers are billed for a provider-run analysis. To stop incurring additional costs from provider analyses, the consumer must uninstall the clean room.

使用者可以通过执行以下查询来估算提供商在过去 N 天内使用的 Credit,并将之前的天数指定为负数:

-- Estimate the number of credits consumed in the past 5 days.
SELECT * FROM TABLE(SAMOOHA_BY_SNOWFLAKE_LOCAL_DB.LIBRARY.PRA_CONSUMPTION_UDTF(-5));
Copy

Choosing and limiting the warehouse size and type

Clean rooms use auto-scaling logic based on dataset sizes to choose a warehouse for your analysis. However, the provider can explicitly choose a warehouse size using the API.

A consumer can limit the size and type of warehouses available to the provider when running a given template. Limiting warehouse sizes can be done only in the API, not the UI.

实现由提供商运行的分析

重要

如果使用者和提供商位于不同的云区域,则需要在两个账户和两个 Clean Room 中启用 Cross-Cloud Auto-Fulfillment

以下是在新 Clean Room 中启用由提供商运行的分析的步骤:

  1. 提供商使用 支持的模板 之一创建并配置 Clean Room。

  2. In the Share Clean Room step of clean room configuration, the provider turns on Enable run analysis & query next to their own account to enable them to run any templates in this clean room that support provider analysis.

    • This setting cannot be changed after a clean room is created; if you want to change permission for a specific account to run queries in a published clean room, you must delete the clean room and create a new one.

  3. The consumer joins and configures the clean room as normal for all templates in the clean room, including any templates that support provider analysis. If the consumer does not want to enable a provider to run a specific template, they can omit required details for that template.

    • When the consumer joins the clean room, they are warned before joining that provider-run analysis is enabled for that clean room.

    • The consumer can run queries as soon as the clean room is joined, but there is a delay of up to 30 minutes before the provider can run the template. This setup delay is only for the initial join step; if the provider later adds other provider-run templates, the provider can run them as soon as the consumer configures their clean room for that template.

  4. The clean room is now available for both provider run (after the initial setup delay) and consumer run (no delay) analyses.

    • The consumer is billed for all analyses in this clean room, whether run by the provider or consumer.

语言: 中文