-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[DOCS-11631] BigQuery Cost Allocation #30722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 24 commits
2add607
d49ef0c
c70e515
e262f81
2bc33b5
bf9be64
9b33597
e2630b9
8277f73
758e02a
0f8556c
c99f1b9
0237fca
a54a9ab
e48fcd2
8ad33fe
7702178
28665e4
9f14e0b
a179e66
3818a0f
7614992
187f9e8
1dbb799
86d46fc
d219b67
ecc50a7
d19e673
0c7a8db
e695c23
aa9fb1e
8909598
9f5319e
5711e1a
23c5c15
b688abd
6bacc3d
c75ea87
f7a4e71
432745d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| title: Cost Allocation | ||
| description: Learn how to allocate cloud costs across your organization with Datadog Cloud Cost Management | ||
| further_reading: | ||
| - link: "/cloud_cost_management/" | ||
| tag: "Documentation" | ||
| text: "Learn about Cloud Cost Management" | ||
| - link: "/cloud_cost_management/cost_allocation/container_cost_allocation" | ||
| tag: "Documentation" | ||
| text: "Container Cost Allocation" | ||
| - link: "/cloud_cost_management/cost_allocation/bigquery" | ||
| tag: "Documentation" | ||
| text: "BigQuery Cost Allocation" | ||
| --- | ||
|
|
||
| ## Overview | ||
|
|
||
| Datadog Cloud Cost Management (CCM) provides comprehensive cost allocation capabilities that help you understand and optimize your cloud spending by breaking down costs across different resources and organizational dimensions. Cost allocation enables you to: | ||
|
|
||
| - **Track resource-level spending**: Allocate costs down to individual containers, pods, tasks, and data warehouse queries | ||
| - **Optimize resource utilization**: Identify idle resources and underutilized capacity | ||
| - **Chargeback and showback**: Attribute costs to specific teams, projects, or business units | ||
| - **Make informed decisions**: Understand the true cost of your applications and services | ||
|
|
||
| ## Cost allocation methods | ||
|
|
||
| CCM offers multiple cost allocation methods to help you understand your cloud spending at different levels of granularity: | ||
|
|
||
| ### Container cost allocation | ||
|
|
||
| Automatically allocate the costs of your cloud clusters to individual services and workloads running in those clusters. Use cost metrics enriched with tags from pods, nodes, containers, and tasks to visualize container workload cost in the context of your entire cloud bill. | ||
|
|
||
| Learn more about [Container Cost Allocation][1]. | ||
|
|
||
| ### BigQuery cost allocation | ||
|
|
||
| Allocate BigQuery costs to individual queries, users, and projects to understand your data warehouse spending at a granular level. Track query performance costs, storage costs, and slot utilization across your organization. | ||
|
|
||
| Learn more about [BigQuery Cost Allocation][2]. | ||
|
|
||
| ## Getting started | ||
|
|
||
| To get started with cost allocation: | ||
|
|
||
| 1. **Set up Cloud Cost Management** by configuring your cloud provider integration on the [Cloud Cost Setup page][3]. | ||
| 2. **Enable container monitoring** by installing the Datadog Agent in your containerized environments. | ||
| 3. **Configure tag extraction** for detailed cost breakdown. | ||
| 4. **Set up BigQuery integration** for data warehouse insights. | ||
|
|
||
| ## Further reading | ||
|
|
||
| {{< partial name="whats-next/whats-next.html" >}} | ||
|
|
||
| [1]: /cloud_cost_management/cost_allocation/container_cost_allocation | ||
| [2]: /cloud_cost_management/cost_allocation/bigquery | ||
| [3]: https://app.datadoghq.com/cost/setup | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,183 @@ | ||||||||||
| --- | ||||||||||
| title: BigQuery Cost Allocation | ||||||||||
| description: Learn how to allocate Cloud Cost Management spending across your organization with BigQuery Cost Allocation. | ||||||||||
| further_reading: | ||||||||||
| - link: "/cloud_cost_management/" | ||||||||||
| tag: "Documentation" | ||||||||||
| text: "Learn about Cloud Cost Management" | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## Overview | ||||||||||
|
|
||||||||||
| Datadog Cloud Cost Management (CCM) automatically allocates the costs of your Google BigQuery resources to individual queries and workloads. Use cost metrics enriched with tags from queries, projects, and reservations to visualize BigQuery workload costs in the context of your entire cloud bill. | ||||||||||
|
|
||||||||||
| CCM displays costs for resources including query-level analysis, storage, and data transfer on the [**BigQuery dashboard**][1]. | ||||||||||
|
|
||||||||||
| ## BigQuery pricing models | ||||||||||
|
|
||||||||||
| BigQuery offers multiple pricing components, with CCM focusing on query-related processing costs. | ||||||||||
|
|
||||||||||
| ### Query Processing | ||||||||||
|
|
||||||||||
| **On-demand queries**: You pay per query based on the amount of data processed. | ||||||||||
| - Costs are directly attributed to individual queries based on bytes processed | ||||||||||
| - Includes query-level tags for detailed cost attribution | ||||||||||
|
|
||||||||||
| **Reservation-based queries**: You purchase dedicated processing capacity (slots) in advance at a fixed cost. Multiple queries can share this reserved capacity, making cost attribution more complex but potentially more cost-effective for consistent workloads. | ||||||||||
| - Costs of reserved slots are allocated proportionally to queries using those slots | ||||||||||
| - Allocation based on slot consumption (`total_slot_ms`) per query | ||||||||||
| - Includes idle cost calculation for unused reservation capacity | ||||||||||
|
|
||||||||||
| **Other BigQuery Costs:** | ||||||||||
| - **Storage**: Charges for data stored in BigQuery tables (active and long-term storage) | ||||||||||
| - **Streaming**: Costs for real-time data ingestion via streaming inserts | ||||||||||
| - **Data Transfer**: Charges for moving data between regions or exporting data | ||||||||||
| - **BI Engine**: Costs for in-memory analytics acceleration | ||||||||||
| - **Other services**: ML training, routine executions, and additional BigQuery features | ||||||||||
|
|
||||||||||
| CCM allocates and enriches costs for both query-processing pricing models, providing detailed cost attribution and tagging for your BigQuery analysis workloads. Learn more about BigQuery services and pricing models [**here**][3]. | ||||||||||
|
|
||||||||||
| [**Learn more about optimizing BigQuery performance and costs.**][8] | ||||||||||
|
|
||||||||||
| ## Prerequisites | ||||||||||
|
|
||||||||||
| The following table presents the list of collected features and the minimal requirements: | ||||||||||
|
|
||||||||||
| | Feature | Requirements | | ||||||||||
| |---|---| | ||||||||||
| | Retrieve tags from labels of a query | GCP CCM costs must be setup. Supported without monitoring or reservations. | | ||||||||||
| | Query-Level Cost Attribution | BigQuery monitoring enabled | | ||||||||||
| | Reservation Cost Allocation | BigQuery reservations configured | | ||||||||||
|
|
||||||||||
| 1. Configure the Google Cloud Cost Management integration on the [Cloud Cost Setup page][2]. | ||||||||||
|
||||||||||
| 2. Enable BigQuery monitoring in your Google Cloud project. | ||||||||||
| [**Enable BigQuery monitoring here**][4] | ||||||||||
| 3. For reservation cost allocation, configure BigQuery reservations in your project. [**Learn about BigQuery reservations.**][7] | ||||||||||
|
||||||||||
|
|
||||||||||
| ## Allocating costs | ||||||||||
|
|
||||||||||
| ### Compute | ||||||||||
|
|
||||||||||
| Costs are allocated into the following spend types: | ||||||||||
|
|
||||||||||
| | Spend type | Description | | ||||||||||
| |---|---| | ||||||||||
| | `allocated_spend_type`: Usage | Cost of query execution based on bytes processed (on-demand) or slot consumption (reservation) | | ||||||||||
| | `allocated_spend_type`: Cluster_idle | Cost of reserved slots allocated within a project but not utilized by queries| | ||||||||||
|
||||||||||
| | `allocated_spend_type`: Usage | Cost of query execution based on bytes processed (on-demand) or slot consumption (reservation) | | |
| | `allocated_spend_type`: Cluster_idle | Cost of reserved slots allocated within a project but not utilized by queries| | |
| | `allocated_spend_type:usage` | Cost of query execution based on bytes processed (on-demand) or slot consumption (reservation) | | |
| | `allocated_spend_type:cluster_idle` | Cost of reserved slots allocated within a project but not utilized by queries| |
I think this is a bit cleaner and easier for a user to copy into their query editor, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sg i'll change it to this for the storage types too!
rtrieu marked this conversation as resolved.
Show resolved
Hide resolved
rtrieu marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way we can help customers understand how to take this value and use it to find their schedule in the bigquery ui? Otherwise this is just a random number that does not mean much to them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep theres a sectino for this on the dashboard, i'll add the same section here. Thanks for pointing that out
Uh oh!
There was an error while loading. Please reload this page.