Table: scaleway_billing_consumption - Query Scaleway Billing comsumption using SQL
Scaleway Billing Consumption tracks the costs of various scaleway products such as object_storage, storage, serverless, etc.
Important Notes
- This table requires an Organization ID to be configured in the
scaleway.spc
file.
Table Usage Guide
The scaleway_billing_consumption
table offers insights into the Billing Consumption within Scaleway.
Examples
Basic info
Explore the billing for all scaleway services.
select category_name, product_name, project_id, resource_name, valuefrom scaleway_billing_consumption;
select category_name, product_name, project_id, resource_name, valuefrom scaleway_billing_consumption;
List consumption by category
Explore costs by product category of scaleway
select category_name, sum((value -> 'units') :: float) AS unitsfrom scaleway_billing_consumptiongroup by category_name;
select category_name, sum((value -> 'units') :: float) AS unitsfrom scaleway_billing_consumptiongroup by category_name;
List consumption by Project ID
Explore costs by product category of scaleway
select project_id, sum((value -> 'units') :: float) AS unitsfrom scaleway_billing_consumptiongroup by project_id;
select project_id, sum((value -> 'units') :: float) as unitsfrom scaleway_billing_consumptiongroup by project_id;
Schema for scaleway_billing_consumption
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
billed_quantity | jsonb | Consumed quantity. | |
category_name | text | = | The CategoryName: name of consumption category. |
product_name | text | The product name. For example, VPC Public Gateway S, VPC Public Gateway M for the VPC product. | |
project_id | text | The project ID of the consumption. | |
resource_name | text | Identifies the reference based on the category. | |
sku | text | The unique identifier of the product. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
unit | text | The unit of consumed quantity. | |
value | jsonb | Monetary value of the consumption. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- scaleway
You can pass the configuration to the command with the --config
argument:
steampipe_export_scaleway --config '<your_config>' scaleway_billing_consumption