Exporting Cloud Billing Data to BigQuery for Reporting
Short answer
A Do daily exports of Cloud Logging data to BigQuery and create views filtering by project, log type, resource, and user.
Question
quickly and efficiently generate these daily reports. What should you do?
Key Takeaways
The trap is confusing general Cloud Logging with Billing data; while both can go to BigQuery, billing consumption reports require the specific Billing-to-BigQuery export sink, not generic log ingestion.
Generate daily compute consumption reports by exporting billing data to BigQuery and creating filtered views, as manual imports or CSV exports are unsupported or inefficient.
Common mistake: Option C is often chosen because it sounds like 'filtering before import,' but billing data has a fixed schema that cannot be imported manually via custom filters; it must be exported via the dedicated sink.
Expert Analysis
The scenario requires reporting on compute resource consumption and user attribution. This is a billing and cost management question, not a generic log analysis question. Google Cloud provides native integration between Cloud Billing and BigQuery to export billing data for granular analysis.
Option A is correct because it leverages the standard mechanism for exporting billing data: daily exports to BigQuery. The option mentions filtering by 'log type,' which in this context refers to the billing line item types or categories that distinguish compute usage from other costs (like storage or network). Creating views allows for efficient, reusable filtering by project, resource, and user without re-processing raw data every time.
The confusion arises from Option C, which suggests importing filtered data. However, you cannot manually import custom billing criteria into BigQuery; the schema is fixed by Google. You must use the automated export sinks provided by the platform. Options B and D involve manual CSV handling or Dataprep, which are inefficient and do not support the structured, automated daily reporting required. As noted by community members, exporting to JSON/CSV for billing is obsolete compared to using BigQuery directly. Therefore, the native BigQuery export with view-based filtering is the only scalable and supported method.
Official Reference
https://cloud.google.com/billing/docs/how-to/export-data-bigquery
This link opens the official vendor documentation in a new tab.
Exam Strategy
When asked about 'resource consumption' or 'costs,' look for BigQuery integration first. Avoid options suggesting manual CSV uploads or generic log filtering unless the question explicitly excludes billing services. Remember that billing exports have a fixed schema; you analyze them with SQL views, you don't reshape them during import.
Frequently Asked Questions
Why is Option C incorrect if I can filter logs before export?
Is Cloud Logging the same as Cloud Billing for this question?
Community Votes
75% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 30 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 30
-
AWSandeep 👍 8A. Do daily exports of Cloud Logging data to BigQuery. Create views filtering by project, log type, resource, and user. You cannot import custom or filtered billing criteria into BigQuery. There are three types of Cloud Billing data tables with a fixed schema that must further drilled-down via BigQuery views. Reference: https://cloud.google.com/billing/docs/how-to/export-data-bigquery#setup
-
devaid 👍 52nd tought: Definitely A. If you go to google documentation for export billing, you see a message that "Exporting to JSON or CSV is obsolet. Use Big Query instead". Also why A? Look https://cloud.google.com/billing/docs/how-to/export-data-bigquery https://cloud.google.com/billing/docs/how-to/bq-examples#total-costs-on-invoice You can make a fast report template al Data Studio that read a Big Query view.
-
maci_f 👍 4 Answered AB and D do not consider the log type field. C looks good and I would go for it. However, A looks equally good and I've found a CloudSkillsBoost lab that is exactly describing what answer A does, i.e. exporting logs to BQ and then creating a VIEW. https://www.cloudskillsboost.google/focuses/6100?parent=catalog I think the advantage of exporting complete logs (i.e. filtering them after they reach BQ) is that in case we would want to adjust the reporting in the future, we would have the complete logs with all fields available, whereas with C we would need to take extra steps.
-
TNT87 👍 4Ans is C https://cloud.google.com/logging/docs/export/aggregated_sinks D isn't correct because Cloud storage is used as a sink when logs are in json format not csv. https://cloud.google.com/logging/docs/export/aggregated_sinks#supported-destinations
-
Siant_137 👍 3 Answered CI see A as quite inefficient as you are exporting ALL logs (hundreds of thousands) to bq and the filtering them with views. I would go for C, assuming that it does not involve doing it manually but rather creating a SINK with the correct filters and then using BQ Dataset as sink destination. But a lot of assumptions are taking place here as I believe the questions does not provide much context.
Show 25 more comments
-
devaid 👍 3 Answered AA. The D isn't filtering by log type. B and C are discarded because you need to drill down the exported loggs in Big Query or other.
-
vaga1 👍 3 Answered AB, C, D do no generate a daily scalable solution.
-
midgoo 👍 2 Answered AI almost got it wrong by choosing C. By doing C, that means we will manually filter first one by one. We should just import them all and filter using BigQuery
-
changsu 👍 2 Answered DQuickly and efficiently! It's a flag to guide to DataPrep. And importing data to Bigquery does not mean a report.
-
ducc 👍 2 Answered AA seem good for me
-
MaxNRG 👍 1Here's why this option is the most effective: Integration with BigQuery: BigQuery is a powerful tool for analyzing large datasets. By exporting Cloud Logging data directly to BigQuery, you can leverage its fast querying capabilities and advanced analysis features. Automated Daily Exports: Setting up automated daily exports to BigQuery streamlines the reporting process, ensuring that data is consistently and efficiently transferred. Creating Views for Specific Filters: By creating views in BigQuery that filter data by project, log type, resource, and user, you can tailor the reports to the specific needs of your customer. Views also simplify repeated analysis by encapsulating complex SQL queries. Efficiency and Scalability: This method is highly efficient and scalable, handling large volumes of data without the manual intervention required for CSV exports and data cleansing.
-
carbonscave 👍 1 Answered AWhy A is correct The Power of BigQuery Log Sinks: The most efficient, native way to analyze Google Cloud audit logs (which track "who did what, where, and when") is to configure a Cloud Logging Sink to route logs directly into BigQuery. BigQuery automatically parses the complex JSON payloads of the logs into queryable columns. Automated Daily Reporting via Views: The prompt requires generating these reports daily. By creating BigQuery Views (saved SQL queries) that filter the dataset by project, resource, and user, you have effectively created an automated reporting pipeline. The customer can simply query the View or connect a dashboard (like Looker Studio) to it, and the daily report is instantly available with zero manual daily effort.
-
AHUI 👍 1 Answered DThe Google Cloud Storage bucket where you would like your reports to be delivered. You can select any Cloud Storage bucket for which you are an owner, including buckets that are from different projects. This bucket must exist before you can start exporting reports and you must have owner access to the bucket. Google Cloud Storage charges for usage, so you should review the Cloud Storage pricesheet for information on how you might incur charges for the service. https://cloud.google.com/compute/docs/logging/usage-export
-
NicolasN 👍 1A comment regarding the links you provided (and not the correctness of the selected answer). Using Cloud Billing is something different than detecting compute consumption data from Cloud Logging. In fact, manual exporting to CSV (and JSON) is possible through the Logs Explorer interface (I think without user data break-down): 🔗 https://cloud.google.com/logging/docs/view/logs-explorer-interface#download_logs
-
MaxNRG 👍 1Option B (exporting data in CSV format) and Option D (using Cloud Storage and Dataprep) are less efficient due to the additional steps and manual handling involved. Option C is similar to A but lacks the specificity of creating views directly in BigQuery for filtering, which is a more streamlined approach.
-
MaxNRG 👍 1 Answered AFor generating daily reports that show net consumption of Google Cloud compute resources and user details, the most efficient approach would be: A. Do daily exports of Cloud Logging data to BigQuery. Create views filtering by project, log type, resource, and user.
-
Atnafu 👍 1You need to quickly and efficiently generate these daily reports by using Materialized view /View A materialized view is the best solution and having filtered value with a view is good solution so A is an answer
-
Remi2021 👍 1Challenging. B is right one but with B you do not automate wich makes it hard, with A you ensure automation but there is no SQL support being mentioned which also makes me think that A is not the best choice.
-
22c1725 👍 1 Answered ASadly, it's unclear what: "Do daily exports of Cloud Logging data to BigQuery" Does that means creating job? or you would be creating a sink into destination?
-
jkhong 👍 1The question explicitly mentions daily generation of data so this would highlight, B and C seems that it is only suggesting a one-off filtering
-
Aman47 👍 1You can choose a sink in which you want Cloud logging to continously send Logging data. You can choose which columns you want to see (filter).
-
Atnafu 👍 1A Bad exporting data in csv or json due lack of some data so export is best practice 1:10 https://www.youtube.com/watch?v=ZyMO9XabUUM
-
TNT87 👍 1On the other hand Ans A makes sense https://cloud.google.com/logging/docs/export/bigquery#overview
-
John_Pongthorn 👍 1B is possible? https://cloud.google.com/logging/docs/view/logs-explorer-interface?cloudshell=true
-
hauhau 👍 1 Answered AA because you filter data daily by view not just once by cloud logging
-
TNT87 👍 1so wjhaytsa your argument about daily generartion of data??
-
John_Pongthorn 👍 1Is it Possible to B ? This is the Easy way
-
Wasss123 👍 1why not D ?
-
pluiedust 👍 1Why not C?
-
Aman47 👍 1Option C
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.