Catalog and table integrations
Daft connects a query plan to table data through catalog and table integrations. A catalog finds named data objects, while a table turns one object into a DataFrame and can accept new data when the backing system supports writes. This page gives the broad view of those integrations and their capability limits. See Data access for the wider access model and Data sources and sinks for direct file and system connectors.
Unified catalog model
Daft presents different metadata services and table formats through one catalog shape. This lets Python reads, SQL queries, and sessions use the same name resolution path while each integration keeps the rules of its source system.
Catalog objects
The Catalog interface represents a service that discovers namespaces and tables. A namespace is a grouping such as a database or schema. A Table interface represents one named table and exposes its schema, reads, appends, and overwrites when the source permits them (daft/…/__init__.py• L80-165, daft/…/__init__.py• L869-879).
An Identifier is the dot-separated name used to address a catalog object. Daft accepts short names, namespace-qualified names, and catalog-qualified names. Temporary named tables have no external catalog and take precedence over catalog tables when a name is not qualified (daft/…/__init__.py• L1-37, daft/…/__init__.py• L685-800).
The main integration families have different ownership and write rules:
| Integration family | Metadata owner | Main table forms | Broad access |
|---|---|---|---|
| Iceberg | PyIceberg catalog | Iceberg tables | Read and write |
| Delta Lake | Delta table metadata or Unity/Glue metadata | Delta tables | Read and write through direct and Unity paths; Glue Delta writes are not available in the current adapter |
| Paimon | pypaimon catalog | Append-only and primary-key tables | Read and write |
| Hudi | Hudi table metadata | Hudi Copy-on-Write tables | Read only |
| AWS Glue | Glue Data Catalog | CSV, Parquet, Iceberg, and Delta entries | Format-dependent |
| Unity Catalog | Unity Catalog service | Delta tables and catalog-managed storage | Read and write for Delta tables |
| Gravitino | Gravitino metalake | Iceberg, Hive/Parquet, and PostgreSQL-backed tables | Format-dependent |
| PostgreSQL | PostgreSQL schemas and tables | Database tables | Read and write |
References: daft/…/__init__.py• L80-165 daft/…/__init__.py• L685-800 daft/…/__init__.py• L869-879
Read and write contract
A catalog resolves a name to a table. The table then creates a lazy DataFrame for a read or consumes a DataFrame for an append or overwrite. The catalog-level helpers read_table and write_table keep this sequence the same across supported backends (daft/…/__init__.py• L609-675).
The shared contract does not make every backend equally capable. A format may support reads but not writes. A service may support table lookup but not namespace creation. Unsupported actions raise an error instead of silently changing the external system.
References: daft/…/__init__.py• L1037-1103 daft/…/__init__.py• L1074-1085 daft/…/__init__.py• L609-675
Table format integrations
Table formats keep table state in object storage and metadata files. Daft reads that state into its scan system, applies column and filter pushdown when the format exposes the needed metadata, and writes new table data only through the format's supported commit path.
Apache Iceberg
Apache Iceberg is the broadest catalog-backed table integration. Daft adapts any catalog supported by PyIceberg, so the metadata service can be a REST service, a SQL-backed catalog, or another PyIceberg catalog without changing the Daft table interface (daft/…/__iceberg.py• L38-61, docs/…/iceberg.md• L5-11).
Iceberg reads use a selected table snapshot. Callers can select the current table, a snapshot ID, a branch, or a tag. Daft can use Iceberg partition metadata and file statistics to skip data that cannot match a filter (daft/…/_iceberg.py• L78-126, daft/…/_iceberg.py• L129-203).
Iceberg writes support append and overwrite. Table creation accepts a Daft schema and supported partition transforms such as identity, bucket, truncate, year, month, day, and hour (daft/…/__iceberg.py• L64-140, daft/…/__iceberg.py• L156-179, daft/…/__iceberg.py• L247-291). Catalog-backed overwrites can also target only rows that match an overwrite_filter, expressed as an Iceberg predicate string or a Daft expression. Validation is enabled by default so the write is rejected when partition values or file statistics cannot prove that the new files fit the filter (daft/…/__iceberg.py• L247-297, daft/…/_expressions.py• L125-147, daft/…/iceberg_write.py• L313-353).
References: daft/…/__iceberg.py• L38-61 daft/…/__iceberg.py• L64-140 daft/…/__iceberg.py• L156-179 daft/…/__iceberg.py• L247-297 daft/…/_iceberg.py• L78-126 daft/…/_iceberg.py• L129-203 daft/…/_expressions.py• L125-147 daft/…/iceberg_write.py• L313-353 docs/…/iceberg.md• L5-11 docs/…/iceberg.md• L97-171
Delta Lake
Delta Lake stores table state over Parquet data and a transaction log. Daft can read a table by URI or by a table object returned from Unity Catalog. Reads may target a table version or timestamp, and the scan can use partition values and Delta file statistics to skip files that cannot match a filter (daft/…/delta_lake_scan.py• L148-250, daft/…/delta_lake_scan.py• L273-293, docs/…/delta_lake.md• L3-12).
The statistics check is best effort. It keeps a file when the metadata is missing or cannot safely prove that the file does not match. This preserves correct results while still allowing simple comparisons, ranges, membership checks, and null checks to reduce the scan (daft/…/_visitors.py• L71-75, daft/…/_visitors.py• L107-169, daft/…/_visitors.py• L175-200). Column mapping also lets the scan keep logical column names separate from the physical names used in Delta metadata (daft/…/delta_lake_scan.py• L50-102, daft/…/delta_lake_scan.py• L431-465).
Direct Delta writes support the normal append and overwrite paths. Unity Catalog tables use the same Delta read and write operations after the catalog supplies the table location and storage access (daft/…/_catalog.py• L128-181). Direct reads can also use storage configuration and Delta version checks to select the requested table state (daft/…/delta_lake_scan.py• L148-225).
Delta also supports idempotent append commits when a checkpoint store and stable commit key are supplied. The key is part of the write contract: reuse it for a retry of the same logical job, and use a new key for a new job (docs/…/delta_lake.md• L93-171).
References: daft/…/_visitors.py• L17-18 daft/…/_visitors.py• L71-75 daft/…/_visitors.py• L107-200 daft/…/delta_lake_scan.py• L50-102 daft/…/delta_lake_scan.py• L148-250 daft/…/delta_lake_scan.py• L273-293 daft/…/delta_lake_scan.py• L431-465 daft/…/_catalog.py• L128-181 docs/…/delta_lake.md• L3-12 docs/…/delta_lake.md• L93-171
Apache Paimon
Apache Paimon supports both append-only tables and primary-key tables. Daft receives a pypaimon catalog or table and exposes it through the shared catalog contract, so a Paimon warehouse can be used from direct reads, catalog reads, sessions, and SQL (daft/…/__init__.py• L389-410, docs/…/paimon.md• L117-174).
Paimon reads support partition and column pushdown. Append and overwrite writes are available. Primary keys, partition keys, and table options remain Paimon concepts and are supplied when the table is created or inspected (daft/…/__paimon.py• L69-95, daft/…/__paimon.py• L263-308).
Paimon catalog behavior depends on the catalog supplied by pypaimon. File-system catalogs can browse a warehouse through its storage layout, while REST catalogs can list and drop objects through their service. These differences affect discovery and DDL support rather than the basic table read and write model (daft/…/__paimon.py• L50-56, daft/…/__paimon.py• L101-194).
References: daft/…/__paimon.py• L25-40 daft/…/__paimon.py• L50-56 daft/…/__paimon.py• L69-95 daft/…/__paimon.py• L101-194 daft/…/__paimon.py• L263-308 docs/…/paimon.md• L7-13
Apache Hudi
Apache Hudi is available as a direct table read through daft.read_hudi. Daft reads the table URI and builds a scan that can use the selected table metadata while the rest of the DataFrame stays in the normal Daft execution model (daft/…/_hudi.py• L17-59).
The current Hudi path is narrower than the Iceberg, Delta, and Paimon paths. It supports snapshot reads of Copy-on-Write tables and only Hudi table versions 5 and 6. It does not provide a catalog wrapper or table write path (docs/…/hudi.md• L16-35).
References: daft/…/_hudi.py• L17-59 docs/…/hudi.md• L5-14 docs/…/hudi.md• L16-35
Catalog service integrations
Catalog services own names, locations, credentials, or table metadata. Daft uses those services to resolve a table, then hands the resolved location or native table object to the matching format reader or database reader.
AWS Glue
AWS Glue maps its Data Catalog to a Daft catalog and maps each Glue database to a Daft namespace. A Glue table entry describes the underlying data location and format. Daft chooses a table adapter from that metadata when a table is loaded (docs/…/glue.md• L7-13, daft/…/__glue.py• L186-206).
The current adapters read CSV and Parquet data and read Iceberg and Delta data through their format readers. Iceberg writes are available through the reconstructed Iceberg table. The current Glue Delta adapter is read-only, and Glue table creation is not implemented (docs/…/glue.md• L36-50, daft/…/__glue.py• L441-565).
Glue discovery is shaped by the Glue API. Namespace listing does not accept a filter, and table listing needs a database name or a database-qualified expression. This means a caller should not treat Glue listing patterns as the same as SQL LIKE patterns used by database-backed catalogs (daft/…/__glue.py• L222-267).
References: docs/…/glue.md• L7-13 docs/…/glue.md• L36-50 daft/…/__glue.py• L87-115 daft/…/__glue.py• L186-267 daft/…/__glue.py• L441-565
Unity Catalog
Unity Catalog provides a three-level name: catalog, schema, and table. Daft uses the Unity service for discovery and table lookup, then requests temporary storage credentials for the table before reading or writing its Delta data (daft/…/_client.py• L132-239).
Unity supports token or OAuth client authentication. A table can be an existing table, or the client can register a new managed or external Delta table when the required creation information is present. Volume access is also available through temporary credentials, but that path serves files rather than tables (docs/…/unity_catalog.md• L19-24, daft/…/_client.py• L175-251).
The Unity catalog wrapper is intended mainly for table lookup and Delta access. Namespace creation, namespace checks, table creation, and table deletion are not exposed through that wrapper. Treat the Unity service as the owner of those catalog operations (daft/…/_catalog.py• L41-125).
References: daft/…/_client.py• L68-111 daft/…/_client.py• L132-239 daft/…/_client.py• L241-255 daft/…/_catalog.py• L41-125 docs/…/unity_catalog.md• L19-24
Apache Gravitino
Apache Gravitino is a service that can describe catalogs from several storage and database systems. Daft connects to a Gravitino metalake, resolves catalog, schema, and table names, and selects a table reader from the table's declared provider and format (daft/…/_client.py• L72-83, daft/…/_catalog.py• L82-120, daft/…/_catalog.py• L146-180).
The supported table forms are format-specific. Iceberg tables are read through PyIceberg, Hive Parquet tables are read from their storage location, and PostgreSQL tables use the PostgreSQL catalog path. Only the PostgreSQL form currently forwards append and overwrite operations through Gravitino (daft/…/_catalog.py• L182-280).
Gravitino supplies storage properties with table metadata. Daft can derive storage access for supported S3 and Azure locations, while unsupported credential schemes need external configuration. Gravitino catalog and table DDL is not implemented in the current wrapper (daft/…/_client.py• L397-443, daft/…/_catalog.py• L46-73).
References: daft/…/_client.py• L72-83 daft/…/_catalog.py• L128-307 daft/…/_client.py• L397-443 daft/…/_catalog.py• L46-120 daft/…/_catalog.py• L146-280
Amazon S3 Tables
Amazon S3 Tables exposes Iceberg tables in a table bucket. Daft can connect by bucket ARN, AWS client, or AWS session. The resulting catalog uses S3 Tables for namespace and table discovery and uses Iceberg metadata for reads (daft/…/__init__.py• L315-351, daft/…/__s3tables.py• L82-137, daft/…/__s3tables.py• L235-320).
S3 Tables table creation accepts an Iceberg schema and the service supports namespace and table deletion. Reads require a metadata location. Writes through this direct S3 Tables adapter are not available; use the Iceberg REST path for S3 Tables writes (daft/…/__s3tables.py• L146-177, daft/…/__s3tables.py• L210-229, daft/…/__s3tables.py• L317-362).
References: daft/…/__init__.py• L315-351 daft/…/__s3tables.py• L82-137 daft/…/__s3tables.py• L146-177 daft/…/__s3tables.py• L235-320 daft/…/__s3tables.py• L317-362
Database-backed catalogs
Database-backed access covers both a database used as Iceberg catalog metadata and a relational database used as the table store. The first case remains an Iceberg integration and inherits PyIceberg catalog support. The second case uses PostgreSQL schemas and tables as Daft namespaces and tables (tests/…/test_iceberg.py• L18-37, daft/…/__init__.py• L225-245).
The PostgreSQL catalog supports schema and table discovery, table creation from a Daft schema or DataFrame, append, overwrite, and schema reads. A connection string identifies the database, while a one-part table name follows PostgreSQL's search path and a two-part name identifies schema.table (daft/…/__postgres.py• L176-296, daft/…/__postgres.py• L305-443).
PostgreSQL type support includes scalar values, nested values stored through database-compatible types, and vector embeddings when the pgvector extension is available. Reads can use SQL scan options such as partitioning and pushdown controls. Table creation enables row-level security by default unless the table property disables it (daft/…/__postgres.py• L66-162, daft/…/__postgres.py• L486-594, daft/…/__postgres.py• L601-705).
References: daft/…/__init__.py• L225-245 daft/…/__init__.py• L412-439 daft/…/__postgres.py• L176-296 daft/…/__postgres.py• L305-443 daft/…/__postgres.py• L486-594 daft/…/__postgres.py• L601-705
Custom catalog adapters
Custom adapters extend the same Catalog and Table contracts when a metadata service or table format has no built-in integration. The adapter resolves identifiers and turns each table into a Daft read and write surface. Once attached to a session, it participates in SQL and normal table reads (docs/…/custom-catalogs.md• L3-16).
This extension point is useful for proprietary metadata services and for public systems that are not yet integrated. It does not add format behavior by itself: the table adapter still must provide the read and write behavior that its backend can safely support (docs/…/custom-catalogs.md• L27-58).
References: docs/…/custom-catalogs.md• L3-16 docs/…/custom-catalogs.md• L27-58 daft/…/__init__.py• L80-165 daft/…/__init__.py• L1037-1103
Access paths
The same table can be reached at different levels. Direct format APIs are best when the caller already has a table URI or native table object. Catalog APIs are best when names and namespaces are part of the workflow. Session and SQL access build on catalog registration and name resolution.
Direct format reads and writes
Direct APIs bypass catalog discovery and start with a URI or native table object. Iceberg, Delta Lake, Paimon, and Hudi expose this path through their format-specific read functions. The DataFrame remains lazy and can carry filters into the scan where the format supports those filters (daft/…/_iceberg.py• L129-203, daft/…/delta_lake_scan.py• L283-293, daft/…/_hudi.py• L17-59).
Direct writes use the format-specific DataFrame writer. This is the right path when the caller already controls the table object and does not need catalog listing or table DDL.
References: daft/…/_iceberg.py• L129-203 daft/…/delta_lake_scan.py• L148-250 daft/…/delta_lake_scan.py• L273-293 daft/…/_hudi.py• L17-59 docs/…/paimon.md• L30-50 docs/…/paimon.md• L85-115
Catalog and table APIs
The catalog API separates discovery from data access. A caller can list namespaces or tables, check for an object, load a table, then read or write through that table. This keeps the calling code stable when the catalog changes from Iceberg to Glue, Paimon, PostgreSQL, or another adapter (daft/…/__init__.py• L487-675).
Catalog factories make the supported connection types explicit. They adapt native PyIceberg, Unity, or Paimon objects, or create a service-backed catalog for Glue, Gravitino, S3 Tables, and PostgreSQL (daft/…/__init__.py• L225-439).
References: daft/…/__init__.py• L487-675 daft/…/__init__.py• L225-439 docs/…/catalogs_tables.md• L1-17
Session and SQL resolution
Attaching a catalog to a session makes its tables available to SQL and name-based reads. A fully qualified name selects a catalog and namespace. A shorter name uses the session's current context, and a temporary named table can take priority over an external catalog table (daft/…/__init__.py• L1-37, docs/…/paimon.md• L209-226).
The lookup flow moves from a name to a catalog table and then to the format or database scan. This is the boundary between metadata discovery and data movement.
The diagram shows how a named query reaches an external table and returns a DataFrame.
flowchart LR
Q[Python or SQL table name] --> R[Name resolution]
R --> C[Attached catalog]
C --> T[Resolved table]
T --> S[Format or database scan]
S --> D[Daft DataFrame]
References: daft/…/__init__.py• L1-37 daft/…/__init__.py• L609-675 docs/…/paimon.md• L209-226 tests/…/test_iceberg.py• L440-457
Change checklist
When these files or sections are changed, remember to consider these:
- Update the capability map when a table adapter changes from read-only to writable, or when a service adds or removes DDL support.
- Keep identifier depth rules aligned between the catalog wrapper and the native service. This is important for Unity and Gravitino three-level names, Glue database-qualified names, and PostgreSQL one- or two-part names.
- When a catalog starts vending storage credentials or changes its storage URI fields, check the handoff to the format reader and its
IOConfig. - When a table format changes its snapshot, version, partition, or commit options, update both the direct format API and the catalog-backed table adapter.
- When a catalog starts supporting filtered overwrite, keep the option validation and the underlying format writer's predicate conversion and safety checks aligned.
- When adding a catalog factory, keep its optional dependency error and the catalog/table adapter pair aligned.
- When Delta schema mapping or file-stat handling changes, keep logical column names aligned across Parquet fields, Delta statistics, and filter pushdown.
- When Delta storage or table-version loading changes, keep URI credential discovery, version validation, and scan task construction consistent.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A table name has the wrong number of parts for the selected catalog | The lookup fails before a table is loaded | Use the catalog's native name shape: catalog.schema.table for Unity and Gravitino, database.table for Glue, and schema.table or table for PostgreSQL |
| A Glue table has an unsupported or missing classification | Daft cannot choose a table adapter | Keep Glue format metadata consistent with the data at the storage location |
| A Gravitino table declares a format with no Daft adapter | Table loading fails even though Gravitino can list the table | Confirm the provider and format are Iceberg, Hive/Parquet, or PostgreSQL |
| A direct S3 Tables table has no metadata location | The table cannot be read | Use the Iceberg REST route or ensure the service returns a valid metadata location |
| A Hudi table is not a supported snapshot Copy-on-Write table version | The Hudi scan cannot read it | Use a supported table version and table layout |
| A Delta or Iceberg idempotence key is reused for different input | Daft can treat new work as an already completed commit | Keep keys stable for retries and unique for separate logical jobs |
| An Iceberg overwrite filter does not cover the new data, or file metadata cannot prove that it does | The overwrite is rejected before the table changes | Filter the input to the target rows, or disable validation only when the caller has checked the data separately |
| A Delta table uses deletion vectors that the active Delta reader cannot propagate | The scan fails or requires the caller to ignore deletion vectors | Use a compatible Delta reader, remove the deletion vectors, or set ignore_deletion_vectors=True only when dropping those deleted rows is acceptable |
| A Delta filter uses unsupported types or an unsafe conversion for file statistics | Daft skips stats pruning and scans the candidate files | Keep the filter compatible with the column type, and rely on the full scan when the stats check cannot prove safety |
Key files
| File | Why to read it |
|---|---|
| daft/…/__init__.py | Defines the shared catalog, identifier, and table contract plus catalog factory entry points. |
| daft/…/__iceberg.py | Shows how a native PyIceberg catalog becomes a Daft catalog and table, including catalog-backed overwrite options. |
| daft/…/_client.py | Shows Unity discovery, authentication, table registration, and temporary storage access. |
| daft/…/__glue.py | Shows Glue namespace and table discovery and format-based table selection. |
| daft/…/_catalog.py | Shows how Gravitino metadata maps to Iceberg, Parquet, and PostgreSQL table access. |
| daft/…/__paimon.py | Shows Paimon catalog modes and table access through pypaimon. |
| daft/…/__s3tables.py | Shows the S3 Tables to Iceberg read boundary and write limit. |
| daft/…/__postgres.py | Shows the database-backed catalog and table lifecycle. |
| daft/…/_iceberg.py | Defines direct Iceberg reads, snapshot selection, storage access, and scan creation. |
| daft/…/_expressions.py | Defines the conversion of overwrite filters into Iceberg predicates. |
| daft/…/iceberg_write.py | Defines the safety check for data files written by filtered Iceberg overwrites. |
| daft/…/delta_lake_scan.py | Defines Delta table version selection, storage handoff, column mapping, partition handling, file-stat pruning, and scan task creation. |
| daft/…/_visitors.py | Defines the safe conversion of Daft filters into Delta file-stat checks. |
| daft/…/_hudi.py | Defines the direct Hudi read boundary. |
| docs/…/custom-catalogs.md | Explains the public extension model for catalog and table adapters. |
| docs/…/catalogs_tables.md | Provides the API reference entry point for the shared interfaces. |