What you will be able to do
- Describe how a Snowflake Data Clean Room supports joint analysis without exposing raw data
- Assign Owner, Data Provider and Analysis Runner roles and know each one's edition requirement
- Sequence the register, create, review and join, link and run workflow of a collaboration
- Generate synthetic data with GENERATE_SYNTHETIC_DATA, including join keys, consistency secrets and the privacy filter
1.Clean rooms: multi-party analysis without exposing raw data
A Snowflake Data Clean Room is a secure, multi-party environment. Collaborators combine and analyze each other's data without exposing the underlying raw data. The principle is analysis without disclosure. Collaborators never query the raw data in the clean room. Analyses run only through approved templates, and results come back as aggregated insights or are activated (saved) to a collaborator's account, as all collaborators decide. Collaborators can review and approve or reject new templates or data sources that others add. The exam guide calls this secure multi-party computation. The Snowflake documentation describes it in terms of templates, policies and approvals, and does not describe a cryptographic protocol, so this lesson does not either.
The collaboration specification gives each collaborator one or more roles. A collaboration has exactly one Owner. The Owner creates the clean room, assigns roles, decides who can share data with whom, and tears the clean room down. Owning a collaboration does not make you an Analysis Runner or a Data Provider. Edition requirements follow the roles. Data Providers need Enterprise Edition, because sharing data with policy enforcement is not possible on Standard Edition. Activating results to another account also needs Enterprise Edition. Trial accounts cannot use clean rooms at all.
| Role | What it does | Minimum edition |
|---|---|---|
| Owner | Creates the collaboration, assigns roles, decides who shares with whom; only one per collaboration | Standard |
| Data Provider | Provides data offerings to selected analysis runners and specifies the Snowflake policies applied to them | Enterprise |
| Analysis Runner | Runs permitted templates on permitted data offerings and pays for the analysis | Standard |
A collaboration holds three kinds of resource. A template is a JinjaSQL query that analysis runners execute. A data offering packages one or more tables and is a live view of the source data, not a snapshot. Its specification controls which columns are exposed and which policies apply. A code spec adds custom Python functions or procedures that templates can call, for example ML models. The specification below shows alice acting as owner, analysis runner and data provider at the same time.
api_version: 2.0.0
spec_type: collaboration
name: basic_collaboration
owner: alice # alice is the collaboration owner.
collaborator_identifier_aliases:
alice: corp1.acct123
bob: corp2.acctxyz
analysis_runners:
alice: # alice is also an analysis runner.
data_providers:
alice: # alice provides data to herself.
data_offerings: # alice provides these data offerings.
- id: alice_data_1
- id: alice_data_2
bob: # bob provides data to alice.
data_offerings: # bob provides this data to alice.
- id: bob_data_1
templates: # alice can use this template with any data she can access.
- id: template1Checkpoint 1 of 5· Match them up
Match each collaboration resource to what it is
Tap a term, then the definition that fits it.
Templates define the allowed analyses. Data offerings define the exposed data and are live, not snapshots. Code specs extend templates with custom logic.
“A data offering is a live view of the source data, not a snapshot”Source: docs.snowflake.com
2.Registering, linking and joining a collaboration
A resource takes two steps to enter a collaboration. Registration is an account-level action. It copies the resource into the clean rooms environment and returns an ID. Resources live in a registry, either the account default (readable by anyone with READ REGISTRY) or a custom registry whose creator controls access. Linking then shares a registered resource with specific collaborators in one collaboration. Resources are versioned and new versions never overwrite old ones, so moving to a new version means linking it and, if you choose, removing the old one. Collaborations are not versioned, and changes to them are not tracked.
Joining a collaboration is a consent gate. Every collaborator must join, including the owner. Everyone except the owner must first review the collaboration, which shows them the specification. Resources you registered cannot be used until you have joined. Collaborators in other regions must enable Cross-Cloud Auto-Fulfillment before they can review and join. After creation, the owner can use EDIT (a preview feature) to add or remove collaborators or change their roles, but the affected collaborators must approve. Many of these actions are asynchronous, so check the state afterwards, for example with GET_STATUS.
Checkpoint 2 of 5· Put it in order
Put the basic clean room workflow in order
- 1.Collaborators link resources into the collaboration according to their roles
- 2.The owner creates the collaboration from its specification
- 3.Invited collaborators review and join the collaboration
- 4.Analysis runners run the templates shared with them on permitted data offerings
- 5.Collaborators register any templates or data offerings for the initial configuration
Resources are registered first so their IDs can go into the specification. The owner then creates the collaboration, others review and join, resources are linked, and analysis runners run templates.
“All collaborators except for the owner must review the collaboration before they can join.”Source: docs.snowflake.com
Checkpoint 3 of 5· Exam question
Which TWO statements about the privacy characteristics of `GENERATE_SYNTHETIC_DATA` are accurate?(Select 2)
Correct answers: A, C — Setting `similarity_filter` to true drops output rows that are too similar to rows in the input data set; String columns whose unique values exceed half of the row count are redacted in the generated output rather than modeled
- A. The optional similarity filter is a privacy control that removes generated rows resembling source rows too closely.
- B. The output has no direct reference or link to any original row; it only reproduces statistical properties.
- C. High-cardinality string columns, such as free-text identifiers, are redacted because modeling them would risk reproducing source values.
- D. Synthetic data generation does not expose an epsilon budget; differential privacy noise is a separate feature, for example in clean rooms.
- E. Synthetic data generation requires Enterprise Edition or higher in addition to accepting the Anaconda terms.
Sources2
3.Synthetic data: sharing the statistics, not the rows
Sometimes even a template-controlled analysis is too much exposure, and the other party only needs data that behaves like yours. SNOWFLAKE.DATA_PRIVACY.GENERATE_SYNTHETIC_DATA learns the statistical distribution of a source table or view and writes an output table with the same column names and types. The output keeps approximate distributions and correlations but has no direct reference or link to any source row. That makes it suitable for sharing or testing data that is too sensitive to hand over. Any user can call the procedure, because the SNOWFLAKE.CORE_VIEWER database role is granted to PUBLIC. The account must accept the Anaconda terms first.
| Column class | Definition | Output |
|---|---|---|
| Statistical | number, boolean, date, time or timestamp | Same type, similar values |
| Categorical string | Unique values fewer than half the row count | Actual values from the source data |
| Non-categorical string | Unique values more than half the row count | Redacted unless an output format is set with the replace option |
For joins, mark every column you will join on as a join key. Within a single run, each source value gets the same artificial value in every table. To keep join keys consistent across separate runs, pass a SYMMETRIC_KEY secret as consistency_secret. This works only for string columns and needs READ or OWNERSHIP on the secret. Setting 'similarity_filter': True drops output rows that are too similar to source rows, based on NNDR and DCR, so the output can have fewer rows. With the filter on, a NULL in any non-string column makes the procedure fail. Limits per call: up to five inputs, each with at least 20 distinct rows, at most 100 columns and at most 14M rows. External, Iceberg and hybrid tables and streams are not supported as inputs.
CALL SNOWFLAKE.DATA_PRIVACY.GENERATE_SYNTHETIC_DATA({
'datasets':[
{
'input_table': 'CLINICAL_DB.PUBLIC.PATIENTS1',
'output_table': 'MY_DB.PUBLIC.PATIENTS1',
'columns': { 'patient_id': {'join_key': TRUE}, 'age':{'join_key': TRUE}}
},
{
'input_table': 'CLINICAL_DB.PUBLIC.PATIENTS2',
'output_table': 'MY_DB.PUBLIC.PATIENTS2',
'columns': { 'patient_id': {'join_key': TRUE}, 'age':{'join_key': TRUE}}
}
],
'replace_output_tables': TRUE
});Checkpoint 4 of 5· Fill the gap
This call must produce patient_id values that join consistently with a table generated in an earlier run. Which option completes it?
CALL SNOWFLAKE.DATA_PRIVACY.GENERATE_SYNTHETIC_DATA({
'datasets':[
{
'input_table': 'CLINICAL_DB.PUBLIC.BASE_TABLE',
'output_table': 'MY_DB.PUBLIC.PATIENTS1',
'columns': { 'patient_id': {'join_key': TRUE}}
}
],
' ? ': SYSTEM$REFERENCE('SECRET', 'MY_CONSISTENCY_SECRET', 'SESSION', 'READ')::STRING,
'replace_output_tables': TRUE
});Without a secret, join keys stay consistent only within a single run. Passing a symmetric key secret as consistency_secret keeps them consistent across runs.
Source: docs.snowflake.comCheckpoint 5 of 5· Check yourself
After enabling 'similarity_filter': True, an engineer finds the synthetic table has fewer rows than the source. What is the explanation?
The privacy filter uses NNDR and DCR to drop output rows that sit too close to real records. A smaller output is expected when the filter is on.
“The privacy filter removes rows from the output table if the rows are too similar to the input data set.”Source: docs.snowflake.com
Sources3
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.The collaboration owner can automatically run analyses and provide data because they created the clean room.Why is that wrong?
The owner role carries no elevated run privileges. Running analyses or providing data requires those roles to be assigned in the specification.
Covered in Clean rooms: multi-party analysis without exposing raw data
2.A Standard Edition account can be a data provider in a clean room as long as it applies policies.Why is that wrong?
Data providers need Enterprise Edition. On Standard Edition you cannot share data through a clean room with policy enforcement.
Covered in Clean rooms: multi-party analysis without exposing raw data
3.Synthetic join keys stay consistent across any number of runs without extra configuration.Why is that wrong?
Without a secret, join keys are consistent only within a single run. Consistency across runs needs a consistency_secret and works only for string columns.
Covered in Synthetic data: sharing the statistics, not the rows
Practise it for real
Generate two synthetic tables whose patient_id values join consistently across separate procedure runs
1.Create a symmetric key secret with CREATE OR REPLACE SECRET my_db.public.my_consistency_secret TYPE=SYMMETRIC_KEY ALGORITHM=GENERIC.
Why: A consistency secret is what keeps join key values consistent across multiple runs.
You should see: The secret exists, and your role holds OWNERSHIP of it, which satisfies the READ or OWNERSHIP requirement.
2.Make sure your role has USAGE on the warehouse, SELECT on the input tables, USAGE on the input and output databases and schemas, and CREATE TABLE on the output schema.
Why: These are the grants the procedure requires. Also check for a FUTURE GRANT of OWNERSHIP on the output schema, which would silently take over ownership of the output tables.
You should see: No privilege errors when you call the procedure.
3.Call GENERATE_SYNTHETIC_DATA on the first source table with patient_id marked as join_key and consistency_secret set to SYSTEM$REFERENCE('SECRET', 'MY_CONSISTENCY_SECRET', 'SESSION', 'READ')::STRING.
Why: Join keys must be designated explicitly, and the secret ties this run's key mapping to later runs.
You should see: An output table with the same column names and types and artificial patient_id values.
4.In a separate call, run the procedure on the second source table with identical join_key settings and the same secret, then join the two output tables on patient_id.
Why: Identical arguments plus the shared secret produce the same artificial value for the same source value.
You should see: The join returns results similar to the same join on the source tables.
Stuck? Get a nudge
If the join returns nothing, check that patient_id is a string column. Multi-run consistency is supported only for string columns.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Analyses run only through templates that collaborators approve”
↩︎ Clean rooms: multi-party analysis without exposing raw data“Collaborators can review and approve or reject the inclusion of new templates or data sources by other collaborators.”
↩︎ Clean rooms: multi-party analysis without exposing raw data - 2.
“A collaboration can have only one owner.”
↩︎ Clean rooms: multi-party analysis without exposing raw data“Template: A JinjaSQL query that analysis runners can execute in the collaboration.”
↩︎ Clean rooms: multi-party analysis without exposing raw data“Linking shares a registered resource with a specific collaboration.”
↩︎ Registering, linking and joining a collaboration“Unlike collaborations, resources are versioned.”
↩︎ Registering, linking and joining a collaboration“they must enable Cross-Cloud Auto-Fulfillment on their account before they can review and join the collaboration”
↩︎ Registering, linking and joining a collaboration“An owner isn’t automatically an analysis runner or a data provider”
↩︎ Exam trap 1“If you use Snowflake Standard Edition, you cannot share data through a data clean room with policy enforcement.”
↩︎ Exam trap 2“A data offering is a live view of the source data, not a snapshot”
↩︎ Checkpoint“All collaborators except for the owner must review the collaboration before they can join.”
↩︎ Checkpoint - 3.
“You can use synthetic data to share or test data that is too sensitive, confidential, or otherwise restricted to share with others.”
↩︎ Synthetic data: sharing the statistics, not the rows“does not have a direct reference or link to any row from the original data”
↩︎ Synthetic data: sharing the statistics, not the rows“You can specify up to five input tables per procedure call.”
↩︎ Synthetic data: sharing the statistics, not the rows“A NULL value in a non-string column will cause the procedure to fail.”
↩︎ Synthetic data: sharing the statistics, not the rows“Multi-run consistency is supported only for string columns.”
↩︎ Exam trap 3“Generated data uses actual values from the source data.”
↩︎ Prediction“The privacy filter removes rows from the output table if the rows are too similar to the input data set.”
↩︎ Checkpoint