In this blog post, we will delve into Snowflake’s Listing feature, which operates on the data sharing provider and consumer model. Secure data sharing, which encompasses External tables, Dynamic tables, Secure views, Secure materialized views, Secure UDFs, and Tables, is well-known for its restrictive access. The Listings feature enhances the capabilities of Secure Data Sharing with the following functionalities:
- Share Snowflake Native App
- Publish listings on the Snowflake Marketplace
- Automatically replicate your data to other regions
- Provide metadata about the share, including a title, description, and sample SQL queries
While sharing data securely within the same Snowflake organization, Listing proves especially valuable when extending data sharing across diverse regions and various cloud providers.
Auto-Fulfillment: As a provider, you can enable Cross-Cloud Auto-Fulfillment for a listing to automatically replicate your data product to other Snowflake regions without having to manually replicate data.
Though there are a lot of things to be explored with the Listing, here will discuss Private listing which is available only to specific consumers. In our use case, we will perform the below tasks:
- Provider situated in Asia Pacific (Singapore) will create the listing which encompasses of few objects.
- Shared this listing with consumers lies in US East (N. Virginia).
- Consumer will create a Database from listing and Query the objects.
Create Listing in Provider Account:
- Delegate privileges to ACCOUNTADMIN for setting up Cross-Cloud Auto-Fulfillment
Use Role ORGADMIN;
SELECT SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNT('<account_name>' );
2. Review and accept the Provider Terms of Service.
To become a provider, user with the ORGADMIN role for your Snowflake account must agree to the Snowflake Provider Terms of Service..
Data » Provider Studio >> select Review Provider Terms & Conditions.
Click link to review the Provider Terms of Service –> Accept Terms & Conditions.
3. Set up a provider profile.
Provider profile need not to be set for free private listings.
In our case it is optional as our is trial account and we are not publishing to Market place. Though I created a profile named Cloudyard.
4. Create Listing:
Select List of Objects in Provider DB to be shared with Consumer:
After Publish we will see our listing.
Add some sample Queries with Listing. These will be displayed at Consumer side.
Go to your Consumer Account and see your listing.
Click on Get and it will start replicating the data from provider Account.
Once done we will get the mail.
Click on the GET and specify your DB name and additional Role along with ACCOUNTADMIN to have access on the provider objects:
Consumer can see the Query associated with Listing.
Consumer can query the data in their account on listed objects: