Monitor default storage costs
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.
Because default storage is not deployed in your cloud account, your cloud-provider credits or discounts do not apply to default storage usage.
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 |
|---|---|
|
|
| The type of default storage usage. Possible values are:
|
| The ID of the metastore associated with the default storage usage. Default storage usage is aggregated at the metastore level. |
| 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 default storage usage by metastore
The following query returns monthly usage by default storage space, aggregated by metastore:
SELECT
usage_metadata.metastore_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
ORDER BY month DESC;
Track monthly API operations usage by metastore
The following query returns monthly usage by API operations on default storage, aggregated by metastore:
SELECT
usage_metadata.metastore_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
ORDER BY month DESC;