Working with Snowflake Data Clean Rooms in the web app¶

The web app of a Snowflake Data Clean Room provides an intuitive UI that allows business users to create and use clean rooms without worrying about code complexities.

This topic provides an introduction to tasks that you complete as you work with a clean room. It describes the actions of the provider who creates and shares a clean room along with the consumer who uses that clean room.

Create a clean room as a provider¶

The Clean Rooms page in the web app lets you, as a provider, manage the lifecycle of a clean room, including creating and sharing. To create and share a clean room:

  1. Sign in to your clean room environment in the web app.

  2. In the left navigation, select Clean Rooms.

  3. Select + Clean Room. The creation process contains 4 steps:

    1. Use the Add Data step to name the clean room and select the tables that are being shared with the consumer.

    2. Use the Specify Join Policies step to enhance your data with 3rd-party data and select which columns the consumer can join on.

    3. Use the Configure Analysis & Query step to define which analyses the consumer can execute in the clean room, and select the tables and columns that they can use in their analysis.

    4. Use the Share Clean Room step to invite consumers to use the clean room to collaborate. You can also use the Enable Run Analysis & Query option to specify which collaborators can run analyses in the clean room.

Run an analysis as a provider¶

A provider can configure a clean room so they can run their own analyses in the clean room. When setting up a clean room to run provider analyses, the provider can specify whether the consumer can also run analyses in the clean room. If the provider specifies that consumers cannot run analyses, the consumers act solely as data providers in the clean room.

Providers use the Enable Run Analysis & Query option during the Share Clean Room stage of creating a clean room to specify who can run an analysis. To configure the clean room so the provider can run an analysis, the provider turns on this option for their own account, which is listed along with the consumers.

When the provider wants to run an analysis, they can do one of the following:

  • Select Clean Rooms from the left navigation, find the tile for the clean room on the Created tab, and select Run.

  • Select Analyses & Queries from the left navigation, and run an existing analysis or create a new one just like a consumer would.

For both methods of starting an analysis, the provider can select which collaborator has the data that they want to include in their analysis.

Important

If a consumer allows a provider to run an analysis on a template, the consumer, not the provider, is charged for the credits consumed by the provider’s analysis. After the consumer has allowed the provider to run analyses, the consumer must uninstall the clean room to stop incurring costs.

If a consumer wants to obtain an estimate of the number of credits consumed by the provider within a specific time period, they can execute the following query, where -5 returns an estimate of the previous 5 days of compute consumption by the provider:

SELECT * FROM table(samooha_by_snowflake_local_db_dev.public.udtf(-5));
Copy

Limitations on provider-run analyses¶

When using the web app to run an analysis, the provider has the following limitations:

  • Not all templates are supported. Currently, the Audience Overlap & Segmentation and SQL Query templates are supported.

  • If the collaborators are in different clouds or regions:

    • Consumers must enable cross-cloud auto-fulfillment on their account.

    • Results for a provider-run analysis are returned based on the combined refresh frequency between both parties. Providers and consumers should coordinate so the refresh frequency of the provider application and the consumer listing are similar (for example, both have a frequency of 15 minutes). This ensures that results are returned promptly.

  • Consumer preview values for filters do not appear on the provider’s Run page.

Install a clean room as a consumer¶

The Clean Rooms page in the web app lets you, as a consumer, install clean rooms that have been shared with you by a provider. To install a clean room:

  1. Sign in to your clean room environment in the web app.

  2. In the left navigation, select Clean Rooms.

  3. On the Invited tab, find the clean room and select Join.

  4. Select the tables that you want to use to collaborate with the provider’s data.

  5. Use the Join Policies field to define the relationship between your data and the provider’s data.

  6. Select Next.

Run an analysis as a consumer¶

As a consumer, you can use either the Clean Rooms page or the Analyses & Queries page to run analyses in an installed clean room.

To use the Clean Rooms page to run a new analysis based on the types of analyses that the provider has made available in the clean room:

  1. Sign in to your clean room environment in the web app.

  2. In the left navigation, select Clean Rooms.

  3. On the Joined tab, find the clean room in the list and select Run.

  4. Select the analysis type, and then select Proceed.

  5. Add filters to the analysis, and then select Run.

  6. Optional: Expand the Save Analysis & Query section to save the analysis for future use.

To use the Analyses & Queries page to run existing analyses or create and run a new analysis:

  1. Sign in to your clean room environment in the web app.

  2. In the left navigation, select Analyses & Queries.

  3. Do one of the following:

    • To run an existing analysis, use the filters to find the analysis and run it.

    • To create and run a new analysis based on the types of analyses that the provider has made available in the clean room, select + New Analysis & Query.

Select a warehouse for an analysis¶

You can select which warehouse you want to use to run an analysis. Increasing the size or changing the type of the warehouse can speed up the analysis.

The option to select a different warehouse appears next to the Run button on a template. This option does not appear for all templates.

Be aware that increasing the size of a warehouse or using a Snowpark-optimized warehouse can increase the cost of running the analysis. For information about how credit consumption grows as you use a larger warehouse, see Warehouse size and Billing for Snowpark-optimized warehouses.

Default warehouses¶

Snowflake Data Clean Rooms provide the following default warehouses:

Warehouse name

Type

Size

DCR_WH_SMALL

Regular

SMALL

DCR_WH_Medium

Regular

MEDIUM

DCR_WH_Large

Regular

LARGE

DCR_WH_XLarge

Regular

XLARGE

DCR_WH_2XLARGE

Regular

XXLARGE

DCR_WH_4XLarge

Regular

X4LARGE

DCR_WH_OPT_XLarge

Snowpark-Optimized

XLARGE

DCR_WH_OPT_2XLarge

Snowpark-Optimized

XXLARGE

DCR_WH_OPT_4XLarge

Snowpark-Optimized

X4LARGE

Add warehouse options¶

Your administrator can create additional warehouses for you to use. Any warehouse for which the SAMOOHA_APP_ROLE role has usage and operate privileges can be used to run analyses.

For example, to add a warehouse my_big_warehouse to the options that appear in the clean room, your administrator can execute the following commands from a worksheet:

USE ROLE ACCOUNTADMIN;

CREATE WAREHOUSE my_big_warehouse WITH WAREHOUSE_SIZE = X5LARGE;
GRANT USAGE, OPERATE ON WAREHOUSE my_big_warehouse TO ROLE SAMOOHA_APP_ROLE;
Copy

Activate results back to the provider¶

Some types of analyses allow consumers to activate results by pushing them back to the provider. This section provides instructions to both the consumer who is activating the results and the provider who is viewing those results in their Snowflake account.

Consumer

To activate results back to the provider, complete these steps:

  1. After running the analysis, select Activate in the Results section.

  2. Select the name of the provider account.

  3. Select Push Data.

Provider

Important

If this is the first time the consumer is pushing activation data to you as the provider, it might take up to 24 hours after you sign in to your clean room environment for the data to show up in your Snowflake account. Subsequent activations do not experience this delay.

To view the activation data using a SQL query or using the database object explorer in Snowsight:

  1. Sign in to Snowsight for your provider account. You are signing in to the Snowflake account, not the clean room environment.

  2. In the left navigation, select Data » Database.

  3. Navigate to SAMOOHA_BY_SNOWFLAKE_LOCAL_DB » PUBLIC » Tables » PROVIDER_ACTIVATION_SUMMARY.

  4. Select Data Preview.

Download and share results¶

A user who wants to share the aggregate results they generated within the clean room can download the results of the clean room analysis as a .csv file, and then share these results with others outside of Snowflake, including sharing with a clean room collaborator via email.