This chapter covers Google Cloud billing reports, cost tables, and budget alerts—critical tools for managing cloud spend and optimizing costs. For the ACE exam, you must understand how to view and export billing data, use labels for cost allocation, create budget alerts, and analyze cost trends. Approximately 5-8% of exam questions touch on billing and cost management, often in scenario-based questions where you need to recommend the right tool or configuration. Mastery of these concepts ensures you can answer questions about cost control, invoicing, and budget monitoring.
Jump to a section
Imagine you run a company with multiple departments (projects) and each department uses shared resources like printers, conference rooms, and cloud storage. Every month, you receive a detailed bill from the facilities manager. However, this bill only shows total costs for the entire company—you cannot see which department printed 10,000 pages or who booked the premium conference room for 200 hours. To gain visibility, you implement a system: each department must tag every resource request with a unique cost code (label). The facilities manager then generates a cost allocation report that breaks down expenses by cost code, showing exactly how much each department spent on printers, rooms, and storage. Additionally, you set up budget alerts so that when a department's printing costs exceed 80% of its monthly budget, you receive an email notification. The billing reports in Google Cloud work similarly: they aggregate usage and costs across all projects, but you must assign labels to resources to get granular cost breakdowns. Budget alerts notify you when spending approaches predefined thresholds, and cost tables (BigQuery billing export) allow you to query historical data for custom analysis—like a financial inbox where you can sort, filter, and drill into every expense.
What are Billing Reports and Cost Tables?
Google Cloud provides several tools to help you understand and manage your cloud spending. The primary interface is the Google Cloud Console Billing page, which offers a graphical overview of your costs. However, for deeper analysis, you need cost tables—specifically, the BigQuery billing export feature that streams detailed usage and cost data into a BigQuery dataset. This allows you to run custom SQL queries, create dashboards, and perform advanced analytics.
Why They Exist
Cloud costs can spiral without visibility. Billing reports give you a high-level view, but they are insufficient for granular cost allocation, chargebacks, or trend analysis. Cost tables solve this by providing raw data at the resource level, enabling you to:
Break down costs by project, service, SKU, region, or label.
Track cost trends over time.
Allocate costs to different teams or departments.
Create custom alerts and budgets.
How It Works Internally
When you use Google Cloud services, usage data is collected by the Cloud Billing system. This system aggregates usage metrics (e.g., compute hours, storage GB-months, network egress bytes) and applies pricing rules from the Cloud Billing pricing catalog. The resulting cost data is stored in the Cloud Billing account and made available via: - Cloud Console Billing reports: Pre-built charts and tables refreshed every few hours. - BigQuery billing export: A continuous stream of detailed cost data into a BigQuery table, updated daily.
The BigQuery export includes a table named gcp_billing_export_v1_<billing_account_id> (or a custom name you choose) with over 40 columns, including:
- invoice.month: The billing month.
- service.description: The GCP service (e.g., Compute Engine).
- sku.description: The specific SKU (e.g., N1 Predefined Instance Core).
- project.id: The project that used the resource.
- labels: A repeated field with key-value pairs.
- cost: The cost in USD (or your billing currency).
- usage.amount: The amount of usage (e.g., hours).
- credits: Any applicable credits (e.g., sustained use discounts).
Key Components, Values, Defaults, and Timers
Billing Account Types: - Self-serve (online): Pay-as-you-go with automatic card charges. No invoice PDF. - Invoiced (offline): Monthly invoicing with purchase order. Invoice PDF available.
Budget Alerts: - You create a budget at the billing account or project level. - You can set amount (a fixed dollar amount) or last month's spend as a reference. - You define alert threshold rules with percentages (e.g., 50%, 90%, 100%). - You can also set forecasted threshold alerts (e.g., 100% of forecast). - Alerts are sent via email to Billing Administrators and Budget Administrators by default, but you can add Pub/Sub topics for programmatic notifications. - Alerts are triggered once when the threshold is crossed, and then again if the spend drops below and re-crosses the threshold.
BigQuery Export:
- You must enable the export in the Cloud Console under Billing > Cost Management > Cost Table.
- The export creates a BigQuery dataset and a table that is updated daily (usually by 10 AM Pacific Time for the previous day's data).
- Data is retained indefinitely (no automatic deletion).
- You can query the table using standard SQL.
- The table is partitioned by day on the _PARTITIONTIME pseudo-column for efficient queries.
Labels:
- Labels are key-value pairs attached to resources (e.g., environment:production, team:engineering).
- They are not retroactive; you must apply them before usage to see them in cost tables.
- Labels appear in the labels column as a repeated record with key and value fields.
Configuration and Verification Commands
Enable BigQuery Billing Export (via Console): 1. Go to Billing > Cost Management > Cost Table. 2. Click Enable BigQuery Export. 3. Select an existing BigQuery dataset or create a new one. 4. Optionally, set a custom table name. 5. Click Save.
Verify Export with `bq` command:
bq ls --dataset <dataset_name>You should see a table named gcp_billing_export_v1_<billing_account_id>.
Query Example:
SELECT
project.id,
service.description,
SUM(cost) AS total_cost
FROM
`project.dataset.gcp_billing_export_v1_*`
WHERE
_PARTITIONTIME >= TIMESTAMP('2023-01-01')
AND _PARTITIONTIME < TIMESTAMP('2023-02-01')
GROUP BY
project.id, service.description
ORDER BY
total_cost DESCCreate a Budget (via Console): 1. Go to Billing > Budgets & alerts. 2. Click Create budget. 3. Set scope (billing account or a specific project). 4. Set amount (e.g., $1,000). 5. Set alert thresholds (e.g., 50%, 90%, 100%). 6. Add notification channels (email, Pub/Sub). 7. Click Create.
Verify Budget with `gcloud`:
gcloud billing budgets list --billing-account=XXXXXX-XXXXXX-XXXXXXInteraction with Related Technologies
IAM: Permissions required to view billing data include billing.accounts.getSpendingInformation (for billing reports) and billing.resourceCosts.get (for cost table access). The Billing Account Viewer role (roles/billing.viewer) is commonly used.
Cloud Monitoring: Budget alerts can be integrated with Cloud Monitoring using Pub/Sub to trigger alerts in Slack, PagerDuty, etc.
Cloud Asset Inventory: Labels are also used in asset inventory for cost allocation.
Recommender: Cost insights from the Recommender can be cross-referenced with billing data to identify idle resources.
Trap Patterns
Labels not appearing in cost tables: Labels must be applied before the usage occurs. If you add a label retroactively, it will not appear in historical cost data. The exam may present a scenario where a user complains labels are missing from cost reports—this is the likely cause.
Budget alerts not triggering: Alerts are triggered only when the threshold is crossed. If you set a 100% threshold and the budget is exactly $1000, the alert fires when cost reaches $1000. However, if costs jump from $900 to $1100 in one day, the alert fires at $1000 (once). The exam may test that alerts are not triggered for every increment.
BigQuery export vs. Reports: The exam may ask which tool to use for custom SQL queries—the answer is BigQuery export, not the Console reports.
Currency conversion: If your billing currency is not USD, costs are converted at the exchange rate at the time of usage. The exam may include a question about how to see costs in a different currency.
Access Billing Reports in Console
Log into Google Cloud Console, navigate to Billing > Overview. This page shows a summary of current costs for the selected billing account. You can filter by project, service, or region. The data is refreshed every few hours but is not real-time. For the exam, remember that Console reports are suitable for quick glances but not for custom analysis.
Enable BigQuery Billing Export
Go to Billing > Cost Management > Cost Table. Click 'Enable BigQuery Export'. Choose an existing BigQuery dataset or create a new one. You can optionally set a custom table name. Once enabled, Google Cloud will start streaming cost data into a table with a naming pattern like `gcp_billing_export_v1_<billing_account_id>`. The export is daily; data for a given day appears by the next morning (typically by 10 AM Pacific). The table is partitioned by day for efficient querying.
Query Cost Data with SQL
Use BigQuery's SQL interface to query the exported table. For example, to get total cost per service for a specific month, you can write a SELECT statement with GROUP BY. You can also filter by labels, region, or SKU. The `_PARTITIONTIME` pseudo-column allows you to query specific days efficiently. Remember that the table name includes the billing account ID, so you may need to use wildcards like `gcp_billing_export_v1_*` if you have multiple billing accounts.
Create a Budget Alert
Navigate to Billing > Budgets & alerts and click 'Create budget'. Set the scope: either the entire billing account or a specific project. Then set the budget amount as a fixed dollar value or based on last month's spend. Define alert threshold rules as percentages (e.g., 50%, 90%, 100%). You can also set forecasted threshold alerts. Finally, configure notifications: email to Billing Administrators and Budget Administrators by default, or add a Pub/Sub topic for programmatic alerts. Alerts trigger once per threshold crossing.
Analyze Costs with Labels
To get granular cost allocation, apply labels to your resources (e.g., `cost-center:marketing`). Labels must be applied before usage to appear in cost data. In the BigQuery export table, the `labels` field contains an array of key-value pairs. You can unnest this array in SQL to filter or group by label. For example: `SELECT labels.key, labels.value, SUM(cost) FROM ... CROSS JOIN UNNEST(labels) AS labels GROUP BY labels.key, labels.value`. This allows you to allocate costs to specific teams or environments.
Enterprise Scenario 1: Multi-Project Cost Allocation
A large enterprise runs 50 projects across three departments: Engineering, Marketing, and Sales. Each department has its own budget. The finance team needs a monthly report showing costs per department. The solution: apply a label department to every resource (e.g., department:engineering). Enable BigQuery billing export. Write a SQL query that groups by labels.key and labels.value to get costs per department. Set up a scheduled query that exports the results to a Google Sheet via Apps Script. The challenge: ensuring all resources are labeled consistently. Use Organization Policy to enforce label requirements. Common pitfall: resources created without labels before the policy was enforced will not have labels in historical data. The finance team must backfill labels manually or accept incomplete data.
Enterprise Scenario 2: Budget Alert for a Critical Production Project
A SaaS company runs its production environment in a single project. The monthly budget is $10,000. They want to be alerted when spending reaches 80% and 100% of the budget. They create a budget at the project level with thresholds at 80% and 100%. They add a Pub/Sub topic that triggers a Cloud Function to send a Slack message. They also set a forecasted alert at 100% to catch potential overruns. The budget alert works well, but one month, due to a DDoS attack, network egress costs spike, causing the 80% threshold to be crossed within a day. The alert fires once. The team misses the alert because it was a single email. They later add a second threshold at 90% to get more granularity. The exam may test that alerts are not real-time and only fire once per threshold.
Enterprise Scenario 3: Analyzing Cost Trends for Reserved Instances
A media company uses Compute Engine with committed use discounts (CUDs). They want to analyze whether CUDs are actually saving money. They export billing data to BigQuery and query cost with and without credits. They compare the cost column (which includes CUD credits) against the cost before credits. They discover that some CUDs are underutilized. They create a dashboard in Data Studio showing monthly cost trends, CUD utilization, and recommendations. The key performance consideration: querying large tables with many partitions can be expensive in BigQuery. They use clustering on service.description and project.id to reduce query costs.
What ACE Tests on This Topic
The ACE exam (Objective 4.2) focuses on your ability to:
Enable and configure billing reports and cost tables.
Use labels for cost allocation.
Set up budget alerts and notifications.
Interpret billing data to identify cost drivers.
Export billing data to BigQuery for custom analysis.
Common Wrong Answers and Why Candidates Choose Them
Mistaking Console reports for BigQuery export: A question asks, 'How do you run custom SQL queries on billing data?' The wrong answer is 'Use the Billing Reports page in the Console.' Candidates pick this because they think reports are interactive. The correct answer is 'Enable BigQuery billing export and query the table.'
Assuming labels are retroactive: A scenario says, 'A user added labels to resources last week, but they don't appear in this month's cost report.' The wrong answer is 'The labels are not applied correctly.' Candidates may think labels are immediate. The correct answer is 'Labels must be applied before usage; historical data does not reflect retroactive labels.'
Thinking budget alerts are real-time: A question asks, 'How quickly will a budget alert be sent after crossing a threshold?' The wrong answer is 'Within minutes.' Candidates assume cloud monitoring is real-time. The correct answer is 'Alerts are triggered once per threshold crossing and may have a delay of several hours.'
Confusing billing account roles: A question asks, 'Who receives budget alert emails by default?' The wrong answer is 'Project Owners.' Candidates think project-level alerts go to project owners. The correct answer is 'Billing Administrators and Budget Administrators of the billing account.'
Specific Numbers and Terms
BigQuery export update time: Daily, usually by 10 AM Pacific for the previous day.
Budget alert thresholds: Percentages (e.g., 50%, 90%, 100%) and forecasted thresholds.
Label requirement: Must be applied before usage to appear in cost data.
Billing account types: Self-serve (automatic card charge) vs. Invoiced (monthly invoice).
IAM roles: roles/billing.viewer for viewing reports, roles/billing.admin for managing budgets.
Edge Cases and Exceptions
Multiple billing accounts: If you have more than one billing account, you must enable export for each separately.
Currency conversion: Costs are stored in the billing currency; if the currency is not USD, the cost column is in that currency. To convert, you need to use exchange rate tables.
Credit types: The credits column includes a list of credits with name and amount. Sustained use discounts appear as credits.
Zero-cost usage: Some services (e.g., Cloud Shell) may show zero cost but still appear in the export.
How to Eliminate Wrong Answers
If the question mentions 'custom SQL queries' or 'advanced analytics', eliminate any answer that mentions Console reports or CSV export without BigQuery.
If the question involves 'historical cost data by label', eliminate answers that suggest adding labels now to see past data.
If the question asks about 'real-time alerts', eliminate answers that claim instant notification; budget alerts are not real-time.
If the question involves 'who receives alerts', eliminate answers that mention project roles unless the budget is scoped to a project and the question specifies project-level budget.
Enable BigQuery billing export for granular, queryable cost data.
Apply labels to resources before usage to enable cost allocation.
Budget alerts are not real-time; they trigger once per threshold crossing.
Billing Administrators receive default budget alert emails.
Console reports are for quick overviews, not custom analysis.
Use `billing.accounts.getSpendingInformation` permission for viewing costs.
BigQuery export table is partitioned by day; use `_PARTITIONTIME` for efficient queries.
These come up on the exam all the time. Here's how to tell them apart.
Billing Reports (Console)
Pre-built charts and tables in the Console.
Data updated every few hours (not real-time).
Limited filtering and grouping options.
Suitable for quick visual overview.
No custom SQL queries possible.
BigQuery Billing Export
Raw data exported to BigQuery tables.
Data updated daily (by 10 AM Pacific).
Full SQL query capability for custom analysis.
Supports advanced analytics, dashboards, and joins.
Requires BigQuery permissions and may incur query costs.
Mistake
Labels applied to resources immediately appear in cost reports.
Correct
Labels must be applied before the usage occurs. Retroactive labels do not appear in historical cost data. The BigQuery export table only includes labels that were present at the time of usage.
Mistake
Budget alerts are sent every time the threshold is crossed.
Correct
Alerts are triggered only once per threshold crossing. If costs go above the threshold, then drop below, and then cross again, a second alert is sent. But continuous crossing does not generate multiple alerts.
Mistake
The Billing Reports page in the Console shows real-time data.
Correct
Console reports are updated every few hours (typically 2-4 hours delay) and are not real-time. For near-real-time data, you need to use the BigQuery export, which is updated daily.
Mistake
You can export billing data to a CSV file directly from the Console.
Correct
The Console allows you to download a CSV of the current report view, but it is limited to the aggregated data shown. For full granularity and custom queries, you must use BigQuery export.
Mistake
Project-level budgets are managed by Project Owners.
Correct
Project-level budgets are still managed within the billing account. The budget creator must have `billing.budgets.create` permission on the billing account, not just on the project. Project Owners do not have this permission by default.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
For invoiced billing accounts, you can download the invoice as a PDF from the Billing page under 'Documents' or 'Invoices'. Self-serve accounts do not receive invoices; they get monthly email receipts. The exam may ask about invoice availability based on account type.
Labels only appear in cost data if they were applied before the usage occurred. If you added labels after the resources were used, those labels will not appear in historical cost reports. To see labels in future data, ensure labels are applied at resource creation time or use organization policies to enforce labeling.
The BigQuery billing export table is updated daily, typically by 10:00 AM Pacific Time for the previous day's usage. There is no real-time streaming option. The exam may test that the export is daily, not hourly.
Yes, when creating a budget, you can scope it to a specific project (or even a specific set of projects using filters). The budget amount and thresholds apply only to that project's costs. Alerts are sent to Billing Administrators and Budget Administrators, not necessarily Project Owners.
A budget is a spending limit you define (e.g., $1,000 per month). An alert is a notification that fires when spending reaches a certain percentage of that budget (e.g., 50%, 90%). You can have multiple alert thresholds for a single budget. The exam may ask how to configure alerts for a budget.
In the BigQuery export table, there is a column `location.region` (or similar) that contains the region code (e.g., us-central1). You can query this column to group costs by region. In Console reports, you can filter by location. The exam may test that region data is available in the export.
Yes, you can set a forecasted threshold alert (e.g., alert when forecasted spend reaches 100% of the budget). This uses machine learning to predict future costs based on historical trends. The alert fires once when the forecast crosses the threshold.
You've just covered Billing Reports and Cost Tables — now see how well it sticks with free ACE practice questions. Full explanations included, no account needed.
Done with this chapter?