Spark Lake Table Output
DescriptionSpark Lake Table Output writes the incoming Spark Unlike Spark File Output (classic file formats), the default save mode is ErrorIfExists so ACID tables are not overwritten by accident. This transform is native Spark only. Connectors ship with the native Spark plugin; see Lakehouse tables on the native Spark engine. |
Options
| Option | Description |
|---|---|
Transform name | Unique name of the transform in the pipeline. |
Format |
|
Identifier mode |
|
Table path | PATH mode: table root directory / URI. |
Table identifier | TABLE mode: e.g. |
Spark Catalog metadata name | Optional Spark Catalog Hop metadata for TABLE mode. |
Save mode |
|
Partition by | Optional comma-separated partition column list. |
Coalesce | Optional partition count before write (e.g. |
Extra options | Optional Spark write options as |
Behaviour
-
The write runs as a Spark action when the engine materialises the graph.
-
An empty leaf Dataset is registered so a later engine-wide
count()does not re-write the table. -
Delta PATH:
format("delta").mode(…).save(path)(requires Delta extension +DeltaCatalogon the session — hop-run applies these when Delta transforms are present). -
Iceberg PATH:
writeTo(hop_iceberg.\`uri\).using("iceberg")` with the built-inhop_icebergHadoop catalog. -
Iceberg TABLE:
writeTo(catalog.ns.table).using("iceberg"). -
Delta TABLE (advanced):
format("delta").saveAsTable(id).
Metadata injection
Supports metadata injection.
Keys: FORMAT, IDENTIFIER_MODE, TABLE_PATH, TABLE_IDENTIFIER, CATALOG_METADATA_NAME, SAVE_MODE, PARTITION_BY, COALESCE, EXTRA_OPTIONS.
Use this with a template write path when landing many tables (different paths/identifiers/save modes) from one injecting pipeline.
Notes
-
Requires exactly one main-stream upstream hop (the data to write).
-
For upserts, use Spark Lake Table Merge instead of Overwrite.
-
Packaging, session conf, and troubleshooting: lakehouse guide.