pravin1406 commented on issue #8365:
URL: https://github.com/apache/hudi/issues/8365#issuecomment-1494821544

   So this is how the equivalent code looks like, only relevant config were 
being set and rest all set to default.
   
   //Write Op related
           dataFrameWriter.mode(SaveMode.Append);
           dataFrameWriter.option("path",path);
   
   //Hudi related
           dataFrameWriter.option(TBL_NAME.key(), "employee_test_mor");
           dataFrameWriter.option(RECORDKEY_FIELD().key(),"empId");
           dataFrameWriter.option(PRECOMBINE_FIELD().key(),"empName");
           dataFrameWriter.option(TABLE_TYPE().key(),  
HoodieTableType.MERGE_ON_READ.toString());
           dataFrameWriter.option(OPERATION().key(), UPSERT_OPERATION_OPT_VAL())
           
dataFrameWriter.option(HoodieIndexConfig.INDEX_TYPE.key(),HoodieIndex.IndexType.GLOBAL_SIMPLE.toString());
           
dataFrameWriter.option("hoodie.simple.index.update.partition.path","true");
   
   //Hive Sync Related
           dataFrameWriter.option("hoodie.datasource.hive_sync.enable","true")
                       .option("hoodie.datasource.hive_sync.mode", "HMS")
                       .option("hoodie.datasource.hive_sync.database", database)
                       .option("hoodie.datasource.hive_sync.table", tableName);
   
           dataFrameWriter.format("hudi")
           dataFrameWriter.save()
   


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