Skip to main content

Data Lake Architecture

A data lake is a central repository that stores large volumes of data from across the organization, in its original form and at low cost, so that it can later be processed, analyzed and used for reporting, data science and AI. The term was coined to contrast with the data warehouse: instead of carefully modeling data before loading it, a data lake first collects data as it is and applies structure when it is read and processed.

Data warehouseData lakeLakehouse
DataStructured, modeledAny format: tables, JSON, logs, files, imagesAny format, with structured tables on top
SchemaDefined before loading (schema-on-write)Defined when reading (schema-on-read)Both: raw data plus managed tables with schemas
StorageProprietary database storageCheap object storage (S3, ADLS, GCS)Object storage with an open table format
StrengthFast, reliable SQL analytics and reportingFlexibility, scale, low cost, raw historyCombines both on one copy of the data
RiskRigid, expensive at scaleTurns into a "data swamp" without governanceRequires platform maturity

Today, most new platforms follow the lakehouse approach. Data is stored in open file formats such as Apache Parquet, organized as tables using open table formats such as Apache Iceberg, Delta Lake or Apache Hudi. These formats add what plain files lack: transactions, schema evolution, updates and deletes (needed, for example, for GDPR erasure requests), and time travel to earlier versions. See also Martin Fowler's short explanation of the data lake concept.

Reference architecture​

The architecture has four main parts:

  1. Ingestion brings data from source systems into the lake, in batches or as a continuous stream of events.
  2. Storage and processing organize the data in layers of increasing quality: bronze, silver and gold.
  3. Consumption builds analytical capabilities on top: reporting, data science, AI and data products.
  4. Governance and operations run across everything: catalog, lineage, access control, data quality, orchestration.

Ingestion: batch or event-driven​

Data can be loaded into the lake in two fundamentally different ways. Most platforms use both.

Batch loadingEvent-driven loading
HowExtract data periodically (hourly, nightly) and load it as files or tablesCapture each change as an event and write it continuously
LatencyHoursSeconds to minutes
SourcesDatabases, SaaS APIs, files, legacy systemsDatabases via Change Data Capture, application events, IoT
ComplexitySimple to build and operateMore moving parts; needs a streaming platform
Good forDaily reporting, finance, historical analysisOperational dashboards, fraud detection, near real-time products
ToolsAirbyte, Fivetran, AWS Glue, custom extractsDebezium, Apache Kafka, Kafka Connect S3 sink, Amazon Data Firehose, Apache Flink, Spark Structured Streaming

Example: event-driven ingestion​

Every insert, update and delete in the order database becomes an event, captured by Change Data Capture without changing the source application. Together with business events published by services, these events flow through Kafka and are appended continuously to bronze tables. The same events can also feed other real-time consumers, so the lake is one of several subscribers rather than a special integration.

Example: batch ingestion​

A nightly job extracts changed rows from a legacy ERP and the full customer list from a SaaS CRM, and writes them as Parquet files into the bronze layer, partitioned by load date. It is simple and robust, and for many reporting needs, data from last night is good enough.

The medallion architecture: bronze, silver, gold​

The medallion architecture, popularized by Databricks, organizes the lake into three layers. Each layer improves the quality and usability of the data, and each has a clear purpose and audience.

BronzeSilverGold
PurposeLand the data exactly as receivedClean, validate and integrateServe business use cases
ContentRaw records and events, append-only, with load metadataDeduplicated, typed, validated records; current state and history; joined across sourcesAggregates, KPIs, dimensional models, data products
ModelSource system's structureAligned with the enterprise conceptual data modelShaped for consumption: star schemas, wide tables, metrics
QualityAs good as the sourceChecked and trustedBusiness-certified
Main usersData engineersData engineers, data scientists, analystsAnalysts, business users, reports, AI
Examplebronze.erp_orders_cdc: every change event of the ERP order tablesilver.orders: one row per order, latest version, standardized status and currencygold.daily_sales_by_region, gold.customer_360

Bronze: raw and complete​

The bronze layer keeps everything that arrived, unchanged, with metadata such as source, load time and file name. Nothing is lost, and if a transformation later turns out to be wrong, silver and gold can be rebuilt from bronze. Access is usually restricted, because bronze may contain unmasked personal data.

Silver: clean and conformed​

The silver layer turns raw data into a trustworthy, integrated view of the business:

  • remove duplicates and resolve the latest version of each record (essential for CDC data)
  • enforce data types, formats and validation rules; quarantine invalid records
  • standardize codes, currencies, time zones and identifiers across sources
  • translate source-specific structures into the shared business language, for example ERP table T_KUNDE into the entity Customer
  • mask or pseudonymize personal data where full detail is not needed

Example transformation from bronze CDC events to a silver table, written as a dbt model:

models/silver/silver_orders.sql
-- One row per order: the latest version from the CDC stream
with ranked as (
select
payload.order_id as order_id,
payload.customer_id as customer_id,
upper(payload.status) as status,
cast(payload.total_amount as decimal(18,2)) as total_amount,
payload.currency as currency,
cast(payload.created_at as timestamp) as created_at,
op as change_type,
row_number() over (
partition by payload.order_id
order by ts_ms desc
) as rn
from {{ ref('bronze_erp_orders_cdc') }}
)
select order_id, customer_id, status, total_amount, currency, created_at
from ranked
where rn = 1
and change_type != 'd' -- exclude deleted orders

Gold: business-ready​

The gold layer contains data shaped for specific uses: dimensional models (facts and dimensions, following Kimball's techniques), aggregated KPI tables, and domain data products with owners and guarantees.

models/gold/gold_daily_sales_by_region.sql
-- Revenue per day and region, in EUR, excluding cancelled orders
select
cast(o.created_at as date) as sales_date,
c.region as region,
count(*) as order_count,
sum(o.total_amount * fx.rate_to_eur) as revenue_eur
from {{ ref('silver_orders') }} o
join {{ ref('silver_exchange_rates') }} fx
on fx.currency = o.currency
and fx.rate_date = cast(o.created_at as date)
join {{ ref('silver_customers') }} c on c.customer_id = o.customer_id
where o.status not in ('CANCELLED')
group by cast(o.created_at as date), c.region
tip

Keep business logic in one place. Definitions such as "revenue" or "active customer" belong in silver or gold transformations and in the semantic layer, versioned and tested. When every report calculates them on its own, numbers stop matching.

Analytical capabilities and visual reporting​

Gold data becomes valuable when people can use it.

Query engines​

SQL engines read the lakehouse tables directly, without copying data into another system: Amazon Athena, Trino, Apache Spark, Google BigQuery, Databricks SQL and others. Because the tables use open formats, several engines can work on the same data.

Semantic layer​

A semantic layer defines business metrics and dimensions once ("revenue", "order count", "region") and makes them available to all tools, so that a dashboard, a spreadsheet and an AI assistant all calculate revenue the same way. Examples include the dbt Semantic Layer, Cube, and the semantic models built into BI tools.

Reporting and dashboards​

CategoryTools
Commercial BIPower BI, Tableau, Looker, AWS Quick Sight
Open source BIApache Superset, Metabase

Good practice for reporting on the lake:

  • Certified datasets: mark gold datasets and dashboards that are officially approved, so users know which numbers to trust.
  • Self-service on top of gold: business users build their own reports from certified datasets instead of requesting each one from the data team.
  • Performance: aggregate in gold and let BI tools cache or import data; do not build dashboards that scan raw bronze data.

Data science, AI and data products​

  • Data scientists work with silver and gold data in notebooks, train models, and write features back to the lake.
  • AI assistants answer questions in natural language over gold tables, using the semantic layer and the data catalog as context (see AI transformation).
  • Applications consume gold data products through APIs, exports or direct table access, instead of building their own integrations with source systems.

Governance and operations​

Without governance, a data lake becomes a data swamp: lots of data that nobody can find, understand or trust. The practices from data governance apply to every layer:

ConcernPracticeExample tools
Catalog and lineageEvery table documented, with owner, description, and lineage from source to reportUnity Catalog, AWS Glue Data Catalog, DataHub
Access controlPermissions by layer, domain and classification; column masking and row filters for sensitive dataAWS Lake Formation, Unity Catalog
Data qualityAutomated tests on every transformation: uniqueness, completeness, valid values, freshnessdbt tests, Great Expectations, Soda
OrchestrationPipelines scheduled, dependencies managed, failures alertedApache Airflow, Dagster
Retention and privacyRetention per layer; deletion of personal data on request, supported by table formatsIceberg / Delta deletes, lifecycle rules on storage
CostPartitioning, compaction of small files, storage tiers, query cost monitoringEngine and cloud cost tools

Example implementations​

Building blockAWSAzure / MicrosoftGoogle CloudDatabricks
StorageAmazon S3Azure Data Lake Storage, OneLakeCloud StorageCloud object storage
Table formatIcebergDelta LakeIceberg (BigLake)Delta Lake, Iceberg
Streaming ingestionMSK (Kafka), Data FirehoseEvent HubsPub/SubStructured Streaming
ProcessingGlue, EMR (Spark)Fabric, SynapseDataproc, BigQueryDatabricks
Catalog and accessGlue Data Catalog, Lake FormationMicrosoft Purview, OneLakeDataplexUnity Catalog
SQL analyticsAthena, RedshiftFabric warehouseBigQueryDatabricks SQL
ReportingQuick SightPower BILookerDashboards, any BI tool

Many organizations combine providers, for example storage and ingestion on one cloud, processing in Databricks or Snowflake, and reporting in Power BI. Open table formats make such combinations easier.

Data lake and data mesh​

A central data lake run by one data team can become a bottleneck: every new source and every new report waits for that team. The data mesh approach distributes ownership to business domains, which publish their own data products.

The two are not opposites. A common setup is:

  • a central self-service platform (storage, ingestion, processing, catalog, governance), run by a platform team, following the platform mindset
  • domain teams that own their silver and gold data products on that platform, with clear data contracts
  • shared governance that sets the rules for quality, security and interoperability

Common pitfalls​

  • Data swamp: loading everything without owners, documentation or quality checks.
  • Skipping silver: building reports directly on raw data. Every report then cleans the data differently.
  • Gold per report: one gold table for every dashboard, with slightly different logic each time, instead of reusable models and a semantic layer.
  • Copying the source structure all the way up: gold tables that still look like the legacy ERP, so only experts can use them.
  • Real-time by default: building streaming pipelines for use cases that only need daily data.
  • Unmanaged cost: inefficient queries scanning terabytes, too many small files, and data kept forever.