Data Lake Architecture: Storage and Workload Choices
Learn how data lakes organize analytical data, choose partitions and table formats, and plan retention, access, quality, and cost controls.
A data lake stores data in object storage for analytical, processing, or discovery workloads, but retention, access, deletion, and cost rules still apply. Bronze/silver/gold is one possible organization pattern, not a requirement. File sizes, partitions, and table formats should be chosen from the target engine, workload, and interoperability needs.
Data Lake Architecture: Storage and Workload Choices
Data warehouses organize data for known questions, such as revenue by region and quarter. A data lake can also retain selected source and derived data for exploration or workloads that do not fit a fixed reporting model. That flexibility does not require keeping every field or giving every team access to all raw data.
A data lake can hold source data in its original or minimally transformed form alongside derived datasets. Schema enforcement may happen at ingestion, at query time, or both, depending on the pipeline and table format. Keeping data for later work has costs and privacy implications, so define purpose, access, retention, deletion, and ownership before broad ingestion.
When to Use a Data Lake
A data lake can fit when:
- You need to store raw data before schema requirements are known (discovery analytics, ML feature engineering)
- Data comes from multiple sources with different schemas that will evolve over time
- You need time travel—reading older versions of data for auditing, model reprocessing, or error correction
- Your team runs ML workloads that require flexible access to denormalized feature stores
- Object storage fits the access pattern, and the team can operate its metadata, retention, and access controls
A different storage or query layer may fit better when:
- Your primary workload is pre-aggregated business intelligence dashboards (use a warehouse)
- You need sub-second query response times on large datasets (use a specialized query engine)
- Your team lacks the data engineering discipline to maintain catalog metadata and partitioning standards
- Strict ACID transactions across multiple tables are required for every operation (use a warehouse or lakehouse)
The Core Idea: Schema-on-Read
Some data lake workflows use schema-on-read, while managed table formats and ingestion pipelines can also enforce or evolve schemas during writes. The format, catalog, engine, and validation policy determine when structure is checked.
Flexible ingestion can help when downstream requirements are still changing, provided the raw data has an owner, a documented schema or format, and an approved retention and deletion policy.
# Example: Writing raw events to a data lake in Parquet format
from pyspark.sql import SparkSession
spark = SparkSession.builder \
.appName("RawEventsToDataLake") \
.getOrCreate()
# Events land as raw JSON, stored in bronze/raw/ partition
events_df = spark.read.json("s3://raw-events-bucket/clickstream/2025/03/")
# Write to data lake in Parquet, partitioned by date
events_df.write \
.mode("append") \
.partitionBy("event_date") \
.parquet("s3://datalake-bucket/bronze/clickstream_events/")
Bronze/silver/gold (also called raw/refined/curated) is one common naming pattern. Bronze may preserve a source copy when retention and privacy requirements allow it; silver applies cleaning or conformance; gold exposes purpose-built datasets. Teams can use different names or omit layers when they do not provide a useful boundary.
Storage Technologies
Modern data lakes sit on object storage: AWS S3, Azure Data Lake Storage (ADLS), or Google Cloud Storage (GCS). Object storage can scale across large datasets, but capacity, request, retrieval, replication, and egress charges depend on provider and usage. Compare the full lifecycle cost with the alternatives for your workload.
The data lake formats you choose affect everything downstream. The dominant formats are:
Parquet is a columnar format that can suit analytical reads when the target engines support it. Projection and pruning behavior, file size, compression, and query cost depend on writer, reader, and workload. Benchmark it against the formats your engines support before choosing.
ORC is another columnar file format with its own encodings, metadata, and engine support. Compare it with Parquet on the same data, codec, query, and software versions.
Delta Lake and Apache Iceberg are table formats that add table metadata and transactional operations on supported engines. Their feature support, retention behavior, catalogs, and interoperability vary by engine and version. They are options when those capabilities are needed, not requirements for every lake. Review the Delta Lake documentation and Apache Iceberg documentation for current compatibility and operations; checked 2026-11-12.
Storage Format Trade-Offs
| Format | Strengths | Weaknesses | Best For |
|---|---|---|---|
| Parquet | Columnar, excellent compression, broad tool support | No ACID transactions, no time travel | Analytical reads on immutable data |
| ORC | Hive-optimized columnar, good compression | Narrower ecosystem than Parquet | Hadoop/Hive environments |
| Delta Lake | Table transactions and versioned snapshots on supported engines | Feature support varies by engine and version | Workloads that need the supported Delta features and integrations |
| Iceberg | Table metadata and operations defined by its specification | Catalog and engine support still need validation | Workloads whose engines support the needed Iceberg features |
-- Delta Lake example: reading historical data with time travel
SELECT * FROM events
VERSION AS OF 20250301
WHERE event_type = 'purchase';
-- Reading data from a specific checkpoint
SELECT * FROM events
TIMESTAMP AS OF '2025-03-01 00:00:00';
Partitioning Strategy
Partitioning can reduce the data read by matching queries, but the benefit depends on pruning support, data distribution, and query shape. A partition groups data so compatible query engines can prune unrelated files or partitions. The physical layout and supported partitioning model vary by table format and engine.
Partitioning by event date makes sense for time-series data. A query for “all events in March 2025” only reads the March 2025 partitions, skipping everything else. But if your queries almost always filter on customer ID rather than date, date partitioning forces full table scans.
# Poor partitioning: too many small files per partition
events_df.write.partitionBy("event_date", "event_hour").parquet(path)
# Better partitioning: larger files per partition, manageable partition count
events_df.repartition(100, "event_date").write.partitionBy("event_date").parquet(path)
File size affects metadata, scheduling, parallelism, and read efficiency. The 128 MB–1 GB compressed range is only an initial benchmark range from this example, not a portable target; measure with the selected engine and workload.
Capacity Estimation
Partition count grows with your data volume and date range. A table with 3 years of daily partitions creates over 1,000 partitions—each one a directory with metadata overhead.
# Estimate partition count and storage
years_of_data = 3
events_per_day = 10_000_000
avg_event_size_bytes = 512
compression_factor = 0.25 # Illustrative assumption; measure on representative data
days_per_year = 365
total_events = events_per_day * days_per_year * years_of_data
raw_size_gb = (total_events * avg_event_size_bytes) / (1024**3)
compressed_size_gb = raw_size_gb * compression_factor
partition_count = days_per_year * years_of_data
# Example benchmark target only: compare candidate sizes around 256MB compressed
target_file_size_mb = 256
events_per_file = (target_file_size_mb * 1024**2) / (avg_event_size_bytes * compression_factor)
files_per_day = events_per_day / events_per_file
print(f"Total events: {total_events:,}")
print(f"Raw size: {raw_size_gb:.1f} GB")
print(f"Compressed size: {compressed_size_gb:.1f} GB")
print(f"Partition count: {partition_count}")
print(f"Files per day: {files_per_day:.0f}")
# Total events: 10,950,000,000
# Raw size: 5251.2 GB
# Compressed size: 1312.8 GB
# Partition count: 1095
# Files per day: 40
With these illustrative assumptions, the calculation estimates file count for one possible layout. Replace the event size, compression factor, and 256 MB target with measurements from the chosen writer and engine. A date-only partition is one candidate; compare query pruning, partition count, and object size before adopting it.
Data Catalog: Finding What Exists
A catalog can index lake assets, schemas, ownership, freshness, and lineage when its connectors support the source and are configured. Provider product names and connector coverage change; use Data Catalog to compare current options and verify each provider’s documentation before deployment.
Catalog registration can be automated or managed as code. Check the provider and engine documentation for the exact table format, input format, permissions, and catalog API; do not copy a connector snippet across formats.
Observability for Data Lakes
Track these metrics to catch problems before they become swamps:
# Partition discovery monitoring
def check_partition_health():
"""
Key data lake observability metrics:
"""
queries = [
# Count partitions per table (alert if > threshold)
\"\"\"
SELECT table_name, COUNT(DISTINCT partition_key) as partition_count
FROM information_schema.partitions
GROUP BY table_name
HAVING partition_count > 5000
\"\"\",
# Find tables with no recent data (stale catalog)
\"\"\"
SELECT table_name, MAX(partition_timestamp) as last_data
FROM information_schema.partitions
GROUP BY table_name
HAVING DATEDIFF(now(), MAX(partition_timestamp)) > 7
\"\"\",
# Detect schema drift: column count changed since last run
\"\"\"
SELECT table_name, column_count,
LAG(column_count) OVER (PARTITION BY table_name ORDER BY checked_at) as prev_count
FROM schema_version_history
WHERE column_count != prev_count
\"\"\"
]
return queries
# Alert thresholds:
# - Partition count > 10,000: investigate partitioning strategy
# - Stale data > 7 days: check pipeline health
# - Schema drift: block downstream pipelines until resolved
What to log per pipeline run: rows_read, rows_written, files_created, partition_count_delta, bytes_written, duration_seconds, schema_version_hash. Alert on: zero rows written when source had rows, partition count growing 10x expected, schema hash mismatch vs expected.
Handling Schema Evolution
Source systems change. A web application starts capturing a new field. A database adds a column. An API modifies a response format. Schema-on-read handles this gracefully in theory, but in practice you need processes for managing evolution.
Some readers can merge compatible schemas across files, but behavior depends on engine settings and file history; an added field may be absent in older records. Manage changes through the ingestion pipeline, publish the resulting schema, and notify consumers. Table formats may provide schema-evolution operations, subject to their supported features and engine versions.
Data Lake Architecture
The bronze/silver/gold medallion pattern organizes the data lake into quality tiers:
flowchart TD
subgraph Sources[Source Systems]
ERP[ERP System]
CRM[CRM Platform]
Logs[App Logs]
IoT[IoT Sensors]
end
subgraph Bronze[Bronze Layer (Raw)]
B_ERP[s3://datalake/bronze/erp/]
B_CRM[s3://datalake/bronze/crm/]
B_Logs[s3://datalake/bronze/logs/]
B_IoT[s3://datalake/bronze/iot/]
end
subgraph Silver[Silver Layer (Cleaned)]
S_Events[s3://datalake/silver/events/]
S_Customers[s3://datalake/silver/customers/]
S_Transactions[s3://datalake/silver/transactions/]
end
subgraph Gold[Gold Layer (Curated)]
G_Marts[Analytics Marts]
G_Features[ML Feature Store]
G_Reports[BI Datasets]
end
ERP --> B_ERP
CRM --> B_CRM
Logs --> B_Logs
IoT --> B_IoT
B_ERP --> S_Events
B_CRM --> S_Customers
B_Logs --> S_Transactions
B_IoT --> S_Transactions
S_Events --> G_Marts
S_Customers --> G_Features
S_Transactions --> G_Reports
S_Events --> G_Features
In this illustration, bronze is a retained source copy, silver is cleaned and conformed, and gold serves purpose-specific datasets. Define retention and deletion behavior for each layer; a copy in bronze is still governed data.
When Data Lakes Go Wrong
The data swamp is the most common failure mode. Without discipline around naming conventions, partitioning, and cataloging, lakes become indistinguishable from cheap storage buckets with extra steps.
A lake does not automatically replace a warehouse. Some teams serve curated metrics from lake tables; others use a warehouse for predictable business reporting. Compare the target engines, query patterns, freshness, and operations before deciding whether those layers should be separate or combined.
Security and governance also get neglected. Object storage permissions can be surprisingly coarse-grained, and without proper access controls, you end up with either data silos (everyone gets their own bucket) or security risks (too many users have too much access). Integration with a data catalog’s governance features helps track who accesses what and for what purpose.
Quick Recap
- A lake can support flexible data storage, but schema enforcement, retention, deletion, and access still need explicit policies.
- Choose raw files or a table format based on transaction, versioning, interoperability, and operational needs; Delta Lake and Iceberg are not universal requirements.
- Choose partitions from query patterns and the table format, then benchmark pruning and file counts.
- Treat file-size guidance as an engine-specific benchmark, not a universal target.
- Track schema, owner, freshness, retention, and deletion process for each governed dataset.
- Monitor partition counts, file sizes, and schema drift — catch data swamp formation early.
Conclusion
A data lake is one storage and processing option for analytics, machine learning, or discovery. Retaining source copies can support replay, but each dataset needs a purpose, owner, access policy, retention period, deletion path, and cost review.
Choose a table format only when its features and engine integrations fit the workload. Benchmark partitions and file sizes with representative queries, and keep metadata, ownership, freshness, retention, and deletion visible. For next steps, see Data Governance and Data Quality.
For most teams, the right architecture is a data lake for raw storage and exploration, a processing layer (Spark, dbt, or Flink) for transformations, and a data warehouse for curated, business-level datasets. Each component has its role.
For adjacent practices, see Data Governance, Data Quality, and Data Warehouse Architecture.
Category
Related Posts
AWS Data Services: Kinesis, S3, Glue, Athena, Redshift
Follow an order event from Kinesis Data Streams through S3 to Athena or Redshift, adding Glue when transformation or shared catalog metadata helps.
Azure Data Pipelines with Event Hubs and Synapse
Follow live events and scheduled data through Azure processing, Data Lake Storage Gen2, and Synapse, with a clear choice between stream and batch paths.
Data Migration: Strategies and Patterns for Moving Data
Plan data movement between systems with CDC, staged cutovers, validation gates, and recovery paths. Learn where schema migration is a separate concern.