Platform · Open reference architecture
The open lakehouse on a laptop
Spark 4.3, Apache Iceberg, Unity Catalog, Kafka, Airflow, MLflow and an agent, in Docker
The whole stack, one service at a time, on the machine in front of you.
In one paragraph
The open lakehouse on a laptop runs every layer of an open source data platform in Docker on one machine: SeaweedFS as S3-compatible storage, Apache Iceberg tables in Unity Catalog OSS 0.7 through its Iceberg REST endpoint, Apache Spark 4.3 behind a Spark Connect server, Spark Declarative Pipelines for the medallion, Kafka for events, Airflow 3 for scheduling and table maintenance, DuckDB reading the same tables, MLflow for models, and an AI agent on Omnigent with a local model, MCP tools and policies. It exists so a data engineer, a student or an AI agent can build, test and tear down a real lakehouse without a cloud account.
Platform
Spark 4.3, Apache Iceberg, Unity Catalog, Kafka, Airflow, MLflow and an agent, in Docker
Sources
Ingestion
Open lakehouse platform
AI and agents
The agents, the control plane that decides what they may do, and the models behind them.
Engine access
How agents, apps and people reach compute: a client session per identity.
Execution
Spark's execution modes, plus engines that read the same tables.
Data foundation
Open tables in a governed catalog, on storage you own.
Operations
Serving
Teams
When to use it
- You want to learn how the layers of an open lakehouse fit together by building them.
- You need a local integration environment with a real catalog and object store.
- You want an AI agent to have a full, disposable stack to work against.
When to pick something else
- Production: the course's Terraform chapter is illustrative and not applied.
- Teams that need a released Iceberg runtime for Spark 4.3 today: the course builds one from an open Iceberg pull request.
Walkthrough
How data moves through it
- 1
Storage and compute
SeaweedFS serves the S3 API; Spark 4.3 runs behind a Spark Connect server that every client, including the agent, reaches at sc://.
- 2
Tables and catalog
Unity Catalog OSS 0.7 is the Iceberg REST catalog; tables are named iceberg.<namespace>.<table>, and the agent gets its own sandbox namespace.
- 3
Bronze, silver, gold
Batch loads and a Structured Streaming job land bronze; a Spark Declarative Pipeline derives silver and gold.
- 4
Schedule and maintain
Airflow runs the pipeline with backfills and a second DAG compacts files and expires snapshots.
- 5
Serve and learn
DuckDB reads gold through the same catalog, MLflow trains on it and records the snapshot id.
- 6
Hand it to an agent
An agent on Omnigent with a local model and MCP tools writes pipelines into its sandbox; policies require a passing dry run and ask before code pulls results onto one machine.
Bill of materials
Components and versions
| Capability | Component | Role in this architecture | Version | License |
|---|---|---|---|---|
| SourcesSource systems | Order-event generator | Batch and streaming order events, the course's one dataset | ||
| IngestionBatch and file ingestion | Idempotent bronze loader | Appends each batch once | ||
| IngestionEvent streaming | Apache Kafka | Order events for the streaming chapter | Confluent 7.5.0 images | Apache-2.0 |
| AI and agentsAgent harness and policy | Omnigent | Runs the SDP agent and evaluates ALLOW, DENY and ASK policies on every tool call | 0.22.0 | |
| AI and agentsTools and skills | Model Context Protocol | Named tools: read and write pipeline files, dry-run or run the pipeline, run one SQL statement; no shell | MIT | |
| AI and agentsModels and gateway | Ollama | Local model sdp-qwen3, built from qwen3:14b with a 16K context window | MIT | |
| AI and agentsML lifecycle | MLflow | Tracks a model trained on gold and logs the gold snapshot id | 3.1.0 | Apache-2.0 |
| Engine accessSpark Connect sessions | Spark Connect | sc://spark-connect:15002 for every client, the agent included | 4.3.0 | Apache-2.0 |
| ExecutionBatch and SQL | Apache Spark | Ingestion and queries over Spark Connect | 4.3.0 | Apache-2.0 |
| ExecutionDeclarative pipelines | Spark Declarative Pipelines | Bronze to silver to gold; the agent's output, gated on a dry run | pyspark[pipelines]==4.3.0 | Apache-2.0 |
| ExecutionStructured Streaming | Apache Spark | Kafka to iceberg.bronze.orders_raw with a checkpoint on S3 | 4.3.0 | Apache-2.0 |
| ExecutionOther engines | DuckDB | Reads gold through the Iceberg REST endpoint | 1.5.6 | MIT |
| Data foundationCatalog and credentials | Unity Catalog OSSor Apache Polaris, Lakekeeper, unitycatalog-rs | Writable Iceberg REST catalog; a sandbox namespace for the agent | 0.7.0 | Apache-2.0 |
| Data foundationOpen table format | Apache Icebergor Delta Lake | Bronze, silver and gold tables; snapshots for time travel and rollback | runtime 4.3_2.13 built from apache/iceberg#18749 | Apache-2.0 |
| Data foundationObject storage | SeaweedFSor RustFS, MinIO, Amazon S3 | s3://lakehouse/warehouse | 4.51 | Apache-2.0 |
| OperationsOrchestration | Apache Airflowor Dagster | Schedules the medallion with backfills | 3.3.2 | Apache-2.0 |
| OperationsTable maintenance | Iceberg maintenance procedures | A DAG that runs rewrite_data_files, rewrite_manifests and expire_snapshots | Apache-2.0 |
People and agents
Who works with it
Data engineers
Pipelines that are correct, idempotent and cheap to rerun.
Works with: Batch and file ingestion, Event streaming, Batch and SQL, Declarative pipelines, Structured Streaming, Orchestration, Table maintenance, Open table format
AI agents
Tools with clear arguments, a sandbox to write into, fast feedback from dry runs, and version-pinned context.
Works with: Tools and skills, Spark Connect sessions, Declarative pipelines
ML and AI engineers
Reproducible models, traced and evaluated agents, and a model gateway they control.
Works with: ML lifecycle, Models and gateway, Agent harness and policy, Tools and skills
Analysts and analytics engineers
One definition of each metric, fast SQL, and dashboards that match.
Works with: Other engines, Batch and SQL
Platform engineers
A platform that is boring to run: deployable from code, observable, with identities for every person, service and agent.
Works with: Object storage, Catalog and credentials, Spark Connect sessions
Governance and security
Policies that hold in every engine and for every agent, lineage for audits, and least privilege by default.
Works with: Catalog and credentials, Agent harness and policy
Run it
Reference code
The course that builds this stack chapter by chapter, from storage to agents. You write the Compose file yourself; there is no single command.
The same layers prebuilt, writing Delta Lake into Unity Catalog 0.6.0 with Spark 4.1, started with one script.
git clone https://github.com/open-lakehouse/open-lakehouse
cd open-lakehouse
cp .env.example .env # fill in POSTGRES_*, S3_* placeholders
./lakehouse setup # validate env, install deps, download ~860MB of JARs
./lakehouse start all # Spark 4.1 master + worker + Connect server + Kafka
./lakehouse start unity-catalog
./lakehouse start mlflow
./lakehouse status --json # confirm healthy (incl. spark.connect_grpc_listening)Caveats from the reference repos
- There is no released Iceberg Spark runtime for Spark 4.3; chapter 5.5 builds it from apache/iceberg#18749 as a temporary step.
- Unity Catalog 0.7 or later is required for Iceberg writes through its REST catalog.
- The course recommends 16 GB of RAM; the agent's model needs about 12 GB of memory.
- Older SeaweedFS releases have an S3A _temporary rename bug; the course pins 4.51.
- In open-lakehouse, writes are Delta only: Unity Catalog 0.6.0 serves Iceberg read-only.
Answers
Frequently asked questions
- Can I run a full open source lakehouse on a laptop?
- Yes. The lakehouse masterclass builds Iceberg tables in Unity Catalog OSS 0.7 on SeaweedFS with Spark 4.3, Kafka, Airflow 3.3.2, DuckDB and MLflow in Docker, and adds an AI agent on Omnigent with a local Ollama model. The open-lakehouse repository offers a prebuilt Delta variant.
- Can an AI agent work on a local lakehouse safely?
- Yes. In the masterclass the agent writes only to its own sandbox namespace, uses named MCP tools instead of a shell, and policies require a passing dry run before any pipeline runs.
- How do other engines read the tables?
- Through Unity Catalog's Iceberg REST endpoint. DuckDB attaches it and reads the gold tables Spark wrote, without copies.
Related architectures
All architecturesPlatform
The agentic lakehouse
Omnigent and MLflow over sandboxed Spark Connect sessions, on Iceberg and Unity Catalog
Streaming
Streaming medallion
Kafka, Spark Structured Streaming and Apache Iceberg in Unity Catalog
Batch
Batch medallion with Spark Declarative Pipelines
Spark 4.3, Apache Iceberg and Unity Catalog with bronze, silver and gold
