- Schema:
MONETIZED_USAGE_DAILY View¶
As a provider of listings, the MONETIZED_USAGE_DAILY view in the ORGANIZATION_USAGE schema lets you query the history of daily consumer usage for each listing, including charges accumulated for the usage. For consumer payment information, query the MARKETPLACE_DISBURSEMENT_REPORT view in the ORGANIZATION_USAGE or DATA_SHARING_USAGE schema.
The view includes the history of consumer usage for all accounts in your Snowflake organization.
Note
As part of the preview of Custom Event Billing, the CHARGE_TYPE column contains additional values.
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 Paid listings pricing models. Possible values:
Additional values are part of preview functionality:
|
UNITS |
VARCHAR |
Number of queries included in the charge. For a |
UNIT_PRICE |
DECIMAL |
Per-month or per-query fee. For free queries or usage after the maximum total charge for the month is reached,
the value is |
GROSS_CHARGE |
DECIMAL |
Total charge for this line item on this day. |
CURRENCY |
VARCHAR |
USD |
Usage Notes¶
Latency for the view can be up to 24 hours (1 day).
The data is retained for 365 days (1 year).
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;