Provider-run analysis

The default clean room configuration enables only the consumer to run an analysis in the clean room. However, the provider can request permission from the consumer to run templates using consumer data in a specific clean room. Provider-run analysis can be enabled and run using either the clean rooms UI or code.

Note

There are two ways for a provider to run an analysis in a clean room: as a standard template, that returns results with each query, and as an activation, which saves results to a file in the provider’s account. If you need to persist the data either for yourself or for export to a third party, or to refine results against a large dataset, it’s generally best to activate results to your account. If you want to re-run a template with new parameters or data, and don’t need to persist the results, using the standard provider-run queries described here is the right course.

Supported templates

Provider-run analysis is enabled at the template level within a given clean room. The following templates support provider-run analyses:

  • Overlap & Segmentation Analysis

  • SQL Query (UI only)

  • Custom templates (API only)

Billing details

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.

A consumer can estimate the number of credits consumed by the provider within the last N days by executing the following query, specifying the number of previous days as a negative number:

-- 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.

Implementing provider-run analyses

Important

If the consumer and provider are in different cloud regions, you need to enable Cross-cloud auto-fulfillment in both accounts and for both clean rooms.

Here are the steps to enable provider-run analysis in a new clean room:

  1. The provider creates and configures a clean room, using one of the supported templates.

  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.

Language: English