lyogev commented on issue #498: Is there any record delete examples? 
URL: https://github.com/apache/incubator-hudi/issues/498#issuecomment-479134812
 
 
   Sorry figured it out.
   Created a class:
   ```
   class EmptyHoodieRecordPayload extends 
HoodieRecordPayload[EmptyHoodieRecordPayload] {
     def this(record: GenericRecord, orderingVal: Comparable[_]) {
       this()
     }
   
     override def preCombine(t: EmptyHoodieRecordPayload): 
EmptyHoodieRecordPayload = t
     override def combineAndGetUpdateValue(indexedRecord: IndexedRecord, 
schema: Schema): Optional[IndexedRecord] = Optional.empty()
     override def getInsertValue(schema: Schema): Optional[IndexedRecord] = 
Optional.empty()
   }
   ```
   
   And then set dataframe writer to:
   ```
       writer.option("hoodie.datasource.write.payload.class", 
"....EmptyHoodieRecordPayload")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to