BigQuery Fundamentals
BigQuery is Google Cloud's fully managed, serverless data warehouse. You load data into tables and run SQL queries over them, and Google runs the distributed storage and compute that answer those queries. It exists so organizations can analyze terabytes to petabytes of data without operating a database cluster.
itData engineering and analytics | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — BigQuery Fundamentals
A BigQuery warehouse is a very large pile of data with an unusual billing system: instead of paying rent on a machine, you pay every time something reads it. Google runs the computers, the disks, and the astonishing internal network that connects them. Your job is to ask questions in SQL and to understand what each question costs.
What existed before it? Own racks. Size a database cluster for the busiest month you can remember, install parallel-database software, and rehearse the meeting where you explain why the quarterly numbers are late because a disk array is on strike. BigQuery's founders took the engine Google already ran internally, a system called Dremel, and let the outside world use it without seeing any of that. The machine room became somebody else's machine room. The bill, of course, remained entirely yours.
Three ideas hold everything up. First, storage and compute are separate layers: one holds columnar data, the other answers queries, and they cost separately. Second, data lives in a dataset, a regional container whose location is chosen once and never changed, which is the sort of detail that seems trivial until it isn't. Third, queries execute on slots, compute units whose count BigQuery decides itself. You never get to say how many.
The surprise worth knowing before your first invoice: a LIMIT clause does not make a query cheap. On ordinary tables, you pay for every byte the query touches, whether it returns ten rows or ten million. A team once ran one carefully limited export three times and produced a five-figure bill in twenty-two seconds, which is a remarkable speed for anything. The cure is a dry run, a command that reports the damage estimate before any damage occurs. Estimate first, then run. This one habit is the difference between a pleasant tool and an expensive hobby.
Two more things worth knowing. When the warehouse is busy, queries do not crash; they queue, politely, so a slow report usually means congestion, not a broken query. And if someone deletes a table, time travel keeps the old data queryable for up to seven days, which is roughly the length of time a person needs to stop staring at the confirmation dialog.
Where to next: the Course tab explains the architecture, the two pricing models, and the ingestion paths. The Cheatsheet is the working reference for partitioning, clustering, and the cost rules that keep invoices dull. Field Notes carries the war stories: the LIMIT trap, the point-update trap, and the queued-query mystery. The Quiz checks whether the mental model stuck, and Reference links the official documentation for everything this course compressed.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://cloud.google.com/bigquery/docs/introduction
Supports
- BigQuery as a fully managed, serverless data platform with no infrastructure management
- Storage and compute layers connected by a petabit network, scaling independently
- Columnar storage with ACID semantics, replication, and encryption at rest
- Terabyte queries in seconds and petabyte queries in minutes
- Interfaces: console, bq CLI, client libraries, REST/RPC APIs
- On-demand and capacity-based pricing coexisting per project
- https://cloud.google.com/bigquery/docs/sandbox
Supports
- Sandbox requires no credit card or billing account
- 10 GiB lifetime sandbox storage and 1 TiB processed query data per month
- Sandbox tables expire after 60 days; no streaming, DML, or Data Transfer Service
- https://cloud.google.com/bigquery/docs/datasets-intro
Supports
- Datasets as regional top-level containers holding tables and access policy
- Dataset location fixed at creation and cannot be changed
- All tables in a query must be in datasets in the same location
- https://cloud.google.com/bigquery/docs/tables-intro
Supports
- Table kinds: standard tables, clones, snapshots, external tables, BigLake tables, views, materialized views
- Table clones as writable delta copies; snapshots as read-only point-in-time delta copies
- BigLake tables over Cloud Storage, Amazon S3, and Azure Blob Storage with fine-grained security
- https://cloud.google.com/bigquery/docs/partitioned-tables
Supports
- Time-unit column, ingestion-time, and integer-range partitioning types
- _PARTITIONTIME pseudocolumn and UTC partition boundaries
- No partitioning by multiple columns; pruning requires filters on the partitioning column
- Clustering preferred when partitions are small or multi-column filtering is needed
- https://cloud.google.com/bigquery/docs/clustered-tables
Supports
- Up to four clustering columns with order mattering
- First 1,024 characters of STRING columns used for clustering
- Automatic reclustering running free in the background
- Combining partitioning and clustering
- https://cloud.google.com/bigquery/docs/storage_overview
Supports
- Logical (uncompressed) and physical (compressed) storage billing models
- 24 hours for billing-model change, 14-day wait between changes
- https://cloud.google.com/bigquery/docs/time-travel
Supports
- Time travel window of 7 days default, configurable 2 to 7 days
- Fail-safe retention of 7 additional days, non-configurable, via Cloud Customer Care
- Restoring deleted tables by copying within the time travel window
- Querying changed or deleted data with FOR SYSTEM_TIME AS OF
- https://cloud.google.com/bigquery/docs/slots
Supports
- Slots as virtual compute units executing SQL queries
- BigQuery determines slot usage per query automatically
- Execution plans of stages with distributed shuffle
- Queuing of work when capacity is insufficient
- https://cloud.google.com/bigquery/docs/editions-intro
Supports
- Standard, Enterprise, and Enterprise Plus editions plus on-demand pricing
- Slot-hour billing with editions; per-query TiB billing on demand
- Edition feature differences: BigQuery ML, BI Engine, smart tuning, CMEK, VPC Service Controls
- On-demand free tier and reservations switching the pricing model
- https://cloud.google.com/bigquery/docs/cached-results
Supports
- Identical query results cached in temporary tables for approximately 24 hours
- Cache hits charged nothing for storage or compute but counting against quotas
- https://cloud.google.com/bigquery/docs/best-practices-costs
Supports
- Dry runs and the query validator as pre-execution cost estimates
- maximumBytesBilled failing queries whose estimate exceeds the limit without charge
- LIMIT not reducing bytes read on non-clustered tables; full table billed
- Custom daily quotas as the on-demand cost restriction
- Long-term storage discount for data unmodified for 90 consecutive days
- Avoiding SELECT * and previewing data instead of querying to explore
- https://cloud.google.com/bigquery/docs/best-practices-performance-compute
Supports
- Avoiding single-row DML and OLTP-style access patterns
- Pre-aggregating before joins; avoiding cross and self joins
- Partitioned tables outperforming date-sharded tables
- https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax
Supports
- UPDATE and DELETE billing the affected table or partitions before modification
- https://cloud.google.com/bigquery/docs/data-manipulation-language
Supports
- Mutating DML concurrency limits: 2 running and 20 queued per table
- Point DML as an attempt to treat BigQuery like an OLTP system
- https://cloud.google.com/bigquery/docs/loading-data
Supports
- Batch load, streaming, CDC, and federation ingestion paths
- Avro, CSV, JSON, ORC, Parquet batch load formats
- Data Transfer Service for recurring automated loads
- Loading, copying, and exporting as free operations
- https://cloud.google.com/bigquery/docs/write-api-intro
Supports
- Storage Write API as the unified gRPC/REST streaming ingestion interface
- Exactly-once delivery semantics via stream offsets
- Free ingestion of up to 2 TiB per month on the gRPC path
- https://cloud.google.com/bigquery/docs/streaming-data-into-bigquery
Supports
- Streaming buffer rows readable in seconds; copy/extract lag typically minutes, up to 90 minutes
- Streaming buffer effects on DML, copy, extract, and schema changes
- __UNPARTITIONED__ staging partition for ingestion-time tables
- https://cloud.google.com/bigquery/docs/materialized-views-intro
Supports
- Materialized views as precomputed tables with incremental refresh
- Smart tuning rerouting queries to materialized views
- https://cloud.google.com/bigquery/docs/query-queues
Supports
- Queries queueing when capacity saturates rather than failing
- Fair scheduling across projects and jobs
- Queue depth observable in INFORMATION_SCHEMA and Cloud Monitoring
- https://cloud.google.com/bigquery/docs/reference/standard-sql/introduction
Supports
- GoogleSQL as ANSI-compliant and the recommended dialect
- Legacy SQL supported with restrictions; migration recommended
- https://cloud.google.com/bigquery/docs/bq-command-line-tutorial
Supports
- bq CLI patterns for creating datasets, tables, loading, and querying used in the practice reference
- https://cloud.google.com/bigquery/public-data/
Supports
- bigquery-public-data catalog used by the exercise and awesome links
- https://en.wikipedia.org/wiki/BigQuery
Supports
- BigQuery announced at Google I/O in May 2010 with limited early adopters
- https://cloud.google.com/blog/products/data-analytics/bigquery-turns-10
Supports
- Decade anniversary confirming the 2010 announcement and Dremel lineage
- ColumnIO influencing Apache Parquet
- https://research.google.com/pubs/pub36632.html
Supports
- Dremel: Interactive Analysis of Web-Scale Datasets published at VLDB 2010
- https://www.theregister.co.uk/2011/11/14/google_bigquery_cloud_analytics/
Supports
- BigQuery opening to all customers in November 2011 with REST API and Cloud Storage integration
- https://cloud.google.com/bigquery/docs/release-notes-archive
Supports
- September 18, 2013 streaming inserts and time-based table decorators
- March 25, 2014 pricing overhaul adding reserved capacity pricing
- September 29, 2016 Standard SQL GA with DML and flat-rate pricing
- May 29, 2019 BigQuery ML general availability
- March 2, 2020 Storage Read API general availability
- May 8, 2020 next-generation streaming general availability
- June 25 and October 28, 2021 table snapshots preview and GA
- April 6 and October 12, 2021 Storage Write API preview and GA
- https://cloud.google.com/blog/products/gcp/bigquery-111-now-with-standard-sql-iam-and-partitioned-tables
Supports
- Standard SQL beta, IAM, and time partitioning announced June 2, 2016
- https://cloud.google.com/blog/products/data-analytics/whats-happening-bigquery-integrated-machine-learning-maps-and-more
Supports
- BigQuery ML in beta announced around Google Cloud Next 2018
- https://cloud.google.com/blog/products/data-analytics/introducing-bigquery-omni
Supports
- BigQuery Omni announced July 2020 for cross-cloud analytics
- https://cloud.google.com/blog/products/data-analytics/unifying-data-lakes-and-data-warehouses-across-clouds-with-biglake
Supports
- BigLake launch April 2022 with tables over GCS, S3, and Azure
- https://cloud.google.com/blog/products/data-analytics/introducing-new-bigquery-pricing-editions
Supports
- BigQuery editions announced March 2023 with capacity-based pricing and autoscaling
- https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert
Supports
- Streamed rows landing in a write-optimized buffer before extraction to columnar storage
- Copy and extract jobs omitting buffered rows
- https://dev.to/risingwavelabs/bigquerys-ridiculous-pricing-model-cost-us-10000-in-just-22-seconds-4c43
Supports
- Practitioner postmortem of a five-figure bill from a LIMIT-bounded SELECT * export
- https://www.cloudkeeper.com/insights/blog/10-costly-bigquery-mistakes-engineers-make-and-how-avoid-them
Supports
- Practitioner framing of SELECT *, LIMIT, and scheduled-query cost mistakes
- Partitions-scanned diagnostic for failed pruning
- https://luminousmen.com/post/why-your-5second-bigquery-query-isnt-cheap/
Supports
- Slots as scheduler currency; capacity-model waste appearing as idle slots and queues
- https://github.com/GoogleCloudPlatform/bigquery-utils
Supports
- Community scripts, UDFs, and INFORMATION_SCHEMA dashboards (awesome links entry)
- https://pandas-gbq.readthedocs.io/en/latest/
Supports
- pandas-gbq as the pandas BigQuery integration (awesome links entry)
- https://github.com/r-dbi/bigrquery
Supports
- bigrquery as the R DBI client (awesome links entry)
- https://github.com/blockchain-etl/awesome-bigquery-views
Supports
- Ready-to-run SQL views over public datasets (awesome links entry)
- https://www.gcppodcast.com/post/episode-94-big-query-under-the-hood-with-tino-tereshko-and-jordan-tigani/
Supports
- Podcast discussion of BigQuery internals (awesome links entry)
- https://cloud.google.com/blog/topics/developers-practitioners/bigquery-explained-blog-series
Supports
- Practitioner blog series covering storage, queries, joins, scheduling, pricing (awesome links entry)
- https://www.reddit.com/r/bigquery/
Supports
- Community forum for BigQuery news and questions (awesome links entry)
- https://stackoverflow.com/questions/tagged/google-bigquery
Supports
- Canonical Q&A tag for BigQuery problems (awesome links entry)
- https://github.com/coty/awesome-bigquery
Supports
- Live awesome list used for awesome-links discovery (BigQuery Utils, bigrquery, GCP Podcast entries)
- https://github.com/nivertech/awesome-bigquery
Supports
- Live awesome list used for awesome-links discovery (pandas-gbq, public datasets entries)
- https://github.com/mtreerungroj/awesome-bigquery
Supports
- Live awesome list used for awesome-links discovery (BigQuery explained series entry)
- https://aws.amazon.com/redshift/
Supports
- Amazon Redshift product landscape entry
- https://www.snowflake.com/
Supports
- Snowflake product landscape entry
- https://azure.microsoft.com/en-us/products/synapse-analytics
Supports
- Azure Synapse Analytics product landscape entry
- https://www.databricks.com/product/databricks-sql
Supports
- Databricks SQL product landscape entry
- https://www.microsoft.com/en-us/microsoft-fabric/data-warehouse
Supports
- Microsoft Fabric Warehouse product landscape entry
- https://clickhouse.com/
Supports
- ClickHouse product landscape entry
- https://duckdb.org/
Supports
- DuckDB product landscape entry
- https://lookerstudio.google.com/
Supports
- Looker Studio product landscape entry
- https://www.getdbt.com/
Supports
- dbt product landscape entry
- https://spark.apache.org/
Supports
- Apache Spark product landscape entry
- https://airflow.apache.org/
Supports
- Airflow product landscape entry
- https://cloud.google.com/bigquery
Supports
- BigQuery product landscape entry
