[SUPPORT] Update all records based on key rather than using preCombineKey field
See original GitHub issueIf a batch contains multiple updates for the same key, hudi is updating the dataset only with the latest value based on the field given in the preCombineKey field. Whereas I wanted to update all the records in the batch by considering only the key without worrying about the latest value.
Lets say, I have this current snapshot of table K1, V1, F1, F2, F3, F4, F5 K1 - recordKey(uniqueKey) V1 - preCombineField F1-5 are other column fields
If a batch comes with the following values, K1, V2, F1’, F2’ K1, V3, F3’, K1, V4, F5’
Since am using version as my preCombineKey it always update only the latest modification and my final record looks like K1, V4, null, null, null, null, F5`
Whereas, I want all those updates needs to be applied to my existing snapshot which should look like K1, V4, F1’, F2’, F3’, F4, F5’
Please help what is the correct way to do this.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
@arunb2w : yes, we don’t have a partial update payload patch merged yet. @YannByron : sounds good. thanks!
yes, you can try OverwriteNonDefaultsWithLatestAvroPayload. let us know how it goes.