Secure Data Sharing
Snowflake · Data Sharing & Collaboration
Theory
Secure Data Sharing lets a provider account give other accounts read-only access to its data without copying it. The provider creates a share, grants it USAGE on a database and schema and SELECT on tables or secure views, then adds consumer accounts. The consumer creates a database from the share and queries it with its own warehouse. Since both read the same micro-partitions, consumers always see current data.
The provider pays for storage and the consumer pays for the compute it uses. Direct shares work between accounts in the same region; reaching other regions or clouds uses listings with cross-cloud auto-fulfillment or replication. For partners without Snowflake, a provider can create a reader account and pays for its compute.
Why we use it
Sending data by files or API extracts creates stale copies, pipeline work and security risk. Sharing gives partners and other teams live, governed access to one copy of the data.
When to use it
Use shares to give other accounts, inside or outside your company, access to curated data. Share secure views when you need to hide columns or filter rows per consumer. Use the Marketplace or listings for wider distribution.
How a Share Works
A provider creates a SHARE object, grants it usage on specific databases/schemas/tables, then adds one or more consumer accounts — the consumer creates a database directly from that share and queries it like any other database.
Provider vs Consumer Responsibilities
The provider controls exactly what's shared and can revoke access instantly; the consumer only pays for the compute (their own warehouse) used to query shared data, never for its storage.
Reader Accounts
For consumers who don't have their own Snowflake account, a provider can create a fully managed reader account on their behalf, so sharing doesn't require the recipient to already be a Snowflake customer.
Provider → Consumer, Zero-Copy
PROVIDER ACCOUNT CONSUMER ACCOUNT ┌─────────────────┐ ┌─────────────────┐ │ Database: SALES │ │ │ │ └─ Table: │ SHARE │ Creates DB from │ │ PRODUCTS │ ──────────────►│ share (read- │ │ │ (zero-copy, │ only, live data)│ │ │ always live) │ │ └─────────────────┘ └─────────────────┘
How it works
- Provider decides what to share
- CREATE SHARE and grant USAGE and SELECT to it
- ALTER SHARE ... ADD ACCOUNTS = consumer
- Is the consumer in the same region? Yes: Consumer creates a database from the share. No: Use a listing with auto-fulfillment or replication.
- Consumer queries with its own warehouse
- Provider changes appear to the consumer immediately
Example
CREATE SHARE product_catalog_share COMMENT = 'Live product catalog for partners';
GRANT USAGE ON DATABASE practice_db TO SHARE product_catalog_share;
GRANT SELECT ON TABLE practice_db.learn.products TO SHARE product_catalog_share;
ALTER SHARE product_catalog_share ADD ACCOUNTS = 'consumer_account_id';
SHOW SHARES;
ALTER SHARE product_catalog_share REMOVE ACCOUNTS = 'consumer_account_id';
-- On the consumer account:
-- CREATE DATABASE partner_products FROM SHARE provider_account.product_catalog_share;Key points
- No data copying; consumers query the provider's live data
- Providers pay for storage; consumers pay only their own compute
- Shared data is read-only for the consumer
- Views in a share must be secure views
- Reader accounts serve non-Snowflake recipients; provider pays their compute