njalan commented on issue #9967:
URL: https://github.com/apache/hudi/issues/9967#issuecomment-1811874964

   @ad1happy2go  If I have one df with below 3 three records:
   +---+----+
   | id|name|
   +---+----+
   |  1|   a|
   |  2|   a|
   |  3|   c|
   +---+----+
   Then I run below command and there are 3 records in hudi table:
      df.write.format("hudi").
     options(getQuickstartWriteConfigs).
     option(OPERATION.key(),"insert_overwrite_table").
     option(PRECOMBINE_FIELD.key(), "id").
     option(RECORDKEY_FIELD.key(), "name").
     option(TBL_NAME.key(), tableName).
     option(KEYGENERATOR_CLASS_OPT_KEY, 
"org.apache.hudi.keygen.NonpartitionedKeyGenerator").
     mode(Append).
     save(basePath)
   
   Then I add option("hoodie.datasource.write.insert.drop.duplicates",true) to 
run again then there is no records in table :
      df.write.format("hudi").
     options(getQuickstartWriteConfigs).
     option(OPERATION.key(),"insert_overwrite_table").
     option(PRECOMBINE_FIELD.key(), "id").
     option(RECORDKEY_FIELD.key(), "name").
     option(TBL_NAME.key(), tableName).
     option(KEYGENERATOR_CLASS_OPT_KEY, 
"org.apache.hudi.keygen.NonpartitionedKeyGenerator").
     option("hoodie.datasource.write.insert.drop.duplicates",true).
     mode(Append).
     save(basePath)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to