Hi, (Please subscribe to the mailing list, so the message actually comes over directly to the list.)
On 1, the default payload overwrites the record on storage with new coming record, if the precombine field has a higher value. for e.g, if you use timestamp field, then it will overwrite with latest record while it will not overwrite if you accidentally write a much older record. On 2, I think you can achieve this by setting the precombine key properly.. IIUC, you don't want the older record to overwrite the newer record? On 3, you can configure the PRECOMBINE key as documented here http://hudi.apache.org/configurations.html#PRECOMBINE_FIELD_OPT_KEY ? Hope that helps. Please let me know if I missed something. Thanks Vinoth On Thu, May 16, 2019 at 7:07 AM FIXED-TERM Cheng Yuanbin (CR/PJ-AI-S1) < [email protected]> wrote: > Hi Hudi, > > We want to use Apache Hudi for immigrating our data pipeline from batching > to incremental. > We face several questions about the Hudi. We so appreciate you can help us > figure them out. > > > 1. In the default Payload (OverwriteWithLatestAvroPayload), this > payload only concern and merge the records with the same key value in the > Delta dataframe (new coming records), right? > > 2. In our usage case, we want to keep the latest record in our > system. However. In the default Payload, if the Delta dataframe contains > the older record than the record in the record already written in Hudi, it > will simply overwrite them, which is not what we want. Do you have some > suggestions about how to get the global latest record in Hudi? > > 3. We have implemented a custom Payload class in order to get the > global latest record. However, we found that in the Payload class, we have > to hard-code the PRECOMBINE_FIELD_OPT_KEY value in Payload to get the value > in currentValue in order to compare them. Can I ask is any method I can get > PRECOMBINE_FIELD_OPT_KEY in Payload, or is there any suggested method for > dealing with this issue. > > Thanks so much! > > Mit freundlichen Grüßen / Best regards > > Yuanbin Cheng > > >
