Schema:

DATA_SHARING_USAGE

LISTING_CONSUMPTION_DAILY view

This view in the DATA_SHARING_USAGE schema can be used to analyze consumption of a Snowflake Native App or shared data associated with listings in a data exchange, such as the Snowflake Marketplace. The view returns a record for each consumer account that queried data for a given date.

Columns

LISTING_CONSUMPTION_DAILY

FieldTypeDescription
EVENT_DATEDATETIMEDate of the consumption.
EXCHANGE_NAMEVARCHAR

Name of the data exchange or the Snowflake Marketplace to which the listing belongs.

SNOWFLAKE_REGIONVARCHARSnowflake Region where the consumption occurred.
LISTING_NAMEVARCHARIdentifier for the listing.
LISTING_DISPLAY_NAMEVARCHARDisplay name of the listing.
LISTING_GLOBAL_NAMEVARCHAR

Global name of the listing. Unique for each listing and is used to create the listing URL.

PROVIDER_ACCOUNT_LOCATORVARCHARAccount locator of the data product owner.
PROVIDER_ACCOUNT_NAMEVARCHARAccount name of the data product owner.
SHARE_NAMEVARCHAR

Share name. If your data product is a Snowflake Native App, this is NULL.

CONSUMER_ACCOUNT_LOCATORVARCHARAccount locator name of the consumer.
CONSUMER_ACCOUNT_NAMEVARCHARAccount name of the consumer.
CONSUMER_ORGANIZATIONVARCHAROrganization name of the consumer.
JOBSNUMBER

Total jobs run that day on the data product. A job is recorded when a consumer query resolves objects included in the data share or Snowflake Native App attached to the listing.

REGION_GROUPVARCHAR

Region group where the account of the consumer is located.

CONSUMER_NAMEVARCHAR

Contains the company name of the consumer account that accessed, used, or requested a listing. If no name is available, such as for trial accounts, the value is NULL.

UNIQUE_USERS_1DNUMBER

Count of unique users (within the consumer account) who had jobs running on the date of consumption (EVENT_DATE).

UNIQUE_USERS_7DNUMBER

Count of unique users (within the consumer account) who had jobs running within the 7-day period ending on the date of consumption (EVENT_DATE).

UNIQUE_USERS_28DNUMBER

Count of unique users (within the consumer account) who had jobs running within the 28-day period ending on the date of consumption (EVENT_DATE).

Usage notes

  • Latency for the view may be up to 2 days.
  • The data is retained for 365 days (1 year).
  • The view contains data for all data products, whether your data product is a Snowflake Native App or a share.

Examples

Shows top listings by consumption for a given time period:

 SELECT
   listing_name,
   listing_display_name,
   SUM(jobs) AS jobs
FROM snowflake.data_sharing_usage.listing_consumption_daily
WHERE 1=1
   AND event_date BETWEEN '2021-01-01' AND '2021-01-31'
GROUP BY 1,2
ORDER BY 3 DESC

Shows top consumers by listing:

SELECT
  *,
  ROW_NUMBER() OVER (PARTITION BY listing_name, listing_display_name ORDER BY jobs DESC) AS rank
FROM (
  SELECT
    listing_name,
    listing_display_name,
    consumer_account_locator,
    SUM(jobs) AS jobs
  FROM snowflake.data_sharing_usage.listing_consumption_daily
  WHERE 1=1
    AND event_date BETWEEN '2021-01-01' AND '2021-01-31'
  GROUP BY 1,2,3
)
ORDER BY
  listing_name,
  listing_display_name,
  rank