Type to search

Share

Effortless Data Sharing in Snowflake: Streamlined Access Across Platforms

Dive into the world of simple data sharing with Snowflake, where complexity is no longer a barrier. This guide breaks down how Snowflake enhances collaboration by allowing seamless and secure data access between different accounts without the hassle of data movement.

Whether you’re looking to share data internally within your organization or with external partners, Snowflake’s sharing capabilities ensure that everyone has the latest, synchronized data at their fingertips, boosting efficiency and decision-making across the board.

Get ready to transform how you share data with minimal effort.

Introduction:

Data Sharing:

Data sharing refers to the process of allowing access to, exchange, or distribution of data between individuals, organizations, systems, or applications. It involves making data available to others for various purposes, such as collaboration, analysis, decision-making, and reporting. Data sharing can occur within an organization or extend to external entities, depending on the specific requirements and goals. Snowflake, a cloud-based data warehousing platform, provides robust features for seamless and secure data sharing.

Data sharing in Snowflake offers a secure, real-time, and cost-effective way for organizations to collaborate and access shared data without the need for complex data movement processes. It provides control and flexibility to data providers while ensuring that consumers have timely access to the most up-to-date information.

Objects that can be shared in Snowflake:

In Snowflake, the term “share” refers to a mechanism that enables data sharing between different Snowflake accounts. A share is essentially a named container that holds a set of one or more database objects, and it can be shared with one or more other Snowflake accounts. Shares allow organizations to share data securely and efficiently without physically copying it. The data remains in the original account, and the share provides controlled access to that data for other accounts.

These are the objects that can be shared in Snowflake.

  • Tables
  • External tables
  • Secure views
  • Secured Materialized Views
  • Secure UDFs

BENEFITS:

  1. Cost Efficiency: Sharing data in Snowflake reduces both storage costs by eliminating the need for data duplication and computational expenses, as direct access to shared data negates the necessity for separate computational resources in each account.
  2. Simplicity and Easy Setup: The user-friendly interface of Snowflake simplifies the process of sharing data, providing an intuitive platform that doesn’t require complex external tools for setup.
  3. Selective and Secure Sharing: Snowflake’s data sharing feature allows for granular control, enabling providers to selectively share specific tables or views, and the use of secured views ensures that sensitive data is shared securely with controlled access.
  4. Elimination of Data Movement Hassles: Snowflake eliminates the complexities associated with data duplication or movement, allowing users to access shared data directly without the need for data transfer.
  5. Cross-Cloud Collaboration: Snowflake extends collaboration beyond its ecosystem, allowing users to share data with different cloud platforms effortlessly, promoting collaboration with external partners and stakeholders on diverse cloud services.

PROVIDER:

  • A data provider in Snowflake is an account that creates and shares data with other Snowflake accounts.
  • Providers can share a database with one or more Snowflake accounts.
  • Access control is achieved by granting specific privileges for selected objects within the shared database.
  • Providers can create as many shares as needed.
  • It’s possible to add multiple accounts to a share.

CONSUMER:

  • A consumer in Snowflake is an account that accesses and utilizes data shared by data providers.
  • Consumers can access shared databases and work with the provided data.
  • Consumers have the ability to query and analyze the shared data for their specific needs.
  • Consumer accounts typically have read-only access, ensuring they can analyze data without modifying it.
  • Consumers collaborate with data providers by utilizing the shared data for various analytical purposes.
  • Consumers do not modify the shared data directly; their access is generally limited to reading and querying.

In the diagram above, enables a network of data providers to share information with multiple users. Whether within their organization or external to it, providers can seamlessly share data. Likewise, users can access shared data from different providers, creating a collaborative and interconnected environment for data sharing.

In conclusion, by observing the diagram and understanding the process, it’s evident that this architecture supports a dynamic and efficient data-sharing ecosystem. The quick setup and near-instant access to shared data enhance the overall effectiveness of collaborative data exploration in a user-friendly and interconnected manner.  please use more simple way to understand.

READER:

Creating a reader account in Snowflake is useful for scenarios where you want to share data with someone who doesn’t have a Snowflake account or isn’t ready to become a licensed Snowflake customer. It’s a quick, easy, and cost-effective way to grant read-only access to shared data without requiring the consumer to have a full Snowflake account.

  • Reader accounts can only read and query shared data; they cannot perform data manipulation operations such as data loading, insertions, or updates.
  • A reader account can only consume data from the specific provider account that created it. It doesn’t have the capability to access data shared by other providers.
  • The reader account is granted access to shared data, allowing them to query and analyze the provided information.
  • If a reader account is not explicitly granted access to an object within the shared database, it won’t be able to query or access that particular object.
  • Once data is shared with a reader account, it cannot be further shared with other accounts. Reader accounts are intended for direct consumption by the creating provider account.

DEMONSTRATION:

We will now demonstrate the direct sharing process in Snowflake. To initiate this, a data provider within the Snowflake environment creates a share of a database, carefully specifying access permissions for specific objects. This share is then extended to include one or more accounts, possibly even the provider’s multiple Snowflake accounts. On the consumer side, a read-only database is generated from the shared data. Access to this database is configured using standard role-based access control, ensuring that consumers, including potential reader accounts, have read-only privileges. This step-by-step process showcases the seamless and secure direct sharing of data within the Snowflake ecosystem.

“In the provider account, there are two schemas, PRO_TBLS and PRO_VIEWS, under the SAMPLE_DB database. Within the PRO_TBLS schema, there is a table, and within the PRO_VIEWS schema, there are four views, including a normal view, a materialized view, a secure view, and another materialized view. The next step involves sharing this structured data from the provider’s account into the customer account for collaborative access and analysis.”

“To initiate data sharing in Snowflake, navigate to the ‘Data’ folder, select ‘Private Sharing,’ and click on ‘Shared by Your Account.’ In the top-right corner, locate the ‘Share’ option. Upon clicking, choose the ‘Direct Share’ option and select the necessary data. It’s noteworthy that only secured views can be shared in this process. Despite having created four views, only two will be visible for sharing, reflecting the limitation that only secured views can be shared through this Snowflake mechanism.”

After creating a share by adding a consumer account, it’s important to note that multiple accounts can be added to this share. This flexibility allows for efficient collaboration, enabling data access for various accounts within the shared Snowflake environment.

“After successfully creating the share and adding the consumer account, the shared data is seamlessly accessible within the consumer’s data environment. This means that the consumer can easily locate and explore the provided data directly within their Snowflake account, fostering a collaborative and interconnected data-sharing experience.”

To effortlessly access the shared data, one can simply click the downward arrow button, input the database name, and seamlessly integrate the shared data into the consumer’s database. This straightforward process ensures a smooth transfer and availability of shared data within the consumer’s Snowflake environment.

Now, within the consumer account, the database containing the shared schemas, tables, and views is readily visible. This comprehensive view allows the consumer to easily explore and utilize the shared data.

To extend access to non-Snowflake users, the provider can create a reader account within their Snowflake account. This reader account serves as a dedicated entry point for those who do not have a Snowflake account or are not Snowflake customers yet. By configuring appropriate access permissions, the provider can grant read-only access to the shared data, allowing non-Snowflake users to seamlessly utilize the data for their analytical needs. Let’s create a reader account.

After successfully creating the reader account, it can be seamlessly incorporated into the existing share, ‘SAMPLE_DB_SHARE_CHINNA,’ by executing a straightforward query: ALTER SHARE SAMPLE_DB_SHARE_CHINNA ADD ACCOUNT = HR48104; This step allows the reader account, HR48104, to gain access to the shared data.

It’s important to note that since grants were already provided during the creation of this share for consumer accounts, there is no need to add additional grants for the reader account.

Now that we have successfully added the reader account to the share, executing the command SHOW MANAGED ACCOUNTS; will display details about the reader account, including a URL. By entering this URL with the provided credentials, one can seamlessly log in to the reader account.

“With the reader account successfully set up, the share ‘SAMPLE_DB_SHARE_CHINNA’ is now visible within the reader account. This visibility allows the reader account to access the shared data seamlessly, providing an efficient way to retrieve and explore data within the reader’s Snowflake environment.”

In conclusion, as a provider in Snowflake, one can effortlessly share data with various consumers, both within and outside their organization, through the creation of shares and the inclusion of reader accounts. The provider’s role involves setting up shares, granting access, and managing permissions for efficient collaboration. On the other hand, the reader account serves as an accessible entry point for non-Snowflake users, ensuring read-only access to shared data without the need for a full Snowflake account. Together, these functionalities establish a dynamic and inclusive data-sharing ecosystem within the Snowflake platform.