- Schema:
PARTNER_USAGE_IN_CURRENCY_DAILY view¶
The PARTNER_USAGE_IN_CURRENCY_DAILY view in the BILLING schema provides the daily credit usage and daily currency usage for all of a reseller’s customers.
Columns¶
Column Name |
Data Type |
Description |
---|---|---|
ORGANIZATION_NAME |
VARCHAR |
Name of the reseller’s organization. |
SOLD_TO_ORGANIZATION_NAME |
VARCHAR |
Name of the organization of the reseller’s customer. |
SOLD_TO_CUSTOMER_NAME |
VARCHAR |
Name of the reseller’s customer. |
SOLD_TO_PO_NUMBER |
VARCHAR |
Purchase order number associated with the reseller’s sale to the customer (if available). |
SOLD_TO_CONTRACT_NUMBER |
VARCHAR |
Number associated with the customer’s contract with the reseller. |
ACCOUNT_NAME |
VARCHAR |
Name of the account where the usage was consumed. |
ACCOUNT_LOCATOR |
VARCHAR |
Locator for the account where the usage was consumed. The locator is used in the legacy account identifier. |
REGION |
VARCHAR |
Name of the region where the account is located. |
SERVICE_LEVEL |
VARCHAR |
Service level of the Snowflake account (Standard, Enterprise, Business Critical, etc.). |
USAGE_DATE |
DATE |
Date (in UTC) in which the usage took place. |
USAGE_TYPE |
VARCHAR |
Type of usage. For each usage type,
|
CURRENCY |
VARCHAR |
Currency associated with the usage. |
USAGE |
NUMBER (38,6) |
Total number of credits charged for the USAGE_TYPE for usage on the USAGE_DATE. |
USAGE_IN_CURRENCY |
NUMBER (38,6) |
Total amount charged for the USAGE_TYPE for USAGE on the USAGE_DATE. |
BALANCE_SOURCE |
VARCHAR |
Source of the funds used to pay for the daily usage. Can be one of the following:
|
BILLING_TYPE |
VARCHAR |
Indicates what is being charged or credited. Possible billing types include:
|
RATING_TYPE |
VARCHAR |
Indicates how the usage in the record is rated, or priced. Possible values include:
|
SERVICE_TYPE |
VARCHAR |
Type of usage. The following list includes many, but not all, of the possible service types:
|
IS_ADJUSTMENT |
BOOLEAN |
Indicates whether the record is an adjustment to usage. |
Usage notes¶
Latency for the view can be up to 24 hours.
Until month close, data for a given day in a month can change to account for any end-of-month adjustments, contract amendments, or Snowflake account transfers between organizations.
Example query¶
To query the usage in credits and currency for all Snowflake accounts under your customers’ organizations for the month of January 2022:
SELECT * FROM snowflake.billing.partner_usage_in_currency_daily
WHERE MONTH(usage_date) = 01
AND YEAR(usage_date) = 2022
ORDER BY sold_to_contract_number, usage_date ASC;