CertSafari
    Snowflake SnowPro Advanced: Security Engineer (SEA-C01)· Lessons

    Domain 2 · Lesson 6/21

    Snowflake Data Clean Rooms and synthetic data generation

    Manage and audit Secure Data Sharing and collaborations.

    14 min read
    4.29% of exam
    3 sources
    Published 20 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Tell a clean room collaboration apart from a share or listing, and assign owner, data provider and analysis runner roles
    • Walk through registering, linking and joining resources in a collaboration, including cross-region requirements
    • Generate synthetic data with GENERATE_SYNTHETIC_DATA within its input limits and privilege requirements
    • Keep synthetic join keys consistent across tables and runs, and apply the similarity filter

    1.What a clean room adds beyond a share

    A share or listing lets the consumer query the shared data directly. A Snowflake Data Clean Room does not. Collaborators combine their data inside a secure environment, and analyses run only through templates that other collaborators have reviewed and approved. Results come back as aggregated insights, or are activated (saved) to a chosen collaborator's account. The party sharing data decides which analyses can touch it. Use a clean room when two companies want overlap or attribution numbers and neither may see the other's rows.

    Each collaboration is defined in a YAML specification that assigns roles. One collaborator can hold several roles, and every role except owner can go to several collaborators.

    Collaboration roles in a Snowflake Data Clean Room
    RoleWhat it can doEdition
    OwnerCreates the collaboration, assigns roles, decides who shares with whom, tears it down; only one per collaboration and no elevated run privilegesStandard Edition is enough
    Data providerOffers data offerings to named analysis runners and specifies the policies that applyEnterprise Edition required
    Analysis runnerRuns permitted templates on permitted data offerings and pays for the analysisStandard Edition is enough

    Being the owner does not make a collaborator a data provider or an analysis runner. Those roles have to be assigned in the spec like any other. Edition matters too. A Standard Edition account cannot share data through a clean room with policy enforcement, but it can use other collaborators' data offerings. Activating results into another Snowflake account requires Enterprise Edition. Trial accounts cannot use clean rooms.

    The advanced privacy controls live in the data offering. A data offering is a live view of the provider's tables, not a snapshot. Its specification sets which columns are exposed and which Snowflake policies apply. These are the same projection, aggregation and differential privacy controls covered in Projection, aggregation and differential privacy policies with privacy budgets. Templates are JinjaSQL queries. Code specs add custom Python functions or procedures that templates can call.

    Checkpoint 1 of 7· Match them up

    Match each clean room collaboration role to what it can do

    Tap a term, then the definition that fits it.

    Sources12

    2.Registering, linking and joining a collaboration

    Every resource goes through two steps before a collaboration can use it. Registration is an account-level action: it packages and copies a template, data offering or code spec into the clean rooms environment and returns an ID. The resource goes into a registry, either the account's default registry, readable by anyone with READ REGISTRY, or a custom registry whose creator controls access. Linking then shares that registered resource with specific collaborators in one specific collaboration. You link either by listing the resource in the creation spec or by calling the Collaboration API later.

    Start of a two-party collaboration spec: alice owns it and provides data both to itself and to bobyaml
    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: template1

    The full lifecycle runs in this order:

    1. The owner, and any collaborators it asks, register the resources they want in the initial configuration and share the resource IDs.
    2. The owner creates the collaboration from the spec, and it becomes visible to every collaborator listed. A collaborator in another cloud region must first enable Cross-Cloud Auto-Fulfillment on its account.
    3. Each collaborator other than the owner reviews the spec. Reviewing is what exposes the spec to the invitee.
    4. Every collaborator joins, the owner included. Resources a collaborator registered stay unusable until that collaborator has joined.
    5. Data providers link offerings to their analysis runners, and any role can propose templates. Analysis runners then run the templates shared with them and pay for those runs.

    Auditing a collaboration needs care, because most changes are asynchronous. GET_STATUS reports where you stand (invited, joining or joined), and the matching procedure confirms whether a link or an activation has taken effect. Resources are versioned: a new version does not overwrite the old one, so you remove the old version from the collaboration yourself. The collaboration itself is not versioned, so adding or removing resources leaves no change history. Changes to collaborators or roles go through EDIT, a preview feature, and need approval from the collaborators they affect.

    Checkpoint 2 of 7· Check yourself

    Before the collaboration was created, bob registered bob_data_1, and alice listed it in her creation spec. Bob has reviewed the collaboration but has not joined it yet. What happens when alice, an analysis runner, tries to run template1 on bob_data_1?

    Sources2

    3.Generating synthetic data in place of real rows

    Synthetic data is another way to share sensitive data: you hand over a statistically similar stand-in instead of the real rows. SNOWFLAKE.DATA_PRIVACY.GENERATE_SYNTHETIC_DATA reads one or more source tables and writes output tables with the same column names and data types. The output keeps approximate distributions and correlations, and has the same number of rows or fewer. Once the algorithm has captured the distribution, no output row has a reference or link to any row in the source. The output tables do appear in the data lineage graph, which records where they came from.

    How each kind of source column is synthesized
    Source columnOutput
    Statistical: number, boolean, date, time, timestampSame type, with values similar to the source
    Categorical string: unique values below half the row countActual values taken from the source
    Non-categorical string: unique values above half the row countRedacted, unless the replace option sets an output format
    Unsupported data typeNULL for every value in the column

    Each input must have at least 20 distinct rows, no more than 100 columns and no more than 14M rows. One call accepts up to five inputs. Supported inputs are regular, temporary, dynamic and transient tables, plus regular, materialized, secure and secure materialized views. External tables, Apache Iceberg tables, hybrid tables and streams are rejected. TIMESTAMP_TZ is not supported, and timestamps outside 1677–2262 are clamped to those limits.

    The calling role needs USAGE on the warehouse, SELECT on the input, USAGE on the relevant databases and schema, CREATE TABLE on the output schema, and OWNERSHIP of the output tables. One trap here: a FUTURE GRANT of ownership on the output schema silently gives the new tables to a different role. Every user can call the procedure through the SNOWFLAKE.CORE_VIEWER database role, which is granted to PUBLIC. The account must accept the Anaconda terms first.

    Checkpoint 3 of 7· Check yourself

    A compliance auditor gets a synthetic copy of a patient table made with GENERATE_SYNTHETIC_DATA. The auditor wants to prove where the data came from. What can the auditor establish?

    Checkpoint 4 of 7· Exam question

    A governance team plans to call SNOWFLAKE.DATA_PRIVACY.GENERATE_SYNTHETIC_DATA on several source tables to produce shareable test data. Which source table can the procedure NOT use as input?

    Sources3

    4.Join keys, consistency secrets and the similarity filter

    Synthetic tables join only if you plan for it. Mark every column you will join on with join_key. Within one call, the same source value then becomes the same synthetic value in every table, so joins return results close to those on the real data. Join keys must be statistical columns or non-categorical strings. Marking an ID categorical therefore makes it ineligible as a join key, so it cannot fix a broken join. Each table's configuration must give the join column the same arguments.

    Separate calls are where joins usually break. Without a secret, join key values match across the tables of one run but not across runs. Supply the same symmetric-key SECRET as consistency_secret on every call, and the values stay consistent across tables and runs. Multi-run consistency works only for string columns, and the calling role needs READ or OWNERSHIP on the secret.

    Two separate calls that produce joinable patient_id values by sharing one consistency secret (first call shown)sql
    CREATE OR REPLACE SECRET my_db.public.my_consistency_secret
      TYPE=SYMMETRIC_KEY
      ALGORITHM=GENERIC;
    
    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}}
          }
        ],
        'consistency_secret': SYSTEM$REFERENCE('SECRET', 'MY_CONSISTENCY_SECRET', 'SESSION', 'READ')::STRING,
        'replace_output_tables': TRUE
    });

    The procedure protects privacy in two ways. The first is automatic: string columns where more than half the values are unique are redacted. The second you switch on with 'similarity_filter': True, which drops output rows that sit too close to real input rows, judged by nearest neighbor distance ratio (NNDR) and distance to closest record (DCR). The filter is why output can have fewer rows than the source. It also requires every non-string column to be fully populated, because a single NULL there makes the call fail. If you need a formal privacy budget on what partners can learn from the data, use the differential privacy policies covered in lesson 2.1 instead.

    Checkpoint 5 of 7· Fill the gap

    This is the first of two separate GENERATE_SYNTHETIC_DATA calls. Both calls must produce patient_id values that still join with each other. Which configuration key completes the call?

    CREATE OR REPLACE SECRET my_db.public.my_consistency_secret
      TYPE=SYMMETRIC_KEY
      ALGORITHM=GENERIC;
    
    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
    });

    Checkpoint 6 of 7· Exam question

    A provider generates synthetic customers and orders tables for a partner with two separate GENERATE_SYNTHETIC_DATA calls. The partner reports that customer_id values in the outputs no longer join. Which change restores joinability while keeping the data synthetic?

    Checkpoint 7 of 7· Exam question

    Which TWO statements about the privacy characteristics of GENERATE_SYNTHETIC_DATA are accurate?(Select 2)

    0 of 2 selected

    Sources3

    Sources

    (3)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “With a share or a listing, the consumer can directly query the shared data.”
      ↩︎ What a clean room adds beyond a share
      “The collaborator who is sharing data can define what analyses are available to the other collaborators”
      ↩︎ What a clean room adds beyond a share
    2. 2.
      “Data Providers must use Snowflake Enterprise Edition. Owners and Analysis runners can use Standard Edition.”
      ↩︎ What a clean room adds beyond a share
      “its specification controls which columns are exposed and what policies apply.”
      ↩︎ What a clean room adds beyond a share
      “Registration is an account-level action; it packages and copies the resource into the clean rooms environment”
      ↩︎ 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
      “All collaborators except for the owner must review the collaboration before they can join.”
      ↩︎ Registering, linking and joining a collaboration
      “Unlike collaborations, resources are versioned.”
      ↩︎ Registering, linking and joining a collaboration
      “The analysis runner bears the cost of the analysis.”
      ↩︎ Registering, linking and joining a collaboration
      “A collaboration can have only one owner.”
      ↩︎ Exam trap 1
      “An owner isn’t automatically an analysis runner or a data provider, and doesn’t have any elevated run privileges.”
      ↩︎ Checkpoint
      “You must join a collaboration before any resources that you provide to a collaboration become usable.”
      ↩︎ Checkpoint
    3. 3.
      “Synthetic data appears in the data lineage graph.”
      ↩︎ Generating synthetic data in place of real rows
      “You can specify up to five input tables per procedure call.”
      ↩︎ Generating synthetic data in place of real rows
      “You must accept the Anaconda terms and conditions in your Snowflake account in order to enable this feature.”
      ↩︎ Generating synthetic data in place of real rows
      “join key values will be consistent across tables and multiple runs.”
      ↩︎ Join keys, consistency secrets and the similarity filter
      “Multi-run consistency is supported only for string columns.”
      ↩︎ Join keys, consistency secrets and the similarity filter
      “The privacy filter removes rows from the output table if the rows are too similar to the input data set.”
      ↩︎ Join keys, consistency secrets and the similarity filter
      “A NULL value in a non-string column will cause the procedure to fail.”
      ↩︎ Join keys, consistency secrets and the similarity filter
      “Snowflake replaces the value with a redacted value in the output table due to privacy concerns.”
      ↩︎ Join keys, consistency secrets and the similarity filter
      “Join key columns must be non-categorical strings or statistical.”
      ↩︎ Exam trap 2
      “does not have a direct reference or link to any row from the original data.”
      ↩︎ Exam trap 3
      “The following input table types are not supported:”
      ↩︎ Prediction
      “the synthetic data resembles the original data statistically but does not have a direct reference or link to any row from the original data.”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise the 15 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.