easonwood commented on issue #8540: URL: https://github.com/apache/hudi/issues/8540#issuecomment-1522632098
@voonhous Actually we created a dataframe only containing the primaryKey for this table. And do DELETE operation by writing it to hudi. Code is like this : logger.error(s"Schema for dataToDelete: ${dataToDelete.printSchema()}") dataToDelete .write .format("org.apache.hudi") .options(hudiOptions) .option(OPERATION_OPT_KEY, DELETE_OPERATION_OPT_VAL) .option(PRECOMBINE_FIELD_OPT_KEY, precombineKey) .option(RECORDKEY_FIELD_OPT_KEY, recordKey) .option(HIVE_PARTITION_EXTRACTOR_CLASS_OPT_KEY, classOf[MultiPartKeysValueExtractor].getName) .option("hoodie.datasource.write.partitionpath.field", partitionPath) .option(HoodieWriteConfig.TABLE_NAME, tableName) .mode(SaveMode.Append) .save(basePath) the dataToDelete.printSchema : ![E826B557-E2DF-4FFC-A469-55F2567C6E63](https://user-images.githubusercontent.com/5763104/234442279-bafe74f3-3c36-4083-a571-3a4fc57fe566.jpg) -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org