Skip to main content

Snowflake has a lot of special features that make itself unique. In this blog I will explain how/when to create listings. You can always find here our latest blogs about Snowflake. Today I want to share with you the listing feature of Snowflake.

Snowflake is a platform that enables their users to share and to be able to recieve thousands of datasets available in its Marketplace. If you want to know more about Marketplace you can check this blog. All of these Sharings in Snowflake happens in Marketplace. You can share the data with the specified users as well as the whole community. In addition, you can access the dataset that the users share with you.

At this point the term Sharing comes to mind. Sharing in Snowflake is divided into two: the shares created by you for other users and the objects that are shared with you. As I mentioned before I want to dive into the details of how/when to create listings, so for now let’s assume that you want to share an object with a user; and let’s add that that dataset includes some important data so it will be better if you share only with the user that you desire (simply to avoid putting it in the Marketplace Directly). At this point before the latest updates of Snowflake you should be aware of several things.

First and the most important thing is your Snowflake region and the region of the account that you will share the data with . Because if the regions are the same, you could simply do a Direct Share. To create a direct share, Snowflake requires two accounts in the same region so if the regions are different; first you should create a ‘fake’ account in the same region as the reciever’s account. Then you should clone the database, etc… As you can see, the two passages already seem a lot for us in these days. Snowflake with its latest updates, enables to create listings that allow us to share data with all of the accounts in Snowflake, independently by their regions.

How to create a listing

Let’s create an example listing to share a dataset with the account in a different region. First thing that you should do is enabling global data sharing for your account. To do so you can run this code,  you can find your <account_name> at the bottom left corner of Snowsight:

USE ROLE ORGADMIN;

SELECT SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT(
  '<account_name>' 
  ); -->to set global data sharing to your account

SELECT SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNT('<account_name>'); --> to check if code is executed well if you have 'TRUE' as result of this query we can pass to the next point.

After this point we can start the process of creating a listing:

  1. Navigate to Data -> Provider Studio in the left bar
  2. Choose the role  ORGADMIN  from the upper left side of Snowsight; once you choose it you will find the blue button as ‘Review Provider Terms of Service’, click that button
  3. You will find 2 options. In the second one it should say ‘Review Provider Terms of Services’. Again you should select that
  4. Accept the Provider Terms of Service
  5. Now we can change our role back to ACCOUNTADMIN and navigate back to the Data -> Provider Studio in the left bar
  6. Click Listings  at the top and then the blue button in the top right corner ‘+ Listing’
  7. Enter a title of listing and select only specified consumers and then click the next button
  8. Select the data that you want to share, then add brief description (without this you cannot continue to make a listing)
  9. Add the ACCOUNT IDENTIFIER of the account that you want to make listing to Add Consumer Accounts box.
    Account identifier is composed of <organization_name>.<account_name> (you can find in the left bottom corner of Snowsight)
  10. After selecting that, you can adjust how frequently you want your data to be synced with your shared data.

After this process the share should be automatically created. The consumer should see the data that you shared in the Data -> Private Sharing -> Shared With You section. This whole process could take some time so it might be not immediate to see the shared data.

Conclusion

Listing is a very useful feature of Snowflake to share data with the accounts regardless of the account region. The knowledge of how/when to create listings enables us to do our work faster and easier. You can always edit your listing by changing the ‘schedule’, unpublish it, add/remove accounts to see that listing.

Thank you for reading my blog, you might also be interested on reading this article that talks on Snowflake Marketplace.


Auteur