Bird
Raised Fist0
SnowflakeConceptBeginner · 3 min read

What is Data Sharing in Snowflake: Simple Explanation and Example

Data sharing in Snowflake allows you to securely share live data with other Snowflake accounts without copying or moving it. It works by creating a share object that grants access to specific database objects, enabling real-time collaboration.
⚙️

How It Works

Imagine you have a library of books (your data) and you want to let your friends read some of them without giving them the books to keep. In Snowflake, data sharing works like lending access to your library without handing over copies. You create a share that points to specific data tables or views you want to share.

The friends (other Snowflake accounts) can then see and query this data live, directly from your library, without needing to copy or move it. This means the data is always up-to-date and secure because you control exactly what is shared and who can see it.

💻

Example

This example shows how to create a share, add a table to it, and grant access to another Snowflake account.

sql
CREATE SHARE my_share;
GRANT USAGE ON DATABASE my_database TO SHARE my_share;
GRANT SELECT ON TABLE my_database.public.my_table TO SHARE my_share;
ALTER SHARE my_share ADD ACCOUNTS = ('123456789012');
Output
Share MY_SHARE created. Usage granted on database MY_DATABASE to share MY_SHARE. Select granted on table MY_DATABASE.PUBLIC.MY_TABLE to share MY_SHARE. Account 123456789012 added to share MY_SHARE.
🎯

When to Use

Use data sharing in Snowflake when you want to share live data securely and efficiently without copying it. It is ideal for:

  • Sharing data with partners or customers in real time.
  • Collaborating across departments or teams within your organization.
  • Providing data access to external analysts or vendors without data duplication.

This saves storage costs and ensures everyone works with the latest data.

✅

Key Points

  • Data sharing does not copy data; it shares live access.
  • You control what data and which accounts can access it.
  • Shared data is always current and secure.
  • Works only between Snowflake accounts.
✅

Key Takeaways

Data sharing in Snowflake lets you share live data securely without copying it.
You create a share object to grant access to specific data for other Snowflake accounts.
It is perfect for real-time collaboration with partners, teams, or customers.
Shared data stays up-to-date and reduces storage costs by avoiding duplication.