pengzhiwei2018 commented on issue #2656:
URL: https://github.com/apache/hudi/issues/2656#issuecomment-799511860


   Hi @shivabansal1046 , currently hudi would do the insert operator when you 
have specified a rowkey for insert. You can use `UuidKeyGenKeyGenerator` as the 
row key to walk around this.
   
   First define a `UuidKeyGenKeyGenerator` class.
   > 
   class UuidKeyGenKeyGenerator(props: TypedProperties) extends 
ComplexKeyGenerator(props) {
   
       override def getRecordKey(record: GenericRecord): String = {
         UUID.randomUUID().toString
       }
     }
   
   Then config the `DataSourceWriteOptions#KEYGENERATOR_CLASS_OPT_KEY` to 
`classOf[UuidKeyGenKeyGenerator]`.
   You can have a try , hope it can help you~
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to