FeiZou commented on issue #3418:
URL: https://github.com/apache/hudi/issues/3418#issuecomment-913923452
Hey @nsivabalan, actually as I checked, the duplicates has nothing to do
with `upsert`, it happened during the `bulk_insert`.
A proof is that 2 duplicates rows with same key but different `data_updated`
existing in same partition. They have same `hoodie_commit_time` 20210817130414,
same `hoodie_record_key` RE2dd866834bea72ac37612d3f57afe58c. Shouldn't these 2
duplicated rows been combined before writing into the data lake?
Adding the config for `bulk_insert` for your reference:
```
val hudiOptions = Map[String,String](
HoodieWriteConfig.TABLE_NAME -> "recordings_hudi",
HoodieWriteConfig.COMBINE_BEFORE_INSERT_PROP -> "true",
HoodieIndexConfig.INDEX_TYPE_PROP -> "GLOBAL_BLOOM",
DataSourceWriteOptions.HIVE_STYLE_PARTITIONING_OPT_KEY ->
"true",
DataSourceWriteOptions.ENABLE_ROW_WRITER_OPT_KEY -> "true",
DataSourceWriteOptions.OPERATION_OPT_KEY ->
DataSourceWriteOptions.BULK_INSERT_OPERATION_OPT_VAL,
DataSourceWriteOptions.PARTITIONPATH_FIELD_OPT_KEY ->
"data_load_date",
DataSourceWriteOptions.KEYGENERATOR_CLASS_OPT_KEY ->
"org.apache.hudi.keygen.SimpleKeyGenerator",
DataSourceWriteOptions.TABLE_TYPE_OPT_KEY -> "COPY_ON_WRITE",
DataSourceWriteOptions.RECORDKEY_FIELD_OPT_KEY -> "sid",
DataSourceWriteOptions.PRECOMBINE_FIELD_OPT_KEY ->
"date_updated")
```
--
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]