> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unomiq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling GCP Detailed Billing Export

> Learn how to enable detailed billing export to BigQuery in Google Cloud Platform for resource-level cost analysis with Unomiq

Unomiq can ingest your GCP billing data to provide cost attribution and analysis across your services. To enable this, you need to export your Cloud Billing data to a BigQuery dataset using the **detailed usage cost** export type.

This guide walks you through enabling the detailed billing export in GCP.

***

## Enable Detailed Billing Export

Follow the official GCP documentation to set up the detailed usage cost export to BigQuery:

<Card title="Export Cloud Billing data to BigQuery" icon="arrow-up-right-from-square" href="https://docs.cloud.google.com/billing/docs/how-to/export-data-bigquery">
  Google Cloud guide covering dataset creation, enabling the export, and GKE cost allocation.
</Card>

When configuring the export, make sure to:

* Select the **Detailed usage cost** export type (not standard)
* Use a BigQuery dataset with **Google-managed encryption** (CMEK is not supported)
* Use a **multi-region** dataset (US or EU) if you want retroactive backfill of up to five days

<Note>
  If you use Google Kubernetes Engine, you must also [enable GKE cost allocation](https://cloud.google.com/kubernetes-engine/docs/how-to/cost-allocations) separately to get cost breakdowns by namespace, cluster, and workload.
</Note>

***

## Verify the Export

After a few hours, verify that data is flowing into BigQuery:

1. Open the [BigQuery console](https://console.cloud.google.com/bigquery).
2. Navigate to your dataset.
3. Look for a table named `gcp_billing_export_resource_v1_<BILLING_ACCOUNT_ID>`.
4. Run a sample query to confirm data is present:

```sql theme={null}
SELECT
  invoice.month,
  service.description,
  SUM(cost) AS total_cost
FROM
  `project_id.dataset_id.gcp_billing_export_resource_v1_XXXXXX_XXXXXX_XXXXXX`
WHERE
  invoice.month = FORMAT_DATE('%Y%m', CURRENT_DATE())
GROUP BY
  invoice.month, service.description
ORDER BY
  total_cost DESC
LIMIT 10
```

Replace `project_id.dataset_id` and the table name suffix with your actual values.

***

## Important Considerations

* **Data latency**: Billing data typically appears in BigQuery within a few hours, but it can take up to 24 hours.
* **Retroactive backfill**: When first enabled with a multi-region dataset, GCP backfills up to five days of historical data.
* **Dataset changes**: If you change the destination dataset, previously exported data is not automatically migrated to the new dataset.

***

## Next Steps

Once your detailed billing export is active and data is flowing into BigQuery, connect it to Unomiq to start analyzing costs alongside your application traces. See the [Unomiq Dashboard](https://dashboard.unomiq.com) to configure the integration.
