Data Lakehouse

Galaxy Glossary

What is a data lakehouse and how does it work?

A data lakehouse is an analytics architecture that combines the low-cost, flexible storage of a data lake with the transactional guarantees and management features of a data warehouse, allowing structured and unstructured data to be stored in open formats and queried with SQL or other engines.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Description

Data Lakehouse

A data lakehouse merges the scalability of data lakes with the data management and performance features of warehouses, enabling teams to run BI, ML, and real-time analytics from a single, open data platform.

Definition

A data lakehouse is an open analytics architecture that layers ACID transactions, schema enforcement, and data governance directly on top of low-cost object storage. It allows teams to ingest raw data like a traditional data lake, while simultaneously offering the reliability, performance, and SQL semantics expected from a data warehouse. The result is a single source of truth for both structured and unstructured data that supports business intelligence (BI), data science, and streaming workloads without forcing data copies across systems.

Why It Matters

Traditional data stacks force organizations to maintain both a data lake for inexpensive storage and a warehouse for curated, query-ready data—a setup that introduces costly data movement, duplicated pipelines, and governance headaches. Lakehouses address these pain points by:

  • Lowering total cost of ownership: no need to pay warehouse storage rates for raw data.
  • Simplifying architecture: one system to secure, monitor, and govern.
  • Speeding time-to-insight: analytics teams can query fresh data minutes after ingestion.
  • Enabling advanced analytics: machine-learning models and dashboards draw from the same, consistent tables.

How the Lakehouse Evolved

From Data Warehouses

Data warehouses excel at fast SQL queries over structured data but struggle with semi-structured and unstructured formats, and their proprietary storage makes petabyte-scale datasets expensive.

From Data Lakes

Data lakes democratized storage by placing raw files—CSV, Parquet, images—into cheap object stores like Amazon S3. Unfortunately, data lakes lacked transactions and governance, causing so-called “data swamps.”

The Convergence

The lakehouse architecture emerged around 2019 (pioneered by Databricks with Delta Lake, followed by Apache Iceberg and Hudi) to fuse these paradigms. By adding a transaction log and metadata layer to open file formats, lakehouses deliver warehouse-grade capabilities on lake storage.

Key Characteristics

  • Open, columnar formats (Parquet, ORC) instead of proprietary binaries.
  • ACID transactions via commit logs, enabling UPDATE, DELETE, and batch inserts.
  • Schema evolution & enforcement to keep data consistent while allowing changes.
  • Metadata layer storing table versions, statistics, and partition info for faster query planning.
  • Decoupled storage & compute: object storage scales independently from Spark, Trino, DuckDB, or your favorite engine.
  • Time-travel queries for debugging and reproducibility.
  • Support for streaming + batch in a unified table abstraction.

Lakehouse Architecture Components

1. Object Storage

S3, Azure Data Lake Storage, or Google Cloud Storage hold immutable Parquet/ORC files.

2. Transaction Log

An ordered record of every write (e.g., _delta_log for Delta Lake, metadata for Iceberg) guaranteeing ACID semantics.

3. Metadata & Catalog

Table definitions, schemas, and statistics registered in Apache Hive Metastore, AWS Glue, Unity Catalog, or open catalogs like Nessie.

4. Query Engines

Spark, Trino, Presto, Flink, Snowflake, BigQuery, DuckDB, or even the Postgres file_fdw extension can all query the same data.

Popular Lakehouse Technologies

Delta Lake (Linux Foundation), Apache Iceberg, and Apache Hudi are the dominant open-source table formats. Proprietary offerings such as Snowflake Iceberg Tables, Databricks Unity Catalog, and BigQuery Object Tables bring similar ideas to managed platforms.

Best Practices

  1. Choose an open table format—Delta, Iceberg, or Hudi—to avoid vendor lock-in.
  2. Partition intelligently (e.g., by date) to balance file size and pruning efficiency.
  3. Compact small files regularly to maintain query performance ("optimize" or "rewrite" jobs).
  4. Implement data quality checks at ingestion using expectations frameworks (e.g., Great Expectations).
  5. Govern access centrally via a unified catalog or lakehouse-native ACLs.
  6. Version your pipelines so that schema changes roll out alongside code deployments.
  7. Monitor storage layout—file counts, sizes, and transaction log growth—to predict maintenance windows.

Common Misconceptions

  • "A lakehouse replaces data modeling." You still need well-designed schemas, naming conventions, and documentation.
  • "It’s only for massive scale." Even sub-terabyte datasets benefit from open formats, low storage cost, and rollback safety.
  • "Lakehouse = Delta Lake." Delta is one implementation; Iceberg and Hudi provide equivalent capabilities.

Practical Example

Assume sales data lands as daily CSVs in s3://company-data/raw/sales/. A Spark job converts them to Delta Lake and creates a table:

from pyspark.sql import SparkSession
spark = SparkSession.builder.appName("ingest").getOrCreate()
raw_df = spark.read.option("header", True).csv("s3://company-data/raw/sales/")
(raw_df
.write
.format("delta")
.partitionBy("sale_date")
.mode("append")
.save("s3://company-data/lakehouse/sales"))

spark.sql("""
CREATE TABLE analytics.sales
USING DELTA
LOCATION 's3://company-data/lakehouse/sales'
""")

A downstream analyst can query the same table with Trino or Galaxy’s SQL editor:

SELECT customer_id, SUM(amount) AS revenue
FROM analytics.sales
WHERE sale_date >= DATE '2024-01-01'
GROUP BY customer_id
ORDER BY revenue DESC
LIMIT 100;

Galaxy & the Lakehouse

Because most lakehouse table formats expose a standard ANSI-SQL interface, they plug seamlessly into Galaxy. Connect Trino, Postgres, or DuckDB to your object store, launch Galaxy’s desktop app, and you can:

  • Auto-complete lakehouse table names and columns thanks to Galaxy’s metadata sync.
  • Use the AI copilot to translate business questions into optimized SQL that leverages partition pruning.
  • Share and endorse reusable lakehouse queries via Galaxy Collections so that teams don’t paste code in Slack.

When to Use a Lakehouse

Pick a lakehouse if you need open storage, diverse analytics, or ML on large volumes of semi-structured data. For extremely small, purely relational workloads, a cloud warehouse alone may suffice.

Conclusion

The data lakehouse delivers the elusive single platform for all analytics by marrying lake economics with warehouse reliability. With open formats like Delta Lake, Iceberg, and Hudi—and SQL editors like Galaxy—it has become the modern default for scalable, cost-effective data architectures.

Why Data Lakehouse is important

Data teams are under pressure to support real-time dashboards, advanced ML, and petabyte-scale storage while keeping costs down. Traditional approaches split workloads between costly warehouses and messy data lakes, creating silos and governance nightmares. The lakehouse resolves these contradictions by introducing ACID semantics, schema management, and fine-grained security directly on lake storage, letting organizations perform BI, streaming, and AI from one open platform while avoiding vendor lock-in.

Data Lakehouse Example Usage


SELECT * FROM delta.`s3://company-data/lakehouse/sales` WHERE sale_date >= '2024-01-01';

Common Mistakes

Frequently Asked Questions (FAQs)

What problems does a data lakehouse solve?

It removes the need for separate data lakes and warehouses, cutting storage costs, eliminating data copies, and providing one governed platform for BI, ML, and real-time analytics.

Is a lakehouse suitable for small companies?

Yes. Even modest datasets benefit from open formats, low storage cost, and rollback capabilities. Managed offerings or serverless engines lower the operational burden.

How does Galaxy interact with a data lakehouse?

Galaxy connects to any SQL engine that can query lakehouse tables—such as Trino, DuckDB, or Spark Thrift Server. Once connected, Galaxy’s AI copilot assists with auto-generated, optimized SQL against Delta/Iceberg/Hudi tables.

Delta Lake vs. Iceberg vs. Hudi—what’s the difference?

All three provide ACID transactions and schema evolution. Delta Lake emphasizes simplicity and tight Spark integration, Iceberg focuses on engine neutrality and hidden partitioning, while Hudi shines in streaming upserts. Choose based on workload and ecosystem.

Want to learn about other SQL terms?