Registering data¶

This topic describes how to register data so that it can be linked into a Snowflake Data Clean Room.

Supported objects¶

The following object types can be linked into clean rooms:

Note

†External and Iceberg tables must be enabled before they can be used in a clean room.

Registering data objects¶

Before users can link data into a Snowflake Data Clean Room, the data must first be registered. Registering data grants USAGE and SELECT privileges on the object to SAMOOHA_APP_ROLE, which is used by the clean room environment to access data. If you register a database or schema, all of the child objects are registered as well. You must have MANAGE GRANTS privilege on an object to be able to link it.

You can register databases, schemas, and objects using the clean room UI or the clean room API. Using the clean room UI is simpler, but requires that you have the ACCOUNTADMIN role. Using the developer APIs, you can register any object on which you have OWNERSHIP privilege without using the ACCOUNTADMIN role.

Important

Registering a database or schema does not register objects added after the registration. You must either register the new object individually or use the clean room UI to navigate to Admin > Snowflake Admin > Database Registration and select Resync.

You can link only data registered by your account. That is, a provider can’t link data registered by the consumer and a consumer can’t link data registered by the provider. Once data is linked into a clean room, it can be accessed by anyone with access to the clean room, subject to the linking party’s settings (such as join and column policies).

Follow the steps below to register a database, schema, or object using the clean room UI:

  1. Sign in to the clean room UI as an account administrator and then take one of the following steps:

    • If using a managed account, select Admin > My Account.

    • If using a Snowflake account, select Admin > Snowflake Admin and sign in to Snowflake as a user with the ACCOUNTADMIN role.

  2. Select Admin > Snowflake Admin.

  3. Select Log in to Snowflake, and authenticate as a user with the ACCOUNTADMIN role.

  4. To enable external or Iceberg tables in the account, enable the External & Iceberg Tables toggle.

  5. In the Access management for Snowflake objects section, select Edit, and then select the database, schema, or object to make its data linkable by users in this account.

  6. Select Save.

Unregistering data objects¶

Once a table is linked into a clean room, it cannot be removed. However, you can unregister the object in the account, which will remove access by any clean rooms in that account.

If you want to remove data from a clean room or account, don’t simply delete the underlying object; this will cause the clean room to fail. Instead, use one of the following techniques to unregister the object.

When you unregister an object from an account, you should also update any clean rooms you created that used this data.

Queries by any collaborators that depend on deleted data will fail the next time they are run.

To unregister an object in an account:

  1. Sign in to the clean room UI as an account administrator and then take one of the following steps:

    • If using a managed account, select Admin > My Account.

    • If using a Snowflake account, select Admin > Snowflake Admin and sign in to Snowflake as a user with the ACCOUNTADMIN role.

  2. Select Admin > Snowflake Admin.

  3. Select Log in to Snowflake, and authenticate as a user with the ACCOUNTADMIN role.

  4. To enable external or Iceberg tables in the account, enable the External & Iceberg Tables toggle.

  5. In the Access management for Snowflake objects section, select Edit, and then deselect the database, schema, or object to make its data unavailable to users in this account.

  6. Select Save.

  7. Update any clean rooms you created that depend on this data.

Enabling external and Apache Iceberg™ tables¶

To allow external tables and Iceberg tables to be linked into a clean room, the account must first be configured to enable use of external and Iceberg tables. After external and Iceberg tables are enabled, they can be registered, linked, and used the same as any other tables.

The process for enabling external and Iceberg tables varies, depending on whether you are managing the clean room using the clean room UI or the clean room API.

External and Iceberg table requirements¶

  • Both the provider and consumer accounts must enable external and Iceberg tables to allow full usage of a clean room that links in external or Iceberg tables.

  • Providers must always enable external tables and Iceberg tables when sharing a clean room with a managed account. This is because managed accounts always use external tables.

  • If the provider and consumer are in different regions, only the consumer can link external or Iceberg tables into a clean room.

The clean room UI controls external and Iceberg tables at the account level.

Warning

If the consumer account has not enabled this feature, consumers will be blocked from joining any clean rooms that link in external or Iceberg tables, or will be prevented from editing (but can still run) any already joined clean rooms that link in either type of table.

A DCR administrator in both the provider and consumer accounts must take the following steps:

  1. Sign in to the clean room UI as an account administrator and then take one of the following steps:

    • If using a managed account, select Admin > My Account.

    • If using a Snowflake account, select Admin > Snowflake Admin and sign in to Snowflake as a user with the ACCOUNTADMIN role.

  2. Enable the External & Iceberg Tables toggle. This enables the feature in both UI-created and API-created clean rooms.

  3. External and Iceberg tables are now selectable in the administrator’s Access management for Snowflake objects panel, where they can be selected to make them available to clean rooms, the same as any other objects.