Data Sharing: Listings & Marketplace Deep Dive
Master Snowflake data sharing, listings, and the Marketplace.
20+ years shipping high-throughput database systems. Lessons pulled from things that broke in production.
- ✓Basic understanding of SQL (SELECT, CREATE VIEW, GRANT)
- ✓Access to a Snowflake account with ACCOUNTADMIN or equivalent privileges
- ✓Familiarity with Snowflake's database and schema concepts
• Snowflake data sharing allows instant, zero-copy sharing of live data between accounts without moving or copying data. • Listings are published data products on the Snowflake Marketplace, which can be public or private. • The Marketplace is a curated hub where providers list datasets and consumers access them with a few clicks. • Sharing uses readers accounts or data exchange listings; no ETL or data duplication required. • Key features include fine-grained access control, secure views, and usage tracking.
Imagine you have a giant library (your Snowflake account) with thousands of books (datasets). Normally, if a friend wants to read a book, you'd have to photocopy it and send it—costly and slow. Snowflake data sharing is like giving your friend a magic pair of glasses that lets them read the book directly from your library, in real time, without you ever losing the original. The Marketplace is like a public library where you can put some of your books on display for anyone to borrow instantly.
In the modern data ecosystem, sharing data across teams, partners, and customers is a critical capability. Traditional methods—exporting CSV files, setting up FTP transfers, or building complex ETL pipelines—are slow, error-prone, and create data silos. Snowflake revolutionizes this with its native data sharing, listings, and Marketplace, enabling instant, secure, and governed data collaboration without moving or copying data.
Snowflake data sharing allows you to share live, queryable data from one Snowflake account to another. The shared data remains in the provider's account, so consumers always see the latest version. There's no data duplication, no storage costs for the consumer, and no complex infrastructure. Listings extend this concept by packaging shared data into discoverable products on the Snowflake Marketplace. Providers can publish listings—either publicly to all Snowflake users or privately to specific accounts—and consumers can access them with a few clicks.
This tutorial will guide you through the entire lifecycle: setting up data sharing, creating listings, managing access, and best practices for production. You'll learn how to share data securely using secure views and row-level security, how to monetize your data assets, and how to troubleshoot common issues. By the end, you'll be able to build a data sharing strategy that scales with your organization.
Understanding Snowflake Data Sharing Concepts
Snowflake data sharing is built on a provider-consumer model. The provider creates a share, adds objects (databases, schemas, tables, views, secure views, or secure materialized views), and grants access to one or more consumer accounts. Consumers see the shared data as a read-only database in their own account, with no storage costs. The data is always live—any changes made by the provider are immediately visible to consumers.
- Share: A container that holds references to databases and schemas. Shares are created with
CREATE SHARE. - Secure Views: Views that hide underlying table structures and can enforce row-level security. They are the recommended way to share data because they allow fine-grained access control.
- Reader Accounts: A special type of account that can only consume shared data. They are used for data sharing with users who don't have a Snowflake account.
- Data Exchange: A private marketplace for sharing data within an organization or with trusted partners.
When you share a view, the consumer can query it like any other view. However, if you share a table directly, the consumer sees all rows. Secure views are preferred for production because they allow you to apply filters (e.g., only show rows where region = 'US') without exposing the underlying data.
Setting Up a Consumer Account and Querying Shared Data
Once the provider grants access to a consumer account, the consumer can import the share into their account. This creates a read-only database that references the provider's data. The consumer does not store any data; every query runs on the provider's side.
Steps for the consumer: 1. The provider must know the consumer's account locator (found in the consumer's Snowflake URL or via SELECT ). 2. The provider runs CURRENT_ACCOUNT()ALTER SHARE share_name SET ACCOUNTS = consumer_account_locator;. 3. The consumer runs CREATE DATABASE shared_db FROM SHARE provider_account_locator.share_name;. 4. The consumer can now query the shared database like any other database.
Note: The consumer cannot modify the shared data. They can create views, materialized views, or tables on top of the shared data (by copying data into their own tables), but the original shared data remains read-only.
If the consumer needs to share data further, they can create a new share from their own account, but they cannot re-share the provider's data unless the provider explicitly allows it via GRANT REFERENCE_USAGE.
Creating Listings for the Snowflake Marketplace
Listings are the mechanism to publish data on the Snowflake Marketplace. A listing wraps a share with metadata such as title, description, pricing (if monetized), and terms of use. Listings can be public (visible to all Snowflake users) or private (visible only to specific accounts).
To create a listing: 1. Ensure you have the CREATE LISTING privilege (granted by ACCOUNTADMIN). 2. Create a share with the data you want to list. 3. Use the Snowflake UI or SQL to create the listing. SQL example: CREATE LISTING my_listing FROM SHARE my_share TITLE = 'Sales Analytics' .... 4. Set the listing status to 'PUBLISHED' to make it visible.
Listings support both free and paid data. For paid listings, you need to set up a listing agreement with Snowflake and define pricing. Snowflake handles billing and takes a revenue share.
You can also create listings that require approval (request-based) or are auto-fulfilled. Auto-fulfilled listings allow consumers to access data immediately without provider intervention.
Managing Access with Secure Views and Row-Level Security
Secure views are the cornerstone of safe data sharing. They allow you to expose only the necessary columns and rows, and they hide the underlying table definitions. Consumers cannot see the view's SQL definition, which protects your intellectual property.
Row-level security can be implemented by using a mapping table that associates consumer accounts with allowed data. For example, you can create a secure view that joins the base table with a permissions table, filtering rows based on the current user's account.
Example: Suppose you have a table sales with a column region. You want each consumer to see only their region. Create a permissions table region_access that maps account locators to regions. Then create a secure view that joins and filters.
Note: The function C returns the account locator of the consumer running the query. However, in a secure view, this function returns the provider's account locator if the view is defined in the provider's account. To get the consumer's account, use URRENT_ACCOUNT()C or pass the account as a parameter. A better approach is to use a mapping table that the provider maintains.URRENT_USER()
GRANT SELECT on the view only, never on the base tables.Monetizing Data with Paid Listings
Snowflake Marketplace allows providers to monetize their data by setting a price for their listings. Paid listings can be one-time purchases or subscriptions. Snowflake handles the billing and remits payments to the provider after deducting a marketplace fee.
To create a paid listing: 1. You must have a Snowflake Business Critical or higher edition account. 2. Sign the Snowflake Marketplace Provider Agreement. 3. Create a listing and set the pricing model (e.g., $100 per month per consumer). 4. Snowflake will validate the listing and make it available.
Consumers see the price and terms before accessing the data. They can request access, and the provider can approve or deny. Snowflake tracks usage for billing.
- Provide clear documentation and sample data.
- Offer a free trial period to attract consumers.
- Keep your data fresh and reliable; stale data leads to churn.
- Use secure views to control what consumers can access.
Best Practices for Production Data Sharing
Implementing data sharing in production requires careful planning to ensure security, reliability, and performance.
- Use Secure Views: Always share data through secure views rather than base tables. This provides an abstraction layer and allows you to change underlying schemas without breaking consumers.
- Version Your Shares: When making breaking changes, create a new share (e.g.,
sales_v2) and gradually migrate consumers. Deprecate old shares after a transition period. - Monitor Usage: Use Snowflake's
ACCOUNT_USAGEviews (e.g.,SHARE_USAGE_HISTORY,LISTING_ACCESS_HISTORY) to track who is accessing your data and how often. - Set Up Alerts: Configure alerts for when a share is dropped or a listing becomes inactive. Use Snowflake's notification integration or external monitoring.
- Document Everything: Maintain a data catalog that describes each share, listing, and the underlying views. Include contact information for data owners.
- Test in a Non-Production Account: Before publishing a listing or updating a share, test the changes in a separate account to avoid impacting consumers.
- Limit Privileges: Grant only necessary privileges to roles that manage shares and listings. Use custom roles instead of ACCOUNTADMIN.
Performance considerations: Shared queries run on the provider's warehouse. If you have many consumers, consider using a dedicated warehouse for sharing to avoid contention. Also, use clustering on large tables to improve query performance.
Troubleshooting Common Issues
Even with careful planning, issues can arise. Here are common problems and solutions:
Problem: Consumer gets 'Insufficient privileges' error. - Cause: The share is not granted to the consumer's account, or the consumer's role lacks USAGE on the imported database. - Fix: Verify the share grants: SHOW GRANTS OF SHARE share_name;. Ensure the consumer's role has USAGE on the database: GRANT USAGE ON DATABASE shared_db TO ROLE consumer_role;.
Problem: Listing is not visible in Marketplace. - Cause: The listing status is not PUBLISHED, or the listing is private and the consumer's account is not in the allowed list. - Fix: Check listing status: SHOW LISTINGS;. If private, add the consumer's account: ALTER LISTING listing_name SET ACCOUNTS = 'consumer_account';.
Problem: Query on shared view returns no rows. - Cause: Row-level security filter is too restrictive, or the view references objects that no longer exist. - Fix: Test the view definition in the provider account with the same context. Check if the underlying tables have data.
Problem: Consumer sees stale data. - Cause: The consumer may have created a local copy (e.g., a table) from the shared data. Shared data itself is always live. - Fix: Remind consumers to query the shared database directly, not local copies.
Problem: Provider cannot drop a share because it's referenced by a listing. - Cause: Listings hold a reference to the share. You must drop the listing first. - Fix: DROP LISTING listing_name; then DROP SHARE share_name;.
The Case of the Missing Marketplace Listing
- Always treat shared objects as immutable contracts; use versioned views or aliases to allow schema evolution.
- Implement monitoring on listing status using Snowflake's INFORMATION_SCHEMA or ACCOUNT_USAGE views.
- Document the dependency between listings and underlying shares to avoid accidental deletions.
- Use Terraform or Snowflake's Python SDK to manage listings as code for auditability.
- Test listing changes in a non-production account before applying to production.
SHOW SHARES;SHOW GRANTS OF SHARE my_share;| File | Command / Code | Purpose |
|---|---|---|
| create_share.sql | CREATE SHARE my_share; | Understanding Snowflake Data Sharing Concepts |
| consumer_import.sql | CREATE DATABASE sales_shared FROM SHARE provider_account_locator.my_share; | Setting Up a Consumer Account and Querying Shared Data |
| create_listing.sql | CREATE LISTING sales_listing | Creating Listings for the Snowflake Marketplace |
| secure_view_rls.sql | CREATE TABLE region_access ( | Managing Access with Secure Views and Row-Level Security |
| paid_listing.sql | CREATE LISTING premium_analytics | Monetizing Data with Paid Listings |
| monitor_shares.sql | SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.SHARE_USAGE_HISTORY | Best Practices for Production Data Sharing |
| troubleshoot.sql | SHOW SHARES; | Troubleshooting Common Issues |
Key takeaways
Common mistakes to avoid
4 patternsSharing base tables instead of secure views
Forgetting to grant USAGE on the database and schema to the share
Using CURRENT_ACCOUNT() in a secure view expecting it to return the consumer's account
Not monitoring listing usage and failing to update stale data
Interview Questions on This Topic
What is the difference between a share and a listing in Snowflake?
Frequently Asked Questions
20+ years shipping high-throughput database systems. Lessons pulled from things that broke in production.
That's Snowflake. Mark it forged?
6 min read · try the examples if you haven't