Data Sharing and Snowflake Marketplace · Topic 6 of 10
Inbound Data Shares and Installing Snowflake Data Clean Rooms
Import and maintain inbound data shares, then configure Snowflake Data Clean Rooms by installing the clean room native app and its API as ACCOUNTADMIN.
- 5 min
- Inbound:
CREATE DATABASE ... FROM SHAREneedsIMPORT SHARE; one database per share; read only; grantIMPORTED PRIVILEGES. - Shared data is live and uncopied; to keep history, copy it with
CREATE TABLE AS SELECT. - Clean rooms use collaborations with owner, data provider and analysis runner roles.
What it is
An inbound share is a share that another account created for you. You turn it into a read only database in your account, give roles access to it, and keep it working over time.
A Snowflake Data Clean Room is a different way to collaborate. Two or more parties analyze combined data under agreed rules, and no party sees the other's raw rows. Clean rooms are delivered as a Snowflake Native App, so the first job of the administrator is to install it.
How it works
Import and maintain inbound shares
SHOW SHARES lists inbound shares and shows the provider and the database name if one exists. Importing needs the IMPORT SHARE privilege (or ACCOUNTADMIN) plus CREATE DATABASE.
SHOW SHARES;
CREATE DATABASE partner_sales FROM SHARE myorg.provider_acct.sales_share;
GRANT IMPORTED PRIVILEGES ON DATABASE partner_sales TO ROLE analyst;
| Fact | Detail |
|---|---|
| Databases per share | One database per share |
| Access | Read only; no insert, update, delete or changes to the shared objects |
| Cost | No storage cost for shared data; queries use your own warehouse |
| Freshness | Live; changes by the provider are visible at once |
| Time Travel and clone | Not available on shared data |
| Re-share | A database from a share cannot be shared again by direct share |
| Roles | Grant IMPORTED PRIVILEGES, or grant the shared database roles the provider offers |
Maintenance tasks:
- Keep a copy when you need history or your own transformations. Create a table from a query (
CREATE TABLE ... AS SELECT) in your own database. The copy then costs storage and is no longer live. - Remove access to provider data by revoking
IMPORTED PRIVILEGESor by dropping the database. - If the provider drops or revokes the share, queries fail. Check
SHOW SHARESand ask the provider. - Provider objects change. Secure views and functions may change behind the share. Test the jobs that depend on them.
- Shared database roles. When the provider shares database roles, grant each one to your own roles. This segments access.
IMPORTED PRIVILEGES is the single grant that opens a whole shared database to a role. A role without it cannot query the database or the objects in it.
Configure and manage Snowflake Data Clean Rooms
A clean room is built around a collaboration. A collaboration is defined by a specification that lists who takes part and in which role.
| Role in a collaboration | What it does |
|---|---|
| Owner | Creates the collaboration, assigns roles, can remove it; one owner |
| Data provider | Supplies the data offerings, such as tables and views |
| Analysis runner | Runs approved templates on approved data offerings |
One participant can hold more than one role. Every collaborator except the owner reviews the collaboration before joining. Data is analyzed only with approved templates, and results are returned under the agreed policies.
Availability and edition facts as the docs state them:
- Generally available in specific regions on AWS, Azure and Google Cloud; not available in government regions or Virtual Private Snowflake.
- Standard Edition or higher can create a collaboration or join as an analysis runner. Enterprise Edition or higher is needed to join as a data provider or to activate results.
- Reader accounts are not supported.
- Collaborators in other cloud regions need Cross-Cloud Auto-Fulfillment enabled.
Install the clean room native app
The installer works in the account that will take part and uses ACCOUNTADMIN.
Prerequisites:
- The account has accepted the data sharing terms (contact Snowflake Support if it has not).
DEFAULT_DDL_COLLATIONis not set, andQUOTED_IDENTIFIERS_IGNORE_CASEisFALSE.- The installing user has a first name, last name and verified email on the user object.
Steps:
- As
ACCOUNTADMIN, install Snowflake Data Clean Rooms from the Snowflake Marketplace, open it and accept the defaults. This takes several minutes. - In Snowsight, open the installed app and use Open in Worksheet to run the commands that install the clean rooms API. This also takes several minutes.
- Check the install: use
SAMOOHA_APP_ROLEand callCHECK_MOUNT_STATUS()in theSAMOOHA_BY_SNOWFLAKE_LOCAL_DB.LIBRARYschema.FALSEmeans the mount did not finish, so confirm the role and retry asACCOUNTADMIN.
The environment is installed for the whole account, but nobody can use it until an administrator grants access (next page).
If you use the optional DRY_RUN review of the API script, do not run the installation script it prints by hand; that can leave the install incomplete.
Common mistakes
Querying a shared database without IMPORTED PRIVILEGES. The role gets an error or sees nothing.
Expecting a second database from the same share. Only one is allowed.
Trying to clone or time travel shared data. Not supported; copy it first.
Installing as a role other than ACCOUNTADMIN. The install needs it.
Starting a clean room on a reader account. It is not supported.
What to remember for the exam
- Inbound:
CREATE DATABASE ... FROM SHAREneedsIMPORT SHARE; one database per share; read only; grantIMPORTED PRIVILEGES. - Shared data is live and uncopied; to keep history, copy it with
CREATE TABLE AS SELECT. - Clean rooms use collaborations with owner, data provider and analysis runner roles.
- Install from the Marketplace as
ACCOUNTADMIN, run the API script, verify withCHECK_MOUNT_STATUS(). - Data providers in a clean room need Enterprise Edition or higher.
Check yourself
Which privilege is needed to create a database from a share?
IMPORT SHAREtogether withCREATE DATABASE, or theACCOUNTADMINrole.Who must install the clean room app?
A user with
ACCOUNTADMIN, with a verified email on the user.Which clean room role needs Enterprise Edition or higher?
The data provider.
Topic 6 of 10 in Data Sharing and Snowflake Marketplace
Test yourself on Data Sharing and Snowflake Marketplace
The full Snowflake ADA-C02 question bank has 814 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.