Notă
Accesul la această pagină necesită autorizare. Puteți încerca să vă conectați sau să modificați directoarele.
Accesul la această pagină necesită autorizare. Puteți încerca să modificați directoarele.
This article explains how to use the billable usage system table to monitor the cost of your default storage usage.
How default storage usage is measured
You are charged for default storage based on both the storage space used and the API operations performed on the data. Both of these usage types are measured in DSUs. For specific pricing information, see Default storage pricing.
Understanding default storage usage records
You can track and attribute usage of default storage by querying the billable usage system table (system.billing.usage).
The following table describes the key columns and metadata fields for default storage usage records:
| Column | Values |
|---|---|
billing_origin_product |
DEFAULT_STORAGE |
usage_type |
The type of default storage usage. Possible values are:
|
usage_metadata.metastore_id |
The ID of the metastore associated with the default storage usage |
usage_metadata.catalog_id |
The ID of the catalog associated with the default storage usage. Default storage usage is aggregated at the catalog level. |
usage_metadata.storage_api_type |
Only populated for default storage API operation usage. Otherwise null. Possible values are:
|
For more information on reading the usage table, see Billable usage system table reference.
Track monthly storage usage by catalog
The following query returns monthly usage by default storage space, aggregated by catalog:
SELECT
usage_metadata.metastore_id,
usage_metadata.catalog_id,
DATE_TRUNC('month', usage_date) AS month,
SUM(usage_quantity) AS dsu
FROM system.billing.usage
WHERE billing_origin_product = 'DEFAULT_STORAGE'
AND usage_type = 'STORAGE_SPACE'
GROUP BY 1, 2, 3
ORDER BY month DESC;
Track monthly API operations usage by catalog
The following query returns monthly usage by API operations on default storage, aggregated by catalog:
SELECT
usage_metadata.metastore_id,
usage_metadata.catalog_id,
usage_metadata.storage_api_type,
DATE_TRUNC('month', usage_date) AS month,
SUM(usage_quantity) AS dsu
FROM system.billing.usage
WHERE billing_origin_product = 'DEFAULT_STORAGE'
AND usage_type = 'API_OPERATION'
GROUP BY 1, 2, 3, 4
ORDER BY month DESC;