Prepare data for a listing¶
This topic contains guidance for preparing to create a listing, including how to prepare a data product for different types of listings.
Prepare to create a listing¶
Before you create a listing, do the following:
Decide how to offer your data product. See Listing availability options and Listing access options.
Set up roles and privileges to simplify creating listings. See Set up roles and privileges for listings.
Identify the objects that you want to share. See Decide what to put in a listing.
Prepare the objects to be shared with others. See Prepare the shares for your listing.
Determine how you want to manage access to your data product:
Provide access for free, with no restrictions.
Charge for your listing by creating a paid listing. See Prepare to offer a paid listing.
Offer limited access to your data product as a free trial, then offer unlimited access to your data product by request. See Prepare to offer a limited trial listing.
Choose which cloud region(s) you want to offer your listing in. See Prepare your listing to be shared in other regions.
The listing and data share must be in compliance with the Snowflake Provider Policies.
Set up roles and privileges for listings¶
When you create a listing, you create it from the account that has the data or application package in it. The role that attaches a data product to a listing and publishes the listing must be the same role that created, and therefore owns, the application package or share. You cannot transfer the OWNERSHIP privilege for a share.
If you use a different role to create and manage the listing, grant the MODIFY privilege on the listing to the role that owns the application package or share. For example:
- Share or application package owner role:
OWNERSHIP privilege on the share or application package. MODIFY privilege on the listing.
- Listing owner role:
OWNERSHIP privilege on the listing.
Global CREATE DATA EXCHANGE LISTING privilege.
Within the provider account, you can use one of the following to create and manage listings:
- ACCOUNTADMIN:
If you use the ACCOUNTADMIN role to create and manage listings, the ORGADMIN role must first delegate privileges to set up auto-fulfillment.
- Custom role:
If you use a custom role, the ORGADMIN role must first delegate privileges to set up auto-fulfillment to the ACCOUNTADMIN role, which can then be used to grant the relevant privileges to the custom role.
For more information about granting sharing privileges, see Granting Privileges to Other Roles.
Decide what to put in a listing¶
As you prepare to share data from your account with a listing, decide what to put in the listing.
First, make sure that the data you want to share is in Snowflake, and that you have the legal and contractual rights to share the data. If needed, load the data that you want to share into Snowflake. See Overview of Data Loading.
Note
To the extent any data in your listing or data set is governed by any laws or contractual obligations, you must ensure that you have the legal and contractual rights to share such data. For example, you can only share protected health information (PHI) through a personalized listing and, to do so, you must: (1) have signed a business associate agreement (BAA) with Snowflake and the Consumer receiving the PHI, and; (2) ensure that the Consumer has also signed a BAA with Snowflake. Also, while you can share personal data through both a free or personalized listing, to do so you must have the applicable legal and contractual rights if the data is not publicly available.
Next, decide how to offer the data that you have as a listing. If you plan to offer listings on the Snowflake Marketplace or only as private listings directly with specific customers, you might make different decisions about what to place inside the listing.
Consider the availability of your data.
Consider the consumers that you expect to access your listings.
Consider the formats of the data that you select for the share, such as a table, view, secure view, or other database object.
For example, if you want to provide listings about dog grooming, you might make decisions like the following:
Offer a publicly available free listing on the Snowflake Marketplace with information about dog breeds and fur length.
Offer a limited trial listing on the Snowflake Marketplace with a sample data product that contains data about the time it takes to groom a standard poodle, with the option for consumers to request a full data product about grooming insights for more dog breeds.
Offer a limited trial listing on the Snowflake Marketplace with a data product that contains data about the time it takes to groom any breed of dog, with the option for consumers to request unlimited access to your data product.
Offer a private listing to a partner organization with insights about the length of time it takes to groom various dogs, and the typical frequency of grooming appointments for different dog breeds.
In this example, you offer valuable data on the Snowflake Marketplace, but offer more specific insights to an organization that you already have a trusted business relationship with.
Prepare to offer a limited trial listing¶
A limited trial listing lets you offer either a sample of your data product as a free trial, giving consumers insight into what might be available from a full data product or limited time access to your full data product. Providers can set the availability period for limited trial listings from 1 to 90 days. For more information about limited trial listings, see Limited trial listings.
If you choose to offer a sample of your full data product, the sample data product ideally provides a subset of the real data included in your full data product and is representative of the full data product in the following ways:
Contains the same columns.
Contains the same or similar ranges and distributions of values in the data.
Limited trial listings include a data dictionary, so the general shape of the data in the full data product should be clear from the sample data product that you offer.
For example, if you are a dog training and grooming company, you might consider offering one of the following sample data products with a limited trial listing:
Sample data product recommendation |
Sample data product example |
Full data product example |
---|---|---|
Contains a complete dataset for a specific complete attribute of the data. |
Contains up-to-date grooming insights for a Standard Poodle. |
Contains up-to-date grooming insights for all dog breeds. |
Contains the full dataset for a specific, outdated time period. |
Contains grooming insights and prices for all dog breeds from May, 2021. |
Contains up-to-date grooming insights and prices for all dog breeds. |
Contains synthetic data that is representative of the full data product. |
Contains up-to-date insights and prices about training the fictional Acadian Hound dog breed. |
Contains up-to-date insights and prices about training all dog breeds. |
Offering a relevant and complete subset of your full data product as the sample data product for your limited trial listing helps consumers understand the value of your full data product and makes them more likely to request the full data product.
Limit functionality of your Snowflake Native App for trial consumers¶
If you offer your Snowflake Native App on the Snowflake Marketplace as a limited trial listing and want to limit the functionality available to trial consumers, use the SYSTEM$IS_LISTING_TRIAL system function when creating secure views, secure UDFs, or Streamlit apps included in your Snowflake Native App.
Using the system function to control the visibility of data and UDF output means that you don’t have to maintain a separate application package to limit functionality to trial consumers.
You can limit the functionality of the following:
Secure view
Secure user-defined function (UDF)
Application logic, such as the setup script or a Streamlit app.
For more details about adding data content or UDFs to your application package, see:
Example 1: Return different data in a view to consumers in a trial¶
To define a secure view that returns data only to consumers with access to the full version of your Snowflake Native App, you could use the following example code:
CREATE OR REPLACE SECURE VIEW limited_functionality_view
AS
SELECT *
FROM db_name.schema_name.table_name
WHERE SYSTEM$IS_LISTING_TRIAL() = false;
If a consumer that is trialing your Snowflake Native App attempts to query the view, they see no results.
Example 2: Show the output of a secure SQL UDF only to non-trial consumers¶
To define a secure SQL UDF shared_function()
that returns results only to consumers with access to the full version of your Snowflake Native App,
you could use the following example code:
CREATE OR REPLACE SECURE FUNCTION schema_name.shared_function()
RETURNS VARCHAR
AS
$$
CASE
WHEN SYSTEM$IS_LISTING_TRIAL() = FALSE
THEN 'full product'
ELSE 'trial'
END
$$;
In this example, if a consumer is trialing your Snowflake Native App, when they call the secure UDF they see the output trial
.
Example 3: Show a different Streamlit UI to trial consumers¶
You can also call the system function inside of a Streamlit app to limit the functionality of your Streamlit app in a Snowflake Native App. For example, you can display one title in the UI to consumers that trial your Snowflake Native App, and another title to consumers with full access to your Snowflake Native App.
# Import python packages
import streamlit as st
from snowflake.snowpark.context import get_active_session
session = get_active_session()
# Here we assign result of our function to a variable
result = session.sql("SELECT SYSTEM$IS_LISTING__TRIAL()")
# Write directly to the app
if result:
st.title("Enjoy your limited trial of this application!")
else:
st.title("Welcome to the full version of this application!")
Prepare to offer a paid listing¶
If you want to charge for your listing, you must do the following:
Determine if you can offer paid listings. See Who can provide paid listings.
Prepare the data to offer a trial of the data. See Prepare shares for a paid listing.
Decide on the pricing plan that best fits your listing. See Paid listings pricing models to review the available pricing plans.
Where you can publish paid listings¶
Only providers in certain regions can publish paid listings. See Who can provide paid listings.
In addition, paid listings can only be published to certain regions. See Supported consumer locations to see to which regions you can publish paid listings.