billable_usage
Creates, updates, deletes, gets or lists a billable_usage resource.
Overview
| Name | billable_usage |
| Type | Resource |
| Id | databricks_account.billing.billable_usage |
Fields
The following fields are returned by SELECT queries:
- billable_usage_download
| Name | Datatype | Description |
|---|---|---|
contents | string |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
billable_usage_download | select | account_id, start_month, end_month | personal_data | Returns billable usage logs in CSV format for the specified account and date range. For the data |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | |
end_month | string | Format: YYYY-MM. Last month to return billable usage logs for. This field is required. |
start_month | string | Format specification for month in the format YYYY-MM. This is used to specify billable usage start_month and end_month properties. Note: Billable usage logs are unavailable before March 2019 (2019-03). |
personal_data | boolean | Specify whether to include personally identifiable information in the billable usage logs, for example the email addresses of cluster creators. Handle this information with care. Defaults to false. |
SELECT examples
- billable_usage_download
- Export to CSV
Returns billable usage logs in CSV format for the specified account and date range. For the data
SELECT
contents
FROM databricks_account.billing.billable_usage
WHERE account_id = '{{ account_id }}' -- required
AND start_month = '{{ start_month }}' -- required
AND end_month = '{{ end_month }}' -- required
AND personal_data = '{{ personal_data }}'
;
Export billable usage data to a local CSV file using the StackQL CLI:
./stackql exec \
-o text \
--hideheaders \
-f billable_usage.csv \
"SELECT contents
FROM databricks_account.billing.billable_usage
WHERE start_month = '2025-12'
AND end_month = '2026-01'
AND account_id = 'your-account-id'"
This downloads the usage data in CSV format directly from the Databricks API.