ad1happy2go commented on issue #9967: URL: https://github.com/apache/hudi/issues/9967#issuecomment-1812409230
You are right, We are seeing data loss when we tried that. Although I guess it's not related to the issue you were originally facing. Is that right? Created JIRA to track - https://issues.apache.org/jira/browse/HUDI-7100 Reproducible code - ``` schema = StructType( [ StructField("id", IntegerType(), True), StructField("name", StringType(), True) ] ) data = [ Row(1, "a"), Row(2, "a"), Row(3, "c"), ] hudi_configs = { "hoodie.table.name": TABLE_NAME, "hoodie.datasource.write.recordkey.field": "name", "hoodie.datasource.write.precombine.field": "id", "hoodie.datasource.write.operation":"insert_overwrite_table", "hoodie.table.keygenerator.class": "org.apache.hudi.keygen.NonpartitionedKeyGenerator", } df = spark.createDataFrame(spark.sparkContext.parallelize(data), schema) df.write.format("org.apache.hudi").options(**hudi_configs).mode("append").save(PATH) spark.read.format("hudi").load(PATH).show() ``` -- 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]
