Before You Share Snowflake Data, Test the Consumer View
A practical acceptance guide for a direct share with an external partner.
Your team can create a Snowflake share and still leave a basic business question unanswered: what can the partner actually query? This guide helps the provider and consumer agree on permitted rows and fields, test the secure view, confirm the intended role, and rehearse withdrawal.
A distribution team wants a carrier to see shipment exceptions in Snowflake. The carrier needs its own assignments and the fields required to resolve them. It should not see another carrier's work, internal notes, or customer contact details. The provider can create a share and grant access, but that does not answer the business question: what can the carrier actually query?
Snowflake direct shares make selected database objects available to consumer accounts. A direct share is for accounts in the same region; cross-region delivery calls for a different sharing route, such as a listing. The provider should decide the consumer, objects and permitted data before choosing that route. Snowflake sharing overview, create and configure shares.
Write the permitted view before building it
Start with a short contract the operations owner can check:
| Question | Carrier example |
|---|---|
| Who is the consumer? | The named carrier account, with its own assigned user role |
| Which records belong? | Open exceptions for that carrier's shipments |
| Which fields belong? | Shipment reference, exception type, last update and next action |
| Which fields stay out? | Internal notes and customer contact details |
| What does a pass look like? | Expected records appear; other carriers' records and excluded fields do not |
Avoid making the share a copy of the provider's working table simply because that table is convenient. Snowflake recommends secure views or secure UDFs instead of directly sharing tables when sensitive data must be protected. Its example places the base table in a private schema, the secure view in a shared public schema, and uses an account mapping when different consumers need different rows. Secure objects for sharing.
Test from both sides of the boundary
The provider first checks the secure view against known positive and negative records. Snowflake's SIMULATED_DATA_SHARING_CONSUMER session parameter lets the provider query a secure view as a named consumer account would see it. Use it to compare the view with the permitted-row contract before granting the share. This is a view-level simulation, not proof that the consumer's role, warehouse and grants are ready. Secure objects for sharing.
Next confirm the share's object grants. Use approved test records in a controlled share before adding the production consumer. Have a test user in the actual consumer account mount that share and query it with the intended role. The consumer needs the appropriate shared database role or imported privileges, depending on how the provider granted objects. Set USE SECONDARY ROLES NONE when proving what the intended primary role can do by itself; then test the agreed production role context separately and record any active secondary roles. A successful query by an administrator alone does not establish that the operational user has the right access. Share secure database objects, secondary roles, secure objects for sharing.
Run negative tests deliberately. Ask the consumer to query a shipment assigned to another carrier, look for an excluded column, and try an object that was never approved for sharing. Record the query result or denial, the role used and the time. Do not use live customer details in the evidence pack.
Treat policy-protected data as a separate design check
If a shared table or view carries a row access or masking policy, test the policy in the consumer context as well. Snowflake documents that CURRENT_ROLE and CURRENT_USER in a provider policy return NULL in a consumer account. A policy that appears right inside the provider account can therefore behave differently after sharing. Snowflake documents account-based conditions and shared database-role patterns for these cases. Choose the pattern deliberately and verify it with the actual consumer role. Row access policy considerations, share policy-protected data.
Make release and withdrawal observable
Before enabling the production consumer, record the approved account, share, object list, view or policy version, expected record scope and person who signs off. Check a refresh after new exceptions arrive so the consumer does not rely on a one-time snapshot test. Agree who will remove access when the contract ends or the wrong data appears; rehearse that withdrawal in a controlled test and confirm the consumer can no longer query the withdrawn object.
The decision is not whether Snowflake can create the share. It is whether the named consumer can see exactly the approved data, use it in the intended workflow and lose access when required. A provider simulation, actual consumer test and negative evidence make that decision reviewable.
Bring the proposed consumer account, approved data contract and one positive and one negative test case to a KCM Snowflake review. The companion guide includes a compact acceptance worksheet.
Snowflake documentation checked October 29, 2026. Verify current feature support and your account configuration before implementation.
