Delta Lake
==========

Delta Lake is an open-source table format and transaction layer that
enhances modern data lakes with ACID guarantees, schema enforcement,
time travel, and scalable performance.

EDB enables first-class support for querying Delta Lake tables as part
of the Analytics Accelerator — allowing Postgres SQL to operate on
large-scale lakehouse data.

For details on how Delta Lake is used and managed within Hybrid Manager
(HM), see `Delta Lake <https://enterprisedb.com/docs/edb-postgres-ai/hybrid-manager/analytics/delta_lake>`_  .

What is Delta Lake
------------------

Delta Lake adds database-like reliability and consistency to object
storage systems such as S3, GCS, and Azure Data Lake Storage.

Key characteristics:

- ACID transactions with strong data consistency

- Schema enforcement and schema evolution support

- Time travel for querying historical versions of data

- Batch and streaming support

- Open format built on `Apache Parquet <https://parquet.apache.org/>`_  with a transaction log
  (``_delta_log`` )

Related concept: :ref:`Open table formats <Open table formats>` 

Why Delta Lake matters for EDB analytics
----------------------------------------

Delta Lake support enables the Analytics Accelerator to:

- Query existing Delta Lake tables in place using Postgres SQL

- Support interoperable data architectures across Postgres, Spark,
  Trino, Presto, and more

- Eliminate unnecessary data duplication or movement between systems

- Provide governed, versioned data for analytical queries within
  Lakehouse clusters

Related concept: :ref:`EDB Postgres Lakehouse <EDB Postgres Lakehouse>` 

How EDB leverages Delta Lake
----------------------------

EDB Postgres Lakehouse clusters provide access to Delta Lake data
through the PGAA extension:

- Define Delta Lake external tables using
  ``CREATE TABLE ... USING PGAA WITH (pgaa.format = 'delta', ...)``

- Efficiently query Parquet-backed Delta Lake tables via vectorized
  execution with `Apache DataFusion <https://datafusion.apache.org/>`_ 

- Benefit from Delta Lake features including schema evolution and time
  travel

Current primary support: querying existing Delta Lake tables. PGD
offload currently targets Iceberg; Delta read support enables
integration with existing Delta-based data lakes.

Common use cases
----------------

.. csv-table::
  :header: Use case,Delta Lake + Analytics Accelerator
  :widths: 10,30
  :align: left
  :class: longtable

  Business intelligence reporting,Query Delta Lake tables using Postgres SQL and BI tools
  Data science and machine learning,Access Delta tables for model training and feature engineering
  Data lake governance,Utilize Delta’s ACID guarantees with Lakehouse SQL access
  Cross-platform interoperability,"Query Delta Lake data alongside Spark, Trino, and Postgres Lakehouse"

Role-based guidance
-------------------

- :ref:`Database administrator (DBA) <Database administrator (DBA)>` 

- :ref:`Data scientist / analyst <a persona-based guide>` 

- :ref:`DevOps / SRE <a persona-based guide>` 

- :ref:`Application developer <Application developer>` 

Learning paths
--------------

- :ref:`Analytics Accelerator 101: Foundational concepts <Foundational concepts>` 

- :ref:`Analytics Accelerator 201: Practical application and core solutions <Practical application and core solutions>` 

- :ref:`Analytics Accelerator 301: Advanced techniques and optimization <Advanced techniques and optimization>` 

Related concepts
----------------

- :ref:`Data lakehouse <Data lakehouse>` 

- :ref:`Columnar storage formats <Columnar storage formats>` 

- :ref:`Separation of storage and compute <Separation of storage and compute>` 

- :ref:`Open table formats <Open table formats>` 

Next steps
----------

**For Hybrid Manager users**

- `Delta Lake <https://enterprisedb.com/docs/edb-postgres-ai/hybrid-manager/analytics/delta_lake>`_ 

**How-To guides**

- `Query Delta Lake tables <https://enterprisedb.com/docs/edb-postgres-ai/hybrid-manager/analytics/learn/how-to/query-delta-lake-tables.mdx>`_ 

- `Configure PGFS for Delta Lake <https://enterprisedb.com/docs/edb-postgres-ai/hybrid-manager/analytics/learn/how-to/configure-delta-pgfs.mdx>`_ 

- :ref:`Performance tuning for Delta Lake queries <Queries>` 

Explore more in the :ref:`Analytics Accelerator learning guide <learn>`  .
