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

  1. Provider decides what to share
  2. CREATE SHARE and grant USAGE and SELECT to it
  3. ALTER SHARE ... ADD ACCOUNTS = consumer
  4. Is the consumer in the same region? Yes: Consumer creates a database from the share. No: Use a listing with auto-fulfillment or replication.
  5. Consumer queries with its own warehouse
  6. 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

Snowflake topics

Snowflake Fundamentals

Warehouses & Performance

Staging & SnowSQL

Tables & Data Handling

Cloud Integrations

Storage & Optimization

Security & Governance

Views, Pipelines & Automation

Data Types & SQL Fundamentals

Semi-Structured Data Deep Dive

Advanced Features

Data Sharing & Collaboration

Cost Management & Monitoring

Databases, Schemas & Objects

Performance Deep Dive

Advanced Security & Governance

Stored Procedures & UDFs

Ecosystem & Integrations

SnowPro Certification Prep

T
Tech Town
Log InSign Up Free
Home SQL Python DSA Power BI Snowflake Databricks Spark Gen AI Practice Problems Contest Blog

Mastering Snowflake

The modern data cloud, from architecture to SnowPro certification. Click any topic in the sidebar to open it right here.

{{ sectionCount }}
Sections
{{ topicCount }}
Topics
Free
Forever
Hands-on practice Practice Snowflake SQL Sharpen the SQL you use in Snowflake: 150 query problems in a live editor with instant checking. Start practising →
Section {{ sec.num }}

{{ sec.label }}

Snowflake  /  {{ current.sectionLabel }}  /  {{ current.name }}

{{ current.name }}

Theory

{{ current.def }}

Why we use it

{{ rich.why }}

When to use it

{{ rich.when }}

{{ sec.h }}

{{ sec.body }}

{{ sec.body }}

Diagram

{{ rich.dg.caption }}

{{ tb.title }}
{{ c.v }}
{{ rich.dg.op }}
➜
{{ rich.dg.output.title }}
{{ c.v }}
{{ nd.label }}
{{ nd.sub }}
{{ nd.label }}
{{ nd.sub }}
{{ rich.dg.left.title }}
{{ it }}
{{ rich.dg.right.title }}
{{ it }}
On screen — where to click

{{ rich.ui.title }}

{{ u.text }}
  1. {{ st.n }}{{ st.text }}
{{ rich.ui.title }}
{{ u.text }}
Flowchart — how it works
{{ nd.text }}
{{ nd.text }}
◇ {{ nd.text }}
Yes → {{ nd.yes }}
No → {{ nd.no }}
Syntax
{{ current.syntax }}
Example
{{ current.example }}
Want to run this yourself? Unlike the SQL and Python courses, Snowflake needs a real account — there's no in-browser engine for it. Click Copy above, then paste it into a free Snowflake trial (30 days, no card required) and run it in Snowsight.
Key Points — click to check off as you learn
  • {{ pt.mark }} {{ pt.text }}

Share this topic