🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Data Lake on GCS: BigLake, Lakehouse & Open Table Formats

GCP Data EngineeringData LakeđŸŸĸ Free Lesson

Data Lake on GCP: BigLake & Lakehouse

Build modern data lakes on GCS using BigLake tables, Iceberg, Delta Lake, and lakehouse architecture patterns.

20 min readAdvanced

What You'll Learn

  • 1Explain what separates a GCS data lake from a BigQuery warehouse and when each wins
  • 2Create BigLake external tables over Iceberg, Delta Lake, and Hive-partitioned Parquet
  • 3Choose a table format using hidden partitioning, time travel, and engine compatibility criteria
  • 4Apply lifecycle, compaction, and pruning rules that keep lake queries cheap

A lake built on Google Cloud Storage separates the cost of keeping bytes from the cost of reading them, so a team can land twenty terabytes of raw event data for a few dollars a month and only pay when someone runs a query against it. That separation is the whole appeal, and it is also the trap: cheap storage without structure produces a swamp nobody can query twice with the same answer. This lesson covers how BigLake and the open table formats turn a bucket of files into a governed, versioned, queryable dataset.

Why GCS Is the Right Substrate

Object storage gives a data lake three properties that a block disk cannot match. Durability is handled by the service through redundancy across zones, so there is no replica bookkeeping to maintain. Capacity is effectively unbounded, so landing a decade of clickstream logs needs no capacity planning. And access is decoupled from any single engine, which means the same Parquet files feed BigQuery, Dataproc Spark, Dataflow, and external engines without being copied.

Storage class matters more than most teams expect, because the price of a gigabyte differs by a factor of fifteen between tiers while retrieval charges run the other way. Standard storage costs real money at scale but has no access fee, whereas Archive storage is cheap to hold and charges a fee every time a byte is read. The decision rule is simple: anything a nightly job touches stays in Standard, and only compliance archives move down.

Storage classTypical use in a lakeRead feeMinimum age
StandardBronze and Silver layers queried dailyNoneNone
NearlineMonthly curated exportsSmall per-GB fee30 days
ColdlineQuarterly audit snapshotsLarger per-GB fee90 days
ArchiveRegulatory retention, seven yearsLargest per-GB fee180 days

Transitions between classes are also charged, so a lifecycle rule that bounces objects back up a tier after a mistake costs more than leaving them alone. Write lifecycle policies against the bronze prefix first, since raw landings grow fastest and are the least likely to be re-read byte for byte.

The Medallion Layout on Object Storage

Most mature lakes organise prefixes into three bronze, silver, and gold layers, and the naming is less important than what each layer guarantees about data quality. Bronze holds exactly what the source emitted, including nulls, duplicates, and malformed records, so any downstream bug can be repaired by replaying from the raw landing. Silver applies schema enforcement, type casting, deduplication, and conformance to a shared vocabulary. Gold holds business aggregates that a dashboard can read without further transformation.

# Lay out the three layers and make them self-describing
gsutil -m cp events-2026-03-14.jsonl.gz gs://acme-lake/bronze/events/2026/03/14/
gsutil -m cp -r parquet/silver/events/ gs://acme-lake/silver/events/

# Freeze bronze after 90 days so raw landings cannot be edited in place
cat > lifecycle-bronze.json << 'EOF'
{
  "rule": [
    {"action": {"type": "SetStorageClass", "storageClass": "NEARLINE"},
     "condition": {"age": 90}},
    {"action": {"type": "Delete"},
     "condition": {"age": 1095, "isLive": false}}
  ]
}
EOF
gsutil lifecycle set lifecycle-bronze.json gs://acme-lake/bronze/

Partitioning the bronze prefix by date is the single highest-leverage decision in the layout. Event-time directories let a backfill read one day of files instead of the whole bucket, and they line up with the partition column that BigQuery will use later, so pruning works from the very first query.

BigLake Tables and External Data

BigLake is the governance and access layer that sits over files in GCS and over open table formats, exposing them to BigQuery as if they were native tables. A BigLake table stores its data outside BigQuery but keeps identity, row-level filters, and policy tag enforcement inside the service, which means a query on external rows respects the same column-level security as a query on managed storage. The table is declared with a connection resource, because that connection carries the identity the service uses to read the bucket.

-- Iceberg table registered through BigLake
CREATE EXTERNAL TABLE `acme-lake.eng.iceberg_sales`
WITH CONNECTION `us-central1.lake-connection`
OPTIONS (
  format = 'ICEBERG',
  uris = ['gs://acme-lake/iceberg/sales/metadata/v1.metadata.json']
);

-- Delta Lake transaction log directory
CREATE EXTERNAL TABLE `acme-lake.eng.delta_sales`
WITH CONNECTION `us-central1.lake-connection`
OPTIONS (
  format = 'DELTA_LAKE',
  uris = ['gs://acme-lake/delta/sales/_delta_log/']
);

-- Hive-style partitioned Parquet
CREATE EXTERNAL TABLE `acme-lake.eng.hive_sales`
WITH CONNECTION `us-central1.lake-connection`
OPTIONS (
  format = 'PARQUET',
  uris = ['gs://acme-lake/hive/sales/*'],
  hive_partition_uri_prefix = 'gs://acme-lake/hive/sales/'
);

External tables scan the same way native tables do, so partition pruning, column pruning, and the result cache all apply. What they do not give you is managed storage durability, clustering, or BigQuery reservations billing, which is why production dashboards usually land on a materialised native copy while exploration stays on the external table.

Iceberg, Delta Lake, and Hive Compared

Hive-partitioned layouts encode partitions in the object path, which is cheap to write but pushes partition knowledge into every reader. Iceberg and Delta Lake store a metadata layer that maps partition values to files, so a reader resolves pruning without parsing paths. The differences show up when a schema or partition scheme changes mid-life, and when a second engine needs to read the same table.

CapabilityHive-partitionedApache IcebergDelta Lake
Partition discoveryPath parsingMetadata manifestsLog plus path
Hidden partitioningNoYesPartial
Partition evolutionRewrite dataChange transform onlyRewrite files
Schema evolutionManualColumn add, rename, promoteColumn add, rename
Time travelSnapshot copiesSnapshot ids, tagsVersion numbers
Engines on GCPHive, Spark, BigQuerySpark, Dataproc, BigQuerySpark, BigQuery, Databricks

Iceberg is the default recommendation for new GCP projects because the catalog, snapshot isolation, and partition evolution are wired into BigLake and Dataproc Serverless. Delta Lake stays the right answer when a Databricks pipeline already writes the table, since BigLake reads that same log without a conversion job. Hive layouts survive as the output of legacy ETL and are worth migrating at the first schema change that forces a full rewrite.

Keeping Queries Cheap: Pruning, Partitioning, and Caching

Bytes billed in BigQuery come from data actually read, so the job of a lake layout is to shrink the read set. On a daily-partitioned event table a query filtered to one day reads roughly the table size divided by the number of retained partitions, which turns a two-terabyte scan over three hundred and sixty-five partitions into about five and a half gigabytes when a partition filter is present. Without the filter the same query reads everything, because BigQuery cannot infer intent from the query text.

Three levers stack. Partition pruning removes whole partitions before any file is opened. Column pruning reads only the fields the projection needs, which on a wide Parquet table can cut bytes by another factor of five. The result cache then serves an identical repeated query from short-term storage at no scan cost, which is why dashboard teams should pin queries to deterministic expressions rather than using non-deterministic functions that miss the cache.

✨

Best practice: Enable require_partition_filter on large date-partitioned tables so BigQuery rejects a query that omits the partition predicate. It converts an accidental full scan into a visible error at authoring time instead of a surprise invoice at the end of the month.

Governance Across Lake and Warehouse

The reason to pay for BigLake rather than registering plain external tables is that one policy model covers both sides of the lakehouse. Dataplex scans buckets, infers schemas, and attaches sensitive-data labels, and the resulting policy tags travel with a column wherever it is queried, so masking defined once applies in BigQuery and in Dataproc. Bucket-level IAM controls who may read objects at all, and VPC Service Controls can close the exfiltration path by keeping access inside a service perimeter.

# Create the BigLake connection and grant it read access to the bucket
gcloud bigquery connections create \
  --location=us-central1 \
  --type=ONE_OFF_EXTERNAL \
  --connection_id=lake-connection

gcloud storage buckets add-iam-policy-binding gs://acme-lake \
  --member="serviceAccount:$(gcloud bigquery connections describe \
    projects/acme/locations/us-central1/connections/lake-connection \
    --format='value(credential.serviceAccountID)')" \
  --role="roles/storage.objectViewer"

Lineage is the other half of governance. When a gold table is rebuilt from silver and silver from bronze, Dataplex records those upstream references so an analyst who finds a bad number can walk back to the raw file rather than guessing which nightly job corrupted it.

Operating the Lake Over Time

Small files are the operational failure mode of every object-store lake. Ten thousand thirty-megabyte Parquet files from a chatty writer cost far more to plan and open than one three-hundred-gigabyte file holding the same rows, and BigQuery bills planning overhead against the slot budget. Iceberg and Delta both expose an optimise or compaction command that rewrites adjacent small files into larger ones while preserving snapshot history, and running it on a schedule keeps both cost and latency flat.

Retention is the second operational concern. Every snapshot Iceberg keeps is storage you pay for, so expire_snapshots with a retention window of seven to thirty days bounds growth without losing the time travel that auditors ask for. Combine that with the lifecycle rule on bronze and the lake has a defined cost curve instead of an open-ended one.

Common Mistakes

Registering external tables without a connection identity

Fix: Create a BigLake connection first and grant it objectViewer on the bucket, otherwise queries fail with an access denied error.

Partitioning by a low-cardinality column such as region

Fix: Partition by event date so pruning removes most files, then cluster by region inside each partition.

Treating bronze as an editable staging area

Fix: Bronze is write-once; fix problems downstream or re-land the source so raw history stays reproducible.

Best Practices

  • Land files in event-time directories so backfills and partition filters line up from day one
  • Run compaction and snapshot expiry on a schedule rather than after a cost surprise
  • Enforce a partition filter on large tables so full scans fail loudly at authoring time
  • Tag columns in Dataplex once so masking follows the data into every engine

Key Takeaways

  • BigLake adds identity, row filters, and policy tags to files in GCS, so external rows obey warehouse-grade access control
  • Iceberg wins on hidden partitioning and partition evolution; Delta Lake wins when Databricks already owns the table
  • Bytes billed shrink through partition pruning, column pruning, and the result cache, in that order of impact
  • Small-file compaction and snapshot expiry are what keep a cheap lake cheap after the first year

Frequently Asked Questions

What does a data lake give us that BigQuery alone does not?

BigQuery managed storage is excellent for curated analytics but bills for every byte retained and locks the format to BigQuery. A GCS lake keeps raw history at object-storage prices, stays readable by Spark and Dataflow, and lets teams promote only the slices that earn native storage.

How does time travel work on an Iceberg table in BigQuery?

Iceberg keeps a snapshot list in its metadata, so a query can be pinned to a snapshot id or a named branch and returns exactly the files visible at that point. Reads are isolated from concurrent writers, which makes a re-run of yesterday's pipeline deterministic.

Do we still need a Hive Metastore if we use Iceberg?

Iceberg keeps table metadata in the catalog rather than in the metastore, so new tables do not need one. Legacy Hive-partitioned tables still require metastore registration for schema and partition discovery, and BigQuery Metastore can host both while Dataplex keeps the catalog searchable.

How much does a lake cost compared with keeping everything in BigQuery?

Storage on GCS is billed per gigabyte-month with no scan fee, while BigQuery on-demand bills per TiB read and managed storage bills per gigabyte-month at a higher rate. The winning pattern is to keep all history on GCS and materialise only the hot windows into BigQuery.

Interview Questions

Q1: What is BigLake and why not just use external tables?

BigLake wraps external data with an identity, row-level filters, and policy tag enforcement so one policy model covers GCS and BigQuery. Plain external tables read the same files but leave access control to bucket IAM alone.

Q2: How would you choose between Iceberg and Delta Lake on GCP?

Pick Iceberg for new work because hidden partitioning, partition evolution, and snapshot maintenance are integrated with BigLake and Dataproc. Keep Delta Lake when an existing Databricks or Spark estate already writes the log, since BigLake reads it without conversion.

Q3: A query on a partitioned lake table scanned the whole table. What do you check first?

Check whether the filter is on the partition column in a form BigQuery can prune, whether require_partition_filter is set, and whether the column is actually partitioned rather than merely clustered. Then confirm the read is not hitting an unpartitioned external table registered from a flat URI.

Q4: What does compaction do and when should it run?

Compaction rewrites many small files into fewer large files while preserving snapshot history, which cuts planning overhead and scan cost. Run it on a schedule such as hourly for hot prefixes and nightly elsewhere, then expire snapshots older than the retention window.

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-14

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert GCP Data Engineering Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement