- Schema:
MARKETPLACE_PAID_USAGE_DAILY View¶
As a consumer, you can use the MARKETPLACE_PAID_USAGE_DAILY view in the DATA_SHARING_USAGE schema to query the daily history of your usage of a specific paid listing. Retrieve the charges for the usage and the count of queries executed by your users on specific listings.
This view includes the history of consumer payments for a specific listing.
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 |
DATETIME |
Usage date. |
PROVIDER_NAME |
VARCHAR |
Provider display name from listing. |
PROVIDER_ACCOUNT_NAME |
VARCHAR |
Account name of the provider. |
PROVIDER_ACCOUNT_LOCATOR |
VARCHAR |
Account locator of the provider account. For more information about account identifiers, see account identifier. |
PROVIDER_ORGANIZATION_NAME |
VARCHAR |
Organization name for the provider. |
LISTING_DISPLAY_NAME |
VARCHAR |
Display name of the listing. |
LISTING_GLOBAL_NAME |
VARCHAR |
Global name of the listing. |
DATABASE_NAME |
VARCHAR |
Name of the database associated with this listing. |
PO_NUMBER |
VARCHAR |
Purchase order number associated with this listing. |
PRICING_PLAN |
VARIANT |
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 sample data, the value is |
CHARGE |
DECIMAL |
Total charge for this line item on this day (without tax). |
CURRENCY |
VARCHAR |
USD |
Usage Notes¶
Latency for the view can be up to 48 hours (2 days).
The data is retained for 365 days (1 year).
You can only see the usage for your account, which must be the consumer account that generated the charges.
Examples¶
Retrieve the total amount charged per month and listing:
SELECT
DATE_TRUNC(MONTH, usage_date) AS usage_month
, listing_display_name
, listing_global_name
, SUM(charge) AS charge
FROM snowflake.data_sharing_usage.marketplace_paid_usage_daily
GROUP BY 1,2,3;
Retrieve the total amount charged per month, listing, and type of charge:
SELECT
DATE_TRUNC(MONTH, usage_date) AS usage_month
, listing_display_name
, listing_global_name
, SUM(charge) AS charge
, charge_type
FROM snowflake.data_sharing_usage.marketplace_paid_usage_daily
GROUP BY 1,2,3,4;
Retrieve the total amount charged for usage of an application that uses the Custom Event Billing pricing plan:
SELECT listing_global_name,
listing_display_name,
charge_type,
charge
FROM SNOWFLAKE.DATA_SHARING_USAGE.MARKETPLACE_PAID_USAGE_DAILY
WHERE charge_type='MONETIZABLE_BILLING_EVENTS';