I would like to write an Iceberg table with a different partition spec than the default table settings so that when I run data compaction the data would be compacted according to the default spec (as possible with the write-format config)
For example:
df.writeStream
.format("iceberg")
.outputMode("append")
.options(Map("path" ->tableIdentifier,
"checkpointLocation" -> checkpointLocation,
"fanout-enabled" -> "true",
"spec-id" ->"3"))
Theoretically, it should be fine as Iceberg knows how to handle multiple partitions specs as mentioned here Partition Evolution. Practically, I haven't found a way to do it.
Is there any way to achieve this?