Skip to main content

billable_usage

Creates, updates, deletes, gets or lists a billable_usage resource.

Overview​

Namebillable_usage
TypeResource
Iddatabricks_account.billing.billable_usage

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
contentsstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
billable_usage_downloadselectaccount_id, start_month, end_month, account_hostpersonal_dataReturns billable usage logs in CSV format for the specified account and date range.

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.

NameDatatypeDescription
account_hoststringThe Databricks account console host. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws), or set explicitly with DATABRICKS_ACCOUNT_HOST (bare host, no scheme). (default: accounts.cloud.databricks.com, x-stackQL-envVar: DATABRICKS_ACCOUNT_HOST, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"accounts.cloud.databricks.com","azure":"accounts.azuredatabricks.net","gcp":"accounts.gcp.databricks.com"}})
account_idstring
end_monthstringFormat: YYYY-MM. Last month to return billable usage logs for. This field is required.
start_monthstringFormat 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_databooleanSpecify 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​

Returns billable usage logs in CSV format for the specified account and date range.

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 account_host = '{{ account_host }}' -- required
AND personal_data = '{{ personal_data }}'
;