Data Governance · Topic 7 of 7
Snowflake Data Clean Rooms
Share data with Snowflake Data Clean Rooms: collaborations, owner, provider and runner roles, templates, data offerings, the Snowsight UI and the API.
- 4 min
- A collaboration has an owner, data providers and analysis runners; the runner pays.
- Resources: data offerings, Jinja SQL templates and code specs, registered first and then linked.
- Snowsight Data Clean Rooms section for create, join, manage and run; the Collaboration API for automation.
What it is
A data clean room lets two or more parties analyze combined data without either side seeing the other's raw rows. A retailer and an advertiser can ask "how many customers overlap" and get a count, not a customer list.
Snowflake Data Clean Rooms is built on Snowflake, and the current model is a collaboration. A collaboration is a shared space where each party registers data and approved analyses, and everyone agrees to the rules before anything runs.
How it works
Roles in a collaboration
| Role | What it does |
|---|---|
| Owner | Creates the collaboration, assigns roles, can tear it down. Only one owner. Has no run privileges by default |
| Data provider | Supplies data offerings, and chooses which analysis runners may use them |
| Analysis runner | Runs approved templates on approved data offerings, and pays for the analysis compute |
One collaborator can hold several roles, except that only one collaborator is the owner.
Building blocks
| Resource | Meaning |
|---|---|
| Data offering | A live view of provider tables, with a specification of which columns are exposed and which policies apply |
| Template | A Jinja SQL query that analysis runners execute, with values passed at run time |
| Code spec | Custom Python functions or procedures that templates can call |
How they connect:
- You first register resources, then link them into a collaboration.
- Resources are versioned, but a collaboration itself is not versioned.
- Providers see which templates may run on their data, and runners cannot run anything outside the approved templates.
- Data stays in each party's account, and the runner receives only the template's result.
- Results are returned to the runner, or activated to a collaborator's account. Activating results to another Snowflake account needs Enterprise edition.
Editions and limits
- Data providers need Enterprise edition or higher to share data with policy enforcement.
- Owners and analysis runners can use Standard edition.
- Cross-cloud collaborations need Cross-Cloud Auto-Fulfillment enabled before joining.
- Trial accounts and government or VPS deployments do not support clean rooms.
Clean room UI
The Snowsight interface for clean rooms (the Data Clean Rooms section) is where you do the day to day work.
- Create a collaboration, name it, and invite collaborators with their roles.
- Join a collaboration after reviewing its specification. Everyone, including the owner, must join before their resources become usable.
- Manage data offerings and templates, and edit a collaboration to change collaborators, roles or linked resources.
- Run analyses by choosing a template, supplying run time values and viewing results.
- View activity to see who joined, who ran what and when.
The UI covers the same collaboration model as the code, so a clean room built in Snowsight can also be managed through the API.
Snowflake developer APIs
The programmatic interface is the Collaboration API, a set of SQL stored procedures, with a schema reference in the documentation. Use it to automate what the UI does.
| Procedure | Purpose |
|---|---|
EDIT | Change collaborators, roles or linked resources |
GET_STATUS | Check the join or leave status of a collaborator |
LEAVE | A non-owner leaves the collaboration |
TEARDOWN | The owner deletes the collaboration |
The API is the right tool for repeatable setup, CI pipelines and many collaborations. The UI is the right tool for one off collaborations and for business users.
Template logic is Jinja SQL, so one template can take parameters such as a date range or a join column chosen at run time.
Clean rooms limit what others see, but a template is code. Review every template before agreeing to the collaboration, because it defines exactly what is computed over your data.
When to choose a clean room
| Scenario | Fit |
|---|---|
| Overlap or measurement between two companies without exposing customer lists | Clean room |
| Give a partner read access to a table | Secure Data Sharing |
| Publish a dataset to many consumers | Marketplace listing |
| Limit analysts in your own account to summaries | Aggregation policy |
Common mistakes
Calling a clean room the same as a share. A share exposes data, while a clean room exposes only approved results.
Expecting the owner to run analyses. The owner role has no run privileges unless it also holds the runner role.
Forgetting to join. Resources do not work until every collaborator, including the owner, has joined.
Ignoring who pays. The analysis runner pays for the compute.
What to remember for the exam
- A collaboration has an owner, data providers and analysis runners; the runner pays.
- Resources: data offerings, Jinja SQL templates and code specs, registered first and then linked.
- Snowsight Data Clean Rooms section for create, join, manage and run; the Collaboration API for automation.
- Providers need Enterprise edition; cross-cloud needs Cross-Cloud Auto-Fulfillment.
Check yourself
Which role pays for the compute of a clean room analysis?
The analysis runner.
What is a template in a clean room?
A Jinja SQL query that analysis runners execute on approved data offerings.
What must happen before a collaborator's data offerings can be used?
Every collaborator, including the owner, must join the collaboration.
Topic 7 of 7 in Data Governance
Test yourself on Data Governance
The full Snowflake DEA-C02 question bank has 709 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.