TECHNOLOGIESTieInn Technologies

BigQuery fundamentals

GCP · 14 questions

Short notes

Key idea

BigQuery is Google's serverless data warehouse. You load data into tables inside datasets and query with standard SQL; there are no servers to manage, and on-demand pricing charges by bytes scanned.

Syntax

SELECT city, SUM(amount) AS revenue
FROM `my-project.sales.orders`
WHERE order_date >= '2024-01-01'
GROUP BY city;
  • Names: project.dataset.table, in backticks.
  • Loading: from GCS (CSV, JSON, Parquet), streaming, or bq load.
  • External tables query files in GCS without loading.
  • Views, scheduled queries, CREATE TABLE AS SELECT.
  • Dry run shows bytes to be scanned before you run.

Example

bq load --source_format=PARQUET sales.orders gs://shop-raw/orders/*.parquet, then a scheduled query builds sales.daily_revenue each morning for the dashboard.

Traps

  • LIMIT doesn't reduce cost: BigQuery still reads the whole columns.
  • SELECT * scans every column; name the ones you need.
  • Datasets have a location; you can't join tables across regions.
  • Arrays and structs (nested fields) need UNNEST to query.

Want the full lesson with step-by-step examples, a project and a certificate? GCP course, ₹120 →

Questions

5 free questions
5 questions

    BigQuery fundamentals

  1. Question 1easy

    What does "serverless" mean for BigQuery?

  2. BigQuery fundamentals

  3. Question 2medium

    With on-demand pricing, what mainly decides a query's cost?

  4. BigQuery fundamentals

  5. Question 3medium

    What is a BigQuery external table?

  6. BigQuery fundamentals

  7. Question 4medium

    Which is valid BigQuery SQL to truncate a date to its month?

  8. BigQuery fundamentals

  9. Question 5medium

    A query reads 2 columns of a 50-column, 1 TB table. Roughly how much data does BigQuery scan?

9 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.