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.

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¶

Consumers are billed for any provider-run analyses in a clean room. 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

Implementing provider-run analyses¶

Permission to run queries in a clean room are managed in the clean rooms UI using the Enable run analysis & query toggle in the Share clean room panel in the clean room’s configuration flow. To enable or disable provider-run analyses, the clean room provider enables the toggle next to their own account in that panel. This toggle 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.

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, toggle on Enable run analysis & query next to your account to enable you to run templates that support provider analysis in this clean room.

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

  4. The consumer 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. Note that templates that support provider analysis also support consumer analysis.

  5. After the consumer has joined and configured the clean room, both the provider and the consumer can run templates in the clean room through the normal analysis flow.

  6. Provider-run analysis permissions cannot be revoked after they’re granted. The only way to stop provider-run analyses is for the provider or consumer to delete the clean room.