Principle:Eventual Inc Daft Table Writing
| Knowledge Sources | |
|---|---|
| Domains | Data_Engineering, Catalog_Management |
| Last Updated | 2026-02-08 00:00 GMT |
Overview
Technique for writing DataFrame contents to a named catalog table through a session.
Description
Table writing persists DataFrame data to a catalog-managed table using the session's write infrastructure. The target table must exist in an attached catalog and be resolvable through the session's name resolution. The write operation supports append and overwrite modes, with additional format-specific options passed through to the underlying table implementation.
Usage
Use table writing when you need to write data to a catalog table by name rather than by direct file path. This is the standard approach for ETL pipelines that produce output to managed tables in data lakehouse architectures.
Theoretical Basis
Catalog-mediated write operation delegating to the underlying table format's write protocol:
write_table(identifier, df, mode="append", **options):
1. Resolve identifier to Identifier object
2. Look up table via session.get_table(identifier)
3. Delegate to table.write(df, mode=mode, **options)
# mode="append" -> add data to existing table
# mode="overwrite" -> replace all existing data
The actual write behavior (file format, partitioning, compaction) is determined by the catalog and table format implementation (e.g., Iceberg, Delta Lake).