# Google BigQuery

> Go deep on BigQuery: serverless execution, slots and bytes-scanned pricing, partitioning and clustering, nested and repeated fields, and cost controls. Free...

Canonical: https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery
Last updated: 2026-11-28

Go deep on BigQuery: serverless execution, slots and bytes-scanned pricing, partitioning and clustering, nested and repeated fields, and cost controls.

Intermediate · about 8 hours · difficulty 3/5

Learn first: [How Cloud Data Warehouses Work](https://www.internhack.in/roadmaps/tracks/data-engineer/warehouse-concepts)

BigQuery is Google Cloud's serverless warehouse. There is no cluster to manage, and the free **sandbox** lets students practise without a credit card, which makes it the easiest warehouse to learn on.

### Core concepts

- **Projects, datasets, tables**: the hierarchy for organising data and permissions.
- **Serverless execution** with **slots** (units of compute). On-demand pricing charges per TB scanned; capacity pricing reserves slots.
- **Partitioned tables** (by ingestion time, a date column or integer range) and **clustered tables** (sorted by up to four columns) reduce bytes scanned.

### Working with data

- Load from Cloud Storage, stream with the Storage Write API, or query files directly as external tables.
- **Nested and repeated fields** (`STRUCT` and `ARRAY`) store an order with its items in one row; use `UNNEST` to flatten.
- Standard SQL with window functions, `QUALIFY`, `MERGE` and scripting.
- Public datasets are great for practice.

### Cost control

- Always check the bytes estimate before running.
- Require partition filters on big tables.
- Set custom quotas and budget alerts.
- Avoid `SELECT *`; select columns.

### Ecosystem

BigQuery pairs with Cloud Storage, Pub/Sub, Dataflow, Dataproc (managed Spark), Cloud Composer (managed Airflow) and Looker.

### Pitfalls

- Assuming LIMIT reduces cost.
- Partitioning tables that are too small, or partitioning by a column queries never filter on.

You are ready to move on when you can load data into a partitioned and clustered table, query nested data with UNNEST, and show bytes scanned dropping because of your table design.

## Key concepts

- **Projects, datasets, tables**
- **Slots and on-demand pricing**
- **Partitioned tables**
- **Clustered tables**
- **STRUCT, ARRAY and UNNEST**
- **Public datasets and sandbox**
- **Quotas and budget alerts**
- **Storage Write API**

## Other options for this step

- [Snowflake](https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake): Go deep on Snowflake: virtual warehouses, micro-partitions, stages and COPY, time travel, zero-copy cloning, roles and cost controls.
- [Amazon Redshift](https://www.internhack.in/roadmaps/tracks/data-engineer/redshift): Go deep on Redshift: provisioned and serverless options, distribution and sort keys, COPY from S3, Spectrum and workload management.

## Mini project

In the BigQuery sandbox, load a CSV from Cloud Storage into a date-partitioned, clustered table. Write five analytical queries and record bytes processed for each with and without partition filters.

## Check yourself

When would you store order items as a repeated STRUCT inside the orders table instead of a separate order_items table?

## Free resources

- [BigQuery documentation](https://cloud.google.com/bigquery/docs) (Google Cloud)
- [BigQuery partitioned tables](https://cloud.google.com/bigquery/docs/partitioned-tables) (Google Cloud)
- [Data Engineering Zoomcamp (warehouse module)](https://github.com/DataTalksClub/data-engineering-zoomcamp) (DataTalksClub)

Previous: [Snowflake](https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake) · Next: [Amazon Redshift](https://www.internhack.in/roadmaps/tracks/data-engineer/redshift)

## More in Cloud Warehouses and Lakehouses

- [How Cloud Data Warehouses Work](https://www.internhack.in/roadmaps/tracks/data-engineer/warehouse-concepts)
- [Snowflake](https://www.internhack.in/roadmaps/tracks/data-engineer/snowflake)
- [Google BigQuery](https://www.internhack.in/roadmaps/tracks/data-engineer/bigquery)
- [Amazon Redshift](https://www.internhack.in/roadmaps/tracks/data-engineer/redshift)
- [Lakehouse Tables with Delta Lake](https://www.internhack.in/roadmaps/tracks/data-engineer/delta-lake)
- [Lakehouse Tables with Apache Iceberg](https://www.internhack.in/roadmaps/tracks/data-engineer/iceberg)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Data Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/data-engineer)
