Snowflake Data Clean Rooms: Administrator tasks

This topic describes the tasks for the administrator of a Snowflake Data Clean Room. For information about implementing a clean environment for the first time, see Get started with Snowflake Data Clean Rooms.

Add collaborators

A clean room user who has the Admin role must define someone as a collaborator before other users can share a clean room with that collaborator.

Note

If a Snowflake customer has an account in a different region than your Snowflake account, your account administrator must enable Cross-Cloud Auto-Fulfillment before you can add them as a collaborator. For more information, including the limitations of collaborating with customers in other regions, see Enable collaboration with consumers in different regions.

To add someone as collaborator within a clean room environment, follow these steps:

  1. Navigate to the Snowflake Data Clean Rooms login page.

  2. Log in as a clean room administrator. You do not need to have the ACCOUNTADMIN role in Snowflake.

  3. In the left navigation, select Collaborators.

  4. Do one of the following:

    • If the collaborator has a Snowflake account, select Snowflake Partners » + Snowflake Partner. Respond to the prompts to enter the details of the collaborator’s Snowflake account.

    • If the collaborator is not a Snowflake customer, select the Managed Accounts tab to create a clean room managed account for them.

Add users

The process of adding clean room users depends on whether they are using the web app or developer APIs to work with the Snowflake Data Clean Room.

Web app:

To allow users to access the web app, follow these steps:

  1. Navigate to the Snowflake Data Clean Rooms login page.

  2. Log in as a clean room administrator. You do not need to have the ACCOUNTADMIN role in Snowflake.

  3. Select User Management » User Management.

  4. Select + Users.

  5. Enter the email address of the new clean room user.

  6. Select the role of the new user.

The new user is sent an email with a link to join the clean room.

Developer APIs:

To allow users to use the developer APIs to programmatically work with clean rooms, follow these steps:

  1. Sign in to the Snowflake account associated with the clean room environment, which is where you installed the Snowflake Native App.

  2. Open a worksheet, and use the ACCOUNTADMIN ROLE to assign the SAMOOHA_APP_ROLE role to the user.

    For example, to allow a user joe to use the developer APIs, execute the following code:

    USE ROLE accountadmin;
    
    GRANT ROLE samooha_app_role TO USER joe;
    
    Copy

Add warehouse options

Any warehouse for which the SAMOOHA_APP_ROLE role has usage and operate privileges can be used to run analyses. To add warehouses that can be used by clean room users to execute analyses, create a warehouse and then grant privileges on it to the SAMOOHA_APP_ROLE.

For example, to add a warehouse my_big_warehouse that can be used to run analyses, 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

Monitor web app activity

As an administrator, you can track what users are doing in the web app by monitoring the query history in your Snowflake account. You can identify query history entries that correspond to activity in the web app because the value of user_name is the name of the service account user that was created when the Snowflake account was configured.

You can use the user_email query tag to identify which clean room user performed an action.

To access the query history for your clean room environment, do one of the following, depending on whether you want to use SQL or Snowsight:

Snowsight:
  1. Sign in the Snowflake account associated with your clean room environment as a user with the ACCOUNTADMIN role.

  2. Select Monitoring » Query History.

  3. Use the User filter to select the service account user associated with the clean room environment.

SQL:
  • Execute queries against the QUERY_HISTORY view in the ACCOUNT_USAGE schema of the shared SNOWFLAKE database.

    For example, to trace the web app activity of the user joe@company.com, execute the following code:

    SELECT *,
      TRY_PARSE_JSON(query_tag) AS query_tag_details
      FROM snowflake.account_usage.query_history
      WHERE query_tag_details IS NOT NULL
        AND query_tag_details:request_type = 'DCR'
        AND query_tag_details:user_email = 'joe@company.com';
    
    Copy

Monitor provider-run analyses

A provider-run analysis refers to the process of a provider creating and sharing a clean room, then running an analysis in the clean room after the consumer links their data. These analyses run in the consumer’s account, not the provider’s. This section describes how the consumer can track the queries executed by the provider’s analyses in the clean room.

Snowflake Data Clean Rooms assigns a query tag to each query executed for a provider-run analysis. This query tag takes the form cleanroom_UUID_provider_account_locator. A consumer can retrieve all queries associated with provider-run analyses by searching for the query tag in the query history of their account.

To retrieve the query, first obtain the UUID for a clean room, then search for the query tag. In the following code, replace cleanroom_name and provider_account_locator with the appropriate values.

-- Retrieve clean room UUID
SELECT cleanroom_id FROM samooha_by_snowflake_local_db.public.cleanroom_record
  WHERE cleanroom_name = '<cleanroom_name>';

-- Retrieve queries with provider-run query tag
SELECT * FROM snowflake.account_usage.query_history
  WHERE query_tag = cleanroom_id || '<provider_account_locator>;
Copy

You can also use Snowsight to filter the query history by the appropriate query tag after using SQL to retrieve the clean room UUID.

Customize available connectors

Connectors let you integrate your clean room environment with your ecosystem partners. As the clean room administrator for a provider, you can customize the clean room environment to limit which connectors appear as options for the clean room user. For example, if you have a single preferred activation partner, you can configure the clean room environment so that the partner is the only option when a consumer activates the results of an analysis in a clean room.

Note

Your customizations apply to new clean rooms only.

To control which connectors are available in a clean room:

  1. Sign in to the web app.

  2. In the left navigation, select Admin » Profile & Features.

  3. Optional: To customize activation connectors, follow these steps:

    1. On the Activation tile, select Edit.

    2. Select which activation options you want to display, and then select Save.

  4. Optional: To customize identity and data provider connectors, follow these steps:

    1. On the Identity & Data Provider tile, select Edit.

    2. Select which identity options you want to display, and then select Save.

Brand your clean rooms

You can configure a profile for your clean room environment so every clean room created is branded with your logo and company name. To define the logo and name for your company, complete these steps:

  1. Sign in to the web app.

  2. In the left navigation, select Admin » Profile & Features.

  3. In the Company profile section, do the following:

    1. Upload a logo for your company in JPG or PNG format. This logo will appear on every clean room that is created.

    2. Edit the Company Name to define the name that you want to appear on the clean rooms that are created in your environment.

Enable single sign-on (SSO)

Your clean room environment can be configured so users authenticate using your own identity provider via single sign-on (SSO). To enable SSO, contact Snowflake Support.