rjmblc commented on issue #6341:
URL: https://github.com/apache/hudi/issues/6341#issuecomment-1253688729
@nsivabalan I tried with setting operation type to "delete" ,and not setting
any value for payload class but still getting an empty commit and delete is not
happening. Below are the script, hoodie properties and delta commit files. I
cross check and updateDF is not empty. Here I am trying to delete the entire
table records.
Delete record script:
`updateDF =
spark.read.format('org.apache.hudi').load('s3://offline-store-qa/customer_event_3/')
updateDF.show()
hudiOptions = {
'hoodie.table.name': 'customer_event_3',
'hoodie.datasource.write.keygenerator.class':
'org.apache.hudi.keygen.ComplexAvroKeyGenerator',
'hoodie.datasource.write.recordkey.field':
'client_id,event_date,customer_event_id',
'hoodie.datasource.write.partitionpath.field': 'client_id',
'hoodie.datasource.hive_sync.enable': 'true',
'hoodie.datasource.hive_sync.table': 'customer_event_3',
'hoodie.datasource.hive_sync.partition_fields': 'client_id',
'hoodie.datasource.hive_sync.partition_extractor_class':
'org.apache.hudi.hive.MultiPartKeysValueExtractor'
}
updateDF.write \
.format('org.apache.hudi') \
.option('hoodie.datasource.write.operation', 'delete') \
.options(**hudiOptions) \
.mode('append') \
.save('s3://offline-store-qa/customer_event_3/')`
Deltacommit & hoodie properties file:
[Downloads.zip](https://github.com/apache/hudi/files/9616833/Downloads.zip)
--
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]