12.1 BigQuery Architecture: Capacitor Columnar Format, Jupiter Network, and Borg Slots
Key Takeaways
- BigQuery completely decouples compute (Dremel execution engine orchestrated by Borg) from persistent storage (Colossus filesystem), connected via Google's multi-terabit/petabit-scale Jupiter network fabric.
- Capacitor is BigQuery's proprietary columnar storage format, embedding advanced dictionary, run-length, and bit-packing encodings while natively shredding nested and repeated semi-structured records without schema flattening.
- Compute capacity is metered in slots (virtualized units of vCPU and RAM) that form dynamic, multi-stage execution trees (Root coordinator, Mixers, and Leaf execution workers) under either On-Demand or BigQuery Editions (Standard, Enterprise, Enterprise Plus).
- BigLake tables extend BigQuery's unified governance, row/column-level security, and metadata caching to open object formats (Parquet, ORC, Avro, Iceberg) in Cloud Storage, AWS S3, and Azure Blob without data duplication.
- Enterprise point-in-time recovery encompasses Time Travel (configurable from 2 to 7 days, defaulting to 7), an automated 7-day post-Time-Travel Fail-safe period (recoverable only via Google Support), zero-copy read-only Table Snapshots, and zero-copy writable Table Clones.
12.1 BigQuery Architecture: Capacitor Columnar Format, Jupiter Network, and Borg Slots
Exam Focus: The Google Cloud Professional Data Engineer exam rigorously tests your understanding of BigQuery's underlying distributed architecture. You must master how the decoupling of compute and storage enables serverless auto-scaling, how the Capacitor columnar storage format optimizes data compression and column projection, how the Jupiter network removes data locality constraints, how Borg slots execute dynamic query coordinator trees, and how enterprise data protection primitives (Time Travel, Fail-safe, Table Snapshots, and Table Clones) operate in production.
Traditional enterprise data warehouses couple compute and storage within identical physical appliances or virtual machine clusters. In those legacy architectures, scaling storage capacity inadvertently requires purchasing unused CPU cores, while scaling compute power leaves expensive storage nodes underutilized. Google BigQuery revolutionizes enterprise analytics by introducing a fully managed, serverless, two-tier decoupled architecture. By separating the analytical execution engine from persistent storage and bridging them with a petabit-scale network, BigQuery allows organizations to ingest petabytes of data and execute massive queries across thousands of CPU cores dynamically, paying only for the storage retained and compute consumed.
1. BigQuery Serverless Architecture: Decoupling Compute and Storage
BigQuery's architecture isolates computing resources from durable storage media. Compute tasks are ephemeral and dynamic, whereas storage is durable, highly replicated, and persistent.
+─────────────────────────────────────────────────────────────────────────────────+
| BIGQUERY DECOUPLED ARCHITECTURE |
+─────────────────────────────────────────────────────────────────────────────────+
| |
| +───────────────────────────────────────────────────────────────────────────+ |
| | DREMEL EXECUTION ENGINE (BORG SLOTS) | |
| | - Ephemeral Compute Cluster managed by Borg container orchestration | |
| | - Scales dynamically from 0 to tens of thousands of worker slots | |
| | - Allocates vCPU + RAM dynamically per query execution stage | |
| +───────────────────────────────────────────────────────────────────────────+ |
| │ |
| ▼ |
| +───────────────────────────────────────────────────────────────────────────+ |
| | JUPITER NETWORK FABRIC (1+ Pbps) | |
| | - Petabit-scale bisection bandwidth connecting all racks | |
| | - Eliminates disk locality bottlenecks; shuffles gigabytes in seconds | |
| +───────────────────────────────────────────────────────────────────────────+ |
| │ |
| ▼ |
| +───────────────────────────────────────────────────────────────────────────+ |
| | COLOSSUS PERSISTENT STORAGE (CAPACITOR) | |
| | - Google's global distributed file system; multi-zone replication | |
| | - Capacitor columnar format: Dictionary, RLE, Bit-packing encodings | |
| | - Read-after-write consistency, 99.999999999% (11 9's) durability | |
| +───────────────────────────────────────────────────────────────────────────+ |
+─────────────────────────────────────────────────────────────────────────────────+
The Core Building Blocks
- Compute (Dremel & Borg): Dremel is Google's distributed query execution engine that translates SQL queries into execution trees. Borg is Google's cluster management orchestrator that provisions and schedules the containerized worker nodes (slots) executing Dremel code.
- Storage (Colossus & Capacitor): Colossus is Google's next-generation global distributed file system (the successor to GFS). It handles physical data striping, replication, automatic disk failure recovery, and multi-zone durability. Capacitor is the specialized columnar file format used by BigQuery on top of Colossus.
- Network (Jupiter): A multi-terabit/petabit-scale datacenter network fabric providing over 1 petabit per second of total bisection bandwidth. Jupiter allows compute nodes to stream data from any Colossus storage node at near in-memory bus speeds, entirely eliminating the requirement for compute tasks to be colocated on the same physical server as the underlying disks.
2. Storage Internals: The Capacitor Columnar Format
BigQuery stores relational data in a proprietary format called Capacitor, which evolved from the original Dremel ColumnIO format. Understanding Capacitor's storage mechanics explains why BigQuery queries are fast, why SELECT * is an expensive anti-pattern, and how nested data is handled natively.
ROW-ORIENTED STORAGE (OLTP: MySQL, Postgres, Spanner)
+-------+-------+--------+-------+-------+--------+
| Row 1: ID, Name, Total | Row 2: ID, Name, Total |
+-------+-------+--------+-------+-------+--------+
* Must read entire row off disk even if querying only 'Total'.
COLUMNAR STORAGE (OLAP: BigQuery Capacitor)
+----------------+--------------------+--------------------+
| ID: [1, 2, ...] | Name: ['A', 'B'] | Total: [150, 220] |
+----------------+--------------------+--------------------+
* Scans ONLY the 'Total' column vector off disk. 90%+ I/O reduction.
Columnar Orientation and Column Projection
In a row-oriented database, records are written consecutively on disk. Scanning a single attribute (such as user_id) across one billion records requires reading all surrounding attributes (names, addresses, timestamps) from disk, consuming massive I/O bandwidth.
Capacitor organizes records into column vectors. Each column is stored in separate, contiguous file blocks. When a query references specific columns (e.g., SELECT customer_id, SUM(order_total) FROM sales), BigQuery performs column projection, reading only the blocks containing customer_id and order_total. Unreferenced columns are completely ignored by the storage sub-system, reducing physical I/O and query costs by orders of magnitude.
Embedded Compression and Encoding Algorithms
Capacitor evaluates data distributions at write time and dynamically applies the most efficient compression and encoding algorithm per column:
- Dictionary Encoding: Replaces repetitive, long string values with compact, fixed-width integer tokens. A column containing state names (
'California','New York') is encoded as small integer IDs paired with an in-memory dictionary. - Run-Length Encoding (RLE): Collapses consecutive repeated values into a count and value pair (e.g.,
AAAAABBBCCbecomes5A, 3B, 2C). Highly effective on sorted or clustered data. - Bit-Packing: Compresses integers by utilizing only the minimum number of bits required to represent the maximum value in a block rather than standard 32-bit or 64-bit boundaries.
- Frame of Reference (FOR): Stores delta offsets from a minimum baseline value rather than large absolute numbers, drastically compressing timestamp and sequence ranges.
Semi-Structured Data Shredding
Unlike traditional databases that store JSON or semi-structured data as unindexed raw text strings, Capacitor uses a technique called record shredding (based on Dremel's repetition and definition level algorithms). When a schema defines a RECORD (STRUCT) or REPEATED (ARRAY) field, Capacitor physically shreds each nested sub-field into its own isolated columnar vector while maintaining tree path coordinates. You can query deeply nested fields (e.g., user.address.postal_code) without scanning sibling fields, and without the query execution overhead of runtime JSON parsing.
Zone Maps and Block-Level Metadata
Capacitor embeds fine-grained metadata (known as Zone Maps) inside the header of every file block. These headers record the minimum and maximum values of each column within that specific block. When a query contains a filter (e.g., WHERE age > 65), BigQuery compares the filter predicate against the block's min/max bounds. If the block's maximum age is 62, BigQuery prunes the entire block from the scan plan before reading a single byte of data off Colossus.
3. Compute Execution Model: Jupiter Network and Borg Slots
BigQuery compute capacity is virtualized into abstract processing units called Slots.
+─────────────────────────────────────────────────────────────────────────────────+
| DREMEL DYNAMIC EXECUTION TREE |
+─────────────────────────────────────────────────────────────────────────────────+
| |
| [ ROOT COORDINATOR ] |
| │ |
| ┌───────────────────┴───────────────────┐ |
| ▼ ▼ |
| [ MIXER NODE 1 ] [ MIXER NODE 2 ] |
| (Aggregates Stage 2) (Aggregates Stage 2) |
| │ │ |
| ┌─────────┴─────────┐ ┌─────────┴─────────┐ |
| ▼ ▼ ▼ ▼ |
| [ LEAF SLOT 1 ] [ LEAF SLOT 2 ] [ LEAF SLOT 3 ] [ LEAF SLOT 4 ] |
| (Scan/Filter C1) (Scan/Filter C2) (Scan/Filter C3) (Scan/Filter C4) |
| │ │ │ │ |
| └───────────────────┼───────────────────┘ │ |
| ▼ ▼ |
| ═════════════════════════════════════════════════════════════════════════════ |
| JUPITER PETABIT NETWORK INTERCONNECT |
| ═════════════════════════════════════════════════════════════════════════════ |
| │ │ |
| ▼ ▼ |
| [ COLOSSUS BLOCKS ] [ COLOSSUS BLOCKS ] |
+─────────────────────────────────────────────────────────────────────────────────+
What is a BigQuery Slot?
A slot is a virtualized slice of compute power composed of dedicated vCPU, memory, and networking capacity orchestrated by Borg. When a query is submitted:
- The query text is parsed, optimized, and compiled into a directed acyclic graph (DAG) of physical execution stages.
- The query engine calculates the required number of slots based on query complexity, data volume, and current capacity commitments.
- Borg schedules containers across thousands of Google Compute Engine servers to fulfill the requested slots.
The Dremel Query Tree: Root, Mixers, and Leaves
Dremel executes queries using a hierarchical multi-tiered tree structure:
- Leaf Slots (Workers): The foundation of the tree. Leaf slots communicate directly over the Jupiter network to read Capacitor data blocks from Colossus. They perform low-level predicate evaluation, column projection, filter matching, and initial local aggregations.
- Mixer Nodes (Intermediate Aggregators): Intermediate nodes that collect intermediate outputs from multiple leaf slots, perform distributed shuffle operations, hash joins, and partial group-by aggregations.
- Root Coordinator (Master Node): The apex of the execution tree. It receives the initial SQL request from the user, orchestrates stage transitions, coordinates intermediate aggregations from mixers, performs final sorting (
ORDER BY) andLIMITtruncations, and streams the formatted result set back to the client.
Dynamic Work Re-Balancing
If a particular leaf slot processes a data block slower than its peers (due to transient hardware degradation or uneven data distribution), the query coordinator dynamically splits the remaining unprocessed key ranges and assigns them to idle leaf slots. This runtime work re-balancing prevents straggler tasks from stalling entire analytical jobs.
Compute Pricing and Capacity Models
| Attribute | On-Demand (Per-Query) | BigQuery Editions (Standard, Enterprise, Enterprise Plus) |
|---|---|---|
| Billing Basis | Billed strictly by bytes scanned by the query ($6.25 per TB in most regions) | Billed strictly by slot-hours consumed across compute workloads |
| Slot Availability | Shared burstable multi-tenant pool (typically up to 2,000 concurrent slots per project) | Dedicated baseline and autoscaling slot capacity pools |
| Autoscaling | Transparent, managed entirely by BigQuery | Configurable min/max autoscaling slot thresholds per reservation |
| Workload Management | None; all queries share the same project-level queue | Reservations, slot assignments, and priority job queues per department/team |
| Advanced Features | Standard feature set | Customer Managed Encryption Keys (CMEK), BigQuery Omni, VPC Service Controls |
Exam Trap: Under On-Demand billing, a query that fails midway still incurs zero charges, but a query that runs
SELECT *on an unpartitioned 50 TB table will bill you for the entire 50 TB even if you cancel the query immediately after execution starts or append aLIMIT 10clause.LIMITdoes not reduce the number of bytes scanned in columnar formats.
4. Table Topologies: Standard, External, BigLake, Views, and Materialized Views
BigQuery supports multiple table types designed for varying access patterns, operational overheads, and cross-cloud architectures.
+─────────────────────────────────────────────────────────────────────────────────+
| BIGQUERY TABLE TYPES |
+─────────────────────────────────────────────────────────────────────────────────+
| |
| [ Standard Native ] ──> Managed Colossus storage (Capacitor format) |
| * Fastest performance, full ACID, auto-clustering |
| |
| [ External Table ] ──> Unmanaged GCS / S3 / Azure Blob / Bigtable / Spanner |
| * Federated; zero ingestion delay; slower performance |
| |
| [ BigLake Table ] ──> Open formats (Parquet, Iceberg) + Unified Governance |
| * Credential delegation, row/column security, cache |
| |
| [ Logical View ] ──> Stored SQL query string; executes at query runtime |
| * Zero storage; scans base table data on every query |
| |
| [ Materialized View]──> Precomputed result set stored in Capacitor |
| * Auto-refresh, smart query rewriting, low latency |
+─────────────────────────────────────────────────────────────────────────────────+
Standard Internal Tables
- Mechanics: Data is ingested into BigQuery and stored exclusively in Capacitor format on Colossus.
- Benefits: Maximum query performance, automatic background optimization (re-clustering), full ACID compliance, time travel, and snapshot support.
- Cost: Billed for active logical/physical storage and compute (slots or bytes scanned).
External Tables (Federated Queries)
- Mechanics: BigQuery queries data directly in-place from external systems—including Google Cloud Storage (CSV, JSON, Parquet, ORC, Avro), Cloud Bigtable, Cloud Spanner, or Google Drive—without loading data into Colossus.
- Trade-offs: Zero data ingestion pipeline latency and zero BigQuery storage charges. However, query performance is lower because data must travel across regional networks, file headers must be parsed dynamically, and Capacitor's advanced clustering and zone-map optimizations are unavailable.
BigLake Tables: The Modern Open Data Lakehouse
- Mechanics: An evolution of external tables that decouples BigQuery's analytical interface and security model from the physical storage layer.
- Core Capabilities:
- Fine-Grained Security: Enforces row-level security, column-level security (data masking), and BigQuery IAM policies directly on external object files in Cloud Storage, AWS S3, and Azure Data Lake Storage Gen2.
- Credential Delegation: End users only need permissions on the BigQuery BigLake table; they do not need direct
storage.objects.getpermissions on the underlying GCS buckets. Access is proxied securely via a BigQuery Connection service account. - Metadata Caching: Caches file metadata (partition lists, file paths, Parquet statistics) inside BigQuery to dramatically accelerate query planning over millions of external files.
- Open Table Formats: Native support for Apache Iceberg, Delta Lake, and Apache Hudi.
Logical Views vs. Materialized Views
| Feature | Logical View | Materialized View (MV) |
|---|---|---|
| Definition | A named SQL query stored as virtual metadata | A precomputed query result physically stored in Capacitor format |
| Execution | Runs the underlying SQL query against base tables every time the view is called | Reads the precomputed result directly from Capacitor storage |
| Cost Profile | Billed for bytes scanned by the underlying query upon each invocation | Billed for storage of the precomputed data; query compute is minimal |
| Refresh Lifecycle | Not applicable (always reads current base data) | Automatic & Incremental: Refreshes automatically as base tables mutate |
| Smart Tuning / Query Rewrite | No query rewrite; user must explicitly reference the view | Yes: If a user queries the base table, BigQuery's optimizer automatically rewrites the query to use the MV if it reduces cost and latency |
| Consistency Guarantee | Real-time consistency | Strong Real-Time Consistency: Reads the MV and merges delta changes from the base table's streaming buffer/deltas on the fly |
5. Enterprise Data Protection and Disaster Recovery
BigQuery provides built-in enterprise resilience primitives to safeguard data against accidental deletion, malicious corruption, and operational errors without requiring manual dump-and-restore pipelines.
+─────────────────────────────────────────────────────────────────────────────────+
| BIGQUERY RECOVERY & RETENTION TIMELINE |
+─────────────────────────────────────────────────────────────────────────────────+
| |
| Day 0 Day 2 to Day 7 Day 9 to Day 14 |
| ───┼─────────────────┼───────────────────────────────────┼───────────────> |
| │ │ │ |
| [ Live Data ] ──> [ TIME TRAVEL WINDOW ] ──> [ FAIL-SAFE PERIOD ] ──> Purged |
| - Configurable: 2 to 7 days - 7 Days Duration |
| - User self-service SQL - Google Support ONLY |
| - FOR SYSTEM_TIME AS OF - Disaster Recovery ONLY |
+─────────────────────────────────────────────────────────────────────────────────+
Time Travel
- Mechanics: BigQuery automatically tracks historical versions of all table data over a rolling time travel window. You can query data as it existed at any specific second in the past.
- Syntax: Uses the
FOR SYSTEM_TIME AS OFSQL clause. - Window Duration: Defaults to 7 days. Configurable between 2 days and 7 days at the dataset or table level. Reducing the window to 2 days lowers storage costs for high-churn tables with millions of daily updates.
- Self-Service Restoration: Tables accidentally deleted or corrupted can be queried and restored immediately via SQL or the
bq cpCLI.
-- Query historical state of a table as it existed 2 hours ago
SELECT *
FROM `my_project.sales.transactions`
FOR SYSTEM_TIME AS OF TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 2 HOUR);
-- Restore an accidentally dropped table using bq CLI
-- Epoch timestamp in milliseconds:
bq cp my_project.sales.transactions@1726400000000 my_project.sales.transactions_restored
Fail-Safe Period
- Mechanics: A non-configurable 7-day retention period that begins immediately after the Time Travel window expires.
- Access Model: Data in Fail-safe is not queryable by the customer and cannot be accessed via SQL or the Google Cloud Console.
- Disaster Recovery: It is strictly an emergency recovery mechanism. If critical data was dropped and the issue is discovered after the Time Travel window closed (e.g., on day 8), the customer must open a high-priority ticket with Google Cloud Customer Support to recover the data.
Table Snapshots (Zero-Copy Read-Only)
- Mechanics: Captures a point-in-time, read-only copy of a table at a specific timestamp. Created in seconds regardless of table size.
- Storage Cost (Copy-on-Write): Zero initial storage overhead. The snapshot references the exact same physical Colossus storage blocks as the base table. You only pay for additional storage when the base table subsequently modifies or deletes blocks that the snapshot must retain.
- Expiration: Snapshots can be configured with an automated expiration duration (e.g., 30 days) to prevent long-term storage sprawl.
-- Create a read-only table snapshot before a major data pipeline migration
CREATE SNAPSHOT TABLE `my_project.sales.transactions_snapshot_pre_migration`
CLONE `my_project.sales.transactions`
FOR SYSTEM_TIME AS OF CURRENT_TIMESTAMP()
OPTIONS (
expiration_timestamp = TIMESTAMP_ADD(CURRENT_TIMESTAMP(), INTERVAL 14 DAY)
);
Table Clones (Zero-Copy Writable)
- Mechanics: Creates a fully writable, independent clone of a table.
- Storage Cost (Copy-on-Write): Like snapshots, creating a clone incurs zero immediate storage cost. As the clone or base table undergoes subsequent
INSERT,UPDATE, orDELETEoperations, BigQuery writes new data blocks independently. You are billed only for the diverging, mutated blocks. - Ideal Use Cases: Fast, cost-effective creation of development, testing, and staging environments using full petabyte-scale production datasets without storage duplication.
6. Architectural Anti-Patterns and Exam Traps
| Operational Scenario | Architectural Anti-Pattern | Correct Google Cloud Architecture |
|---|---|---|
Dev/Test Data Duplication<br>An engineering team creates staging environments by running CREATE TABLE dev.orders AS SELECT * FROM prod.orders, doubling storage costs for a 200 TB dataset. | Performing physical copy operations (SELECT * or export/import) to create non-production test beds. | Provision a Table Clone (CREATE TABLE dev.orders CLONE prod.orders). Table clones provide zero-copy, writable copies that incur storage costs only for newly modified blocks. |
Disaster Recovery Beyond Time Travel<br>A critical production table was dropped 10 days ago. The team attempts to query FOR SYSTEM_TIME AS OF and fails because the 7-day Time Travel window has elapsed. | Assuming the data is permanently destroyed and attempting to rebuild from logs. | Engage Google Cloud Customer Support immediately. The table has moved into the 7-day Fail-safe period (days 8 to 14), where Google engineers can recover the table from internal Colossus backups. |
Unfiltered Columnar Scans<br>A dashboard executes SELECT * FROM fact_sales WHERE sale_id = 123 on a 50 TB native table under on-demand billing, assuming a LIMIT 1 or single-row filter makes it cheap. | Using SELECT * under On-Demand pricing. BigQuery scans all 50 TB across all columns regardless of row selectivity. | Specify only required columns (SELECT sale_id, amount) and utilize partitioning and clustering on sale_id to enable block pruning, reducing scanned data from 50 TB to megabytes. |
| Federated External Lakehouse Bottlenecks<br>Data scientists query 500,000 small Parquet files in Cloud Storage via standard External Tables, suffering from high query latency and lack of security masking. | Continuing to use standard external tables with direct GCS ACLs. | Upgrade the external tables to BigLake Tables with Metadata Caching enabled and configure unified column masking via Dataplex and BigQuery Connections. |
A data engineering team needs to provide a sandboxed testing environment for developers to validate destructive ETL pipeline updates against an existing 350 TB production BigQuery table. The developers must be able to insert test records, delete existing rows, and alter schemas without impacting the production table or creating an expensive physical duplicate of the 350 TB dataset. Which BigQuery feature should the lead architect recommend?
An analytics engineer is optimizing a query against a petabyte-scale BigQuery table containing deeply nested customer activity records. The schema includes a top-level RECORD column named 'session_details' containing 25 nested primitive fields and two nested ARRAY fields. The query references only 'session_details.device_type' and 'session_details.country'. Why does BigQuery process this query with minimal byte scans and high performance without requiring the schema to be flattened?
A production data pipeline accidentally dropped an essential financial ledger table 9 days ago. The dataset was configured with the default 7-day Time Travel duration. When the data engineer attempts to restore the table using 'FOR SYSTEM_TIME AS OF', the query returns an error stating that the requested timestamp is outside the time travel retention window. What action should the engineer take to recover the dropped table?
A multinational enterprise wants to implement fine-grained access control (column-level masking and row-level security) on 500 TB of Apache Iceberg and Parquet files stored in Google Cloud Storage. The data science team must query these external files using BigQuery standard SQL, but company security policy prohibits granting developers direct 'storage.objects.get' permissions on the underlying GCS buckets. How should the data architect configure BigQuery to satisfy both security and analytical requirements?