In the modern IT landscape data is more important than ever, yet when sharing data, we are still stuck using the same outdated methods. Because why are we still driving from place to place to swap out hard drives with a database dump on it? Some organizations and/or sectors wish to provide their business partners or clients with information without the hassle of filtering information out of their systems and sending them through all kinds of channels. It could be data that is sold for marketing purposes, research etc.
In this blogpost we’ll be explaining the advantages of using Snowflake data sharing over the traditional way and how it can get rid of this tedious process of data sharing we have to go through now. You will also find an example of how to create shared content via Snowflake.
Traditional Data Sharing
Traditional data sharing is like handing over a jigsaw puzzle of your data without the box that shows the end result.
Providers traditionally have to deconstruct their database into separate files. Afterwards the files must be moved from provider to consumer. Traditional methods for sharing data are: FTP, S3, External hard disks and so on. When the consumer receives the files, they must reconstruct the database before the data can be viewed or used.
There are a few obstacles that arise when using traditional methods. First of all, it is an expensive way of sharing data because the consumer has to pay for the storage that is used. Second, it is error prone because there are lots of moving objects. Third, keeping the data secure and up to date is difficult because you actually hand over the data. Last but not least, it is a time-consuming process.
These obstacles result in loss of efficiency at both ends, but also loses any benefit the receiving party would have from the shared data.
Snowflake Data Sharing
How can we improve on this traditional way of sharing data? Let’s have a look at Snowflake Secure Data Sharing
Snowflake Secure Data Sharing provides us with a fairly easy – because it can be done with a few mouse clicks in Snowflake – and fast – because the data is not physically moved – way to share data with different parties. Secure Data Sharing is made possible by Snowflakes unique architecture, with a complete separation of storage and compute. Separate compute clusters can query the same data on the same moment in time, without having any impact on each other. Secure Data Sharing uses this principle by only sharing the metadata which points to the place where the data is stored. Thus, the data is never moved or duplicated. As a result, consumers don’t incur any data storage costs. They are only charged for compute costs.
Secure Data Sharing can be done between existing Snowflake accounts and dedicated reader accounts. The latter option is possible for consumers that don’t have a Snowflake account. In case of sharing with an existing account, the compute costs for querying the data are charged to the consumer, whereas reader account compute costs are charged to the data provider.
Shared databases are always read-only at the consumer side. Inserts, deletes and updates aren’t possible.
Example of data sharing with Snowflake
How does it work? Well we’d like to give you a short demonstration of how easy data sharing is in Snowflake. In this example we will show a data sharing case using a reader account.
The data provider creates a Share object which encapsulates all of the information required to share a database (e.g. database privileges, schema privileges and object privileges). Only (external) tables, secure (materialized) views and secure UDF’s can be used for sharing. In this case some secure views are shared.
After choosing which data to the share, the consumer(s) need(s) to be selected. For this case a read account will be the receiver of the data.
Now we are ready to create a database from the share. When the user clicks on SHARES, all the shared content will be visible. The user can then click on a share and ‘create database from secure share’. This will create the database. Everything is now ready for the consumer to view/query the data.
From now on the setup reader account has access to the shared data.
In just a few simple steps we’ve now shared data with a consumer. Quick reminder that in the traditional way the files would have had to be moved from producer to consumer. Now thanks to using Snowflake data sharing this tedious process can be avoided and the consumer can easily view/query the data directly from its source while keeping it secure. Let’s take a look at the data and make some queries.
The user can execute queries on the data and manipulate it just the way he wants. In the example above the user executes a query to list all the cities.
Also, more specific information can be acquired, here we join two views to show the population growth of cities between 2009 and 2012 starting with the city that has grown the most.
Interested to see what benefits Snowflake Data Sharing could offer to your organization? We can show use cases or offer personalized demos to match your business requirements.