demo.examples for its private namespace. Each script first recreates its own small table from SF1, making that example independent and repeatable. Replace the example names with your catalog, source namespace, and private write namespace. Scripts are not transactions.
IRC object creation requires exact, case-sensitive names. Each script sets spark.sql.caseSensitive to true before creating its lab table.
INSERT INTO
Append rows in target-column order, or supply an explicit target column list when supported. Avoid repeating an append when the earlier commit is uncertain.INSERT OVERWRITE
Whole-table overwrite replaces the current contents. Static partitions, dynamic partitions, and predicate overwrite have additional target capability and partition validation requirements.Iceberg write options
The dedicated TBLPROPERTIES page covers the full property workflow, supported keys, defaults, and validation. Use Table maintenance to change the layout of existing files. Use TBLPROPERTIES to choose the Parquet layout for an Iceberg table. These settings stay on the table and apply to later writes. PARTITIONED BY defines how rows are split into Iceberg partitions. This example copies twelve generated items into a private table. It sets file and Parquet targets, then rewrites the table with a different compression codec.Data files and write records
New writes usedata/<write-id>/part-*.parquet for unpartitioned tables.
Writes that resume from individual batches add a batch directory below the write
ID. Partitioned tables also add a partition directory. The write ID keeps
concurrent attempts separate and stays the same when the saved attempt resumes.
Recovery records such as begin.json and prepared.json are stored under
metadata/_transactions/. They record write progress and prepared output so a
retry can avoid publishing the same write twice. They are not table rows.
New manifest files use <commit-id>-manifest-*.avro and <commit-id>-list.avro
under metadata/.
Existing files remain at their recorded locations. Saved writes from older
versions keep their original paths when retried. Read tables through the catalog
so their snapshots and delete files are applied.
Supported Parquet settings
A Parquet row group contains rows within a file. Pages hold smaller blocks of column data. A dictionary holds repeated values that pages can refer to by code.
The encoder accepts
uncompressed, snappy, zstd, gzip, brotli, lz4, and
lz4_raw. LZO is unsupported. Compression levels must fit the chosen codec. A level
with Snappy, LZ4, or uncompressed output is rejected. Sizes and row limits must be
positive. Unknown write.parquet.* and write.target-* keys fail when a write is
planned. Other custom table properties remain allowed.
Content-defined chunking chooses page boundaries from data values before encoding
and compression. It defaults to disabled.
When enabled, the minimum must be positive and the maximum must be greater than
the minimum. The encoder also checks their range.
Partition transforms
Several transforms can be combined. Time transforms require a compatible date or
timestamp; hour partitioning requires a timestamp. Null partition values remain
null. Per-write options cannot change an existing table’s partition spec.
Options for one DataFrame write
Per-write overrides are available through Spark Connect’s DataFrame API for existing tables. SQL INSERT has no per-write OPTIONS clause. The full property keys above are accepted.compression, compression-level, and
target-file-size-bytes are aliases.