Support write options for iceberg merge query
- Dominant language
- Java
- Stars
- 9.2k
- Forks
- 3.5k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 132
Description
### Feature Request / Improvement
As per iceberg documentation, validate-from-snapshot-id is a way to provide base snapshot for iceberg write operations against which iceberg will use to validate conflicting writes. However, both the merge query and newly added merge API lack this. The support only seems to be there for overwrite operations.
usecase:
In case of multi step operations, where data is read once in the beginning, transformed and written at the end using merge query, the abovementioned property can be used to achieve OCC. The current OCC lifespan starts from the beginning of merge query.
past discussions :
https://github.com/apache/iceberg/pull/7607 mentions passing options in merge query but nothing conclusive.
### Query engine
Spark
### Willingness to contribute
- [ ] I can contribute this improvement/feature independently
- [ ] I would be willing to contribute this improvement/feature with guidance from the Iceberg community
- [ ] I cannot contribute this improvement/feature at this time
Contributor guide
Research direction
Start by tracing Spark merge query and the newly added merge API handling for write options, then compare the overwrite operations where validate-from-snapshot-id is supported. Done means the option can be supplied for both merge paths and used as the base snapshot for conflicting-write validation, with Spark coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spark
- Domain
- data-engineering, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100