Data Providers: Monetization Usage Views

Snowflake provides historical usage data for paid listings via a set of views in the ORGANIZATION_USAGE and DATA_SHARING_USAGE schemas in the shared SNOWFLAKE database.

In this Topic:

ORGANIZATION_USAGE Views

Schema:

ORGANIZATION_USAGE

MARKETPLACE_DISBURSMENT_REPORT View

The MARKETPLACE_DISBURSMENT_REPORT view in the ORGANIZATION_USAGE schema can be used to query the history of your earnings from paid listings in the Snowflake Marketplace.

The view includes the history for all accounts in your Snowflake organization.

Columns

Column Name

Data Type

Description

EVENT_DATE

DATE

Date when the payment event occurred.

EVENT_TYPE

VARCHAR

Type of event (payment).

INVOICE_DATE

DATE

Date of the invoice.

LISTING_OWNER_ACCOUNT_NAME

VARCHAR

Name of the provider account that owns the listing.

LISTING_OWNER_ACCOUNT_LOCATOR

VARCHAR

Account locator for the provider account that owns the listing. For more information about account identifiers, see account identifier.

LISTING_NAME

VARCHAR

Identifier for the listing.

LISTING_DISPLAY_NAME

VARCHAR

Display name of the listing.

LISTING_GLOBAL_NAME

VARCHAR

Global name of the listing.

CHARGE_TYPE

VARCHAR

Type of charge assessed. For more information about the components of the pricing model for paid listings, see Snowflake Marketplace Pricing Model. Possible values: FIXED: Per-month charges. Also includes per-query charges if included by the provider in the pricing plan for the listing. VARIABLE: Per-query charges only.

GROSS

DECIMAL

Gross amount billed.

FEES

DECIMAL

Pre-tax fees that Snowflake subtracted from the gross amount.

TAXES

DECIMAL

Sales tax on the FEES column amount.

NET_AMOUNT

DECIMAL

Actual amount to be paid to the provider. The price is calculated by subtracting fees and taxes from the gross amount paid by the consumer.

CURRENCY

VARCHAR

USD

Examples

Retrieve the total amount disbursed to a provider’s bank account for each month for each listing:

SELECT
  event_date
, listing_name
, listing_display_name
, listing_global_name
, currency
, SUM(net_amount) AS net_amount
FROM snowflake.organization_usage.marketplace_disbursement_report
WHERE event_type = 'payment'
GROUP BY 1,2,3,4,5;

Retrieve the total amount that has been disbursed for each invoice period, grouped by listing and charge type. Note that the invoice period could be spread out over multiple report dates:

SELECT
  invoice_date
, listing_name
, listing_display_name
, listing_global_name
, charge_type
, currency
, SUM(gross) AS gross
, SUM(fees) AS fees
, SUM(taxes) AS taxes
, SUM(net_amount) AS net_amount
FROM snowflake.organization_usage.marketplace_disbursement_report
WHERE event_type = 'payment'
GROUP BY 1,2,3,4,5,6;

MONETIZED_USAGE_DAILY View

The MONETIZED_USAGE_DAILY view in the ORGANIZATION_USAGE schema can be used to query the history of daily consumer queries per data listing, including charges accummulated for the usage. Note that for consumer payment information, query the MARKETPLACE_DISBURSMENT_REPORT view in the ORGANIZATION_USAGE or DATA_SHARING_USAGE schema.

The view includes the history of consumer queries for all accounts in your Snowflake organization.

Columns

Column Name

Data Type

Description

REPORT_DATE

DATETIME

Date when the report was run.

USAGE_DATE

DATE

Usage date.

LISTING_OWNER_ACCOUNT_NAME

VARCHAR

Name of the provider account that owns the listing.

LISTING_OWNER_ACCOUNT_LOCATOR

VARCHAR

Account locator for the provider account that owns the listing. For more information about account identifiers, see account identifier.

LISTING_NAME

VARCHAR

Identifier for the listing.

LISTING_DISPLAY_NAME

VARCHAR

Display name for the listing.

LISTING_GLOBAL_NAME

VARCHAR

Global name for the listing.

CONSUMER_ACCOUNT_LOCATOR

VARCHAR

Account locator of the consumer account.

CONSUMER_ACCOUNT_NAME

VARCHAR

Name of the consumer account.

CONSUMER_ORGANIZATION_NAME

VARCHAR

Organization name of the consumer account.

CONSUMER_SNOWFLAKE_REGION

VARCHAR

Cloud service region where the consumer account is hosted.

PRICING_PLAN

JSON

JSON value that includes the specifics of the pricing plan. Only included in the output for paid usage.

CHARGE_TYPE

VARCHAR

Type of charge assessed. For more information about the components of the pricing model for paid listings, see Snowflake Marketplace Pricing Model. Possible values: TRIAL_QUERIES: No charge. The queries were executed within the trial period for the listing. . FIXED_ONLY: Per-month charges only. . FIXED_PLUS: Per-month plus per-query charges. . FREE_QUERIES: No charge. The queries were counted among the free queries allowed in the calendar month (after the first query) before the per-query charge is applied. . VARIABLE: Per-query charges only. . MAX_REACHED: No charge. The queries were executed after the maximum total monthly cost for this listing was reached.

UNITS

VARCHAR

Number of queries included in the charge. For a FIXED charge, this value is 1.

UNIT_PRICE

DECIMAL

Per-month or per-query fee. For free queries or after the maximum total charge for the month is reached, the value is 0.

GROSS_CHARGE

DECIMAL

Total charge for this line item on this day.

CURRENCY

VARCHAR

USD

Examples

Retrieve the total number of queries run and the total gross charges by customer and month. Queries are returned as number of units:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, consumer_organization_name
, consumer_snowflake_region
, consumer_account_locator
, consumer_account_name
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.organization_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5,6;

Retrieve the total number of queries run and the total gross charges by listing and month:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, listing_name
, listing_display_name
, listing_global_name
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.organization_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5;

Retrieve the total number of queries run and the total gross charges by charge type, consumer, and month:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, consumer_organization_name
, consumer_snowflake_region
, consumer_account_locator
, consumer_account_name
, charge_type
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.organization_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5,6,7;

DATA_SHARING_USAGE Views

Schema:

DATA_SHARING_USAGE

MARKETPLACE_DISBURSMENT_REPORT View

The MARKETPLACE_DISBURSMENT_REPORT view in the ORGANIZATION_USAGE schema can be used to query the history of your earnings from paid listings in the Snowflake Marketplace.

The view includes the history for a specific listing.

Columns

Column Name

Data Type

Description

EVENT_DATE

DATE

Date when the payment event occurred.

EVENT_TYPE

VARCHAR

Type of event (payment).

INVOICE_DATE

DATE

Date of the invoice.

LISTING_NAME

VARCHAR

Identifier for the listing.

LISTING_DISPLAY_NAME

VARCHAR

Display name for the listing.

LISITNG_GLOBAL_NAME

VARCHAR

Global name of the listing.

CHARGE_TYPE

VARCHAR

Type of charge assessed. For more information about the components of the pricing model for paid listings, see Snowflake Marketplace Pricing Model. Possible values: FIXED: Per-month charges. Also includes per-query charges if included by the provider in the pricing plan for the listing. VARIABLE: Per-query charges only.

GROSS

DECIMAL

Gross amount billed.

FEES

DECIMAL

Pre-tax fees that Snowflake subtracted from the gross amount.

TAXES

DECIMAL

Sales tax on the FEES column amount.

NET_AMOUNT

DECIMAL

Actual amount to be paid to the provider. The price is calculated by subtracting fees and taxes from the gross amount paid by the consumer.

CURRENCY

VARCHAR

USD

Examples

Retrieve the total amount disbursed to a provider’s bank account for each month for each listing:

SELECT
  event_date
, listing_name
, listing_display_name
, listing_global_name
, currency
, SUM(net_amount) AS net_amount
FROM snowflake.data_sharing_usage.marketplace_disbursement_report
WHERE event_type = 'payment'
GROUP BY 1,2,3,4,5;

Retrieve the total amount that has been disbursed for each invoice period, grouped by listing and charge type. Note that the invoice period could be spread out over multiple report dates:

SELECT
  invoice_date
, listing_name
, listing_display_name
, listing_global_name
, charge_type
, currency
, SUM(gross) AS gross
, SUM(fees) AS fees
, SUM(taxes) AS taxes
, SUM(net_amount) AS net_amount
FROM snowflake.data_sharing_usage.marketplace_disbursement_report
WHERE event_type = 'payment'
GROUP BY 1,2,3,4,5,6;

LISTING_EVENTS_DAILY View

The LISTING_EVENTS_DAILY view in the DATA_SHARING_USAGE schema can be used to query the daily history of consumer activity on data listings, including:

  • Consumer mounts a database from a free or personalized listing.

  • Consumer requests a personalized listing or a free listing where data is not yet available.

  • Consumer mounts the trial database for a paid listing.

  • Consumer buys a monetized listing. Note, they are not charged unless they query the data.

  • Consumer decides to no longer use the paid data for a monetized listing.

To retrieve data listing usage statistics, query the MONETIZED_USAGE_DAILY view in the ORGANIZATION_USAGE or DATA_SHARING_USAGE schema.

The view includes the history of consumer activity for a specific listing.

Columns

Column Name

Data Type

Description

EVENT_DATE

DATE

Date of the event.

EXCHANGE_NAME

VARCHAR

Name of the data exchange the listing belongs to.

EVENT_TYPE

VARCHAR

GET: Consumer creates a database for a free or personalized listing. . REQUEST: Consumer requests a personalized listing or a free listing where the data is not available yet. . TRIAL: Consumer creates a trial database for a paid listing. . PURCHASE: Consumer agrees to be invoiced when paid data in a paid listing is queried. . CANCEL PURCHASE: Consumer decides to no longer use the paid data in a paid listing.

SNOWFLAKE_REGION

VARCHAR

Snowflake region where the REQUEST or GET event occurred.

LISTING_NAME

VARCHAR

Identifier of the listing.

LISTING_DISPLAY_NAME

VARCHAR

Display name of the listing.

LISTING_GLOBAL_NAME

VARCHAR

Global name of the listing.

CONSUMER_ACCOUNT_LOCATOR

VARCHAR

Account locator of the consumer account. For more information about account identifiers, see account identifier.

CONSUMER_ACCOUNT_NAME

VARCHAR

Name of the consumer account.

CONSUMER_ORGANIZATION_NAME

VARCHAR

Organization name of the consumer account.

CONSUMER_EMAIL

VARCHAR

Email address for the consumer account (if available).

CONSUMER_METADATA

VARCHAR

Other information included by the consumer when the event occurred.

TERMS_ACCEPTED

DATETIME

Timestamp when the consumer accepted the terms of service.

MONETIZED_USAGE_DAILY View

The MONETIZED_USAGE_DAILY view in the ORGANIZATION_USAGE schema can be used to query the history of daily consumer queries per data listing, including charges accumulated for the usage. Note that for consumer payment information, query the MARKETPLACE_DISBURSMENT_REPORT view in the ORGANIZATION_USAGE or DATA_SHARING_USAGE schema.

The view includes the history of consumer queries for a specific listing.

Columns

Column Name

Data Type

Description

REPORT_DATE

DATETIME

Date when the report was run.

USAGE_DATE

DATE

Usage date

LISTING_NAME

VARCHAR

SQL identifier for the listing.

LISTING_DISPLAY_NAME

VARCHAR

Display name for the listing.

LISTING_GLOBAL_NAME

VARCHAR

Global name for the listing.

CONSUMER_ACCOUNT_LOCATOR

VARCHAR

Account locator of the consumer account.

CONSUMER_ACCOUNT_NAME

VARCHAR

Name of the consumer account.

CONSUMER_ORGANIZATION_NAME

VARCHAR

Organization name of the consumer account.

CONSUMER_SNOWFLAKE_REGION

VARCHAR

Cloud service region where the consumer account is hosted.

PRICING_PLAN

JSON

JSON value that includes the specifics of the pricing plan. Only included in the output for paid usage.

CHARGE_TYPE

VARCHAR

Type of charge assessed. For more information about the components of the pricing model for paid listings, see Snowflake Marketplace Pricing Model. Possible values: TRIAL_QUERIES: No charge. The queries were executed within the trial period for the listing. . FIXED_ONLY: Per-month charges only. . FIXED_PLUS: Per-month plus per-query charges. . FREE_QUERIES: No charge. The queries were counted among the free queries allowed in the calendar month (after the first query) before the per-query charge is applied. . VARIABLE: Per-query charges only. . MAX_REACHED: No charge. The queries were executed after the maximum total monthly cost for this listing was reached.

UNITS

VARCHAR

Number of queries included in the charge. For a FIXED charge, this value is 1.

UNIT_PRICE

DECIMAL

Per-month or per-query fee. For free queries or after the maximum total charge for the month is reached, the value is 0.

GROSS_CHARGE

DECIMAL

Total charge for this line item on this day.

CURRENCY

VARCHAR

USD

Examples

Retrieve the total number of queries run and the total gross charges by customer and month. Queries are returned as number of units:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, consumer_organization_name
, consumer_snowflake_region
, consumer_account_locator
, consumer_account_name
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.data_sharing_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5,6;

Retrieve the total number of queries run and the total gross charges by listing and month:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, listing_name
, listing_display_name
, listing_global_name
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.data_sharing_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5;

Retrieve the total number of queries run and the total gross charges by charge type, consumer, and month:

SELECT
  DATE_TRUNC(MONTH, usage_date) AS usage_month
, consumer_organization_name
, consumer_snowflake_region
, consumer_account_locator
, consumer_account_name
, charge_type
, currency
, SUM(units) AS units
, SUM(gross_charge) AS gross_charge
FROM snowflake.data_sharing_usage.monetized_usage_daily
GROUP BY 1,2,3,4,5,6,7;
Back to top