harishchanderramesh opened a new issue #1741: URL: https://github.com/apache/hudi/issues/1741
**_Tips before filing an issue_** - Have you gone through our [FAQs](https://cwiki.apache.org/confluence/display/HUDI/FAQ)? - Join the mailing list to engage in conversations and get faster support at [email protected]. - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly. **Describe the problem you faced** I am using spark structured streaming to upsert on MoR hudi table on S3 from Kafka. During upsert, i dont want to update a column if the source value is null. How do I do this? In delta io, i used to do something like this. ``` DeltaTable.forPath(spark, S3_DIR).alias("t").merge(df8.alias("s"), "s.id = t.id").whenMatchedUpdate( set = { "column1": coalesce("s.column1_new","t.column1") ,"column2": coalesce("s.column2_new","t.column2") ,"column3": coalesce("s.column3_new","t.column3") ,"column4": coalesce("s.column4_new","t.column4") }) .whenNotMatchedInsert(values = { "id": "s.id" ,"column1": "s.column1_new" ,"column2": "s.column2_new" ,"column3": "s.column3_new" ,"column4": "s.column4_new" } ).execute() ``` **To Reproduce** Steps to reproduce the behavior: 1. Create a hudi table 2. Insert values for all the columns with 2 rows. 3. Upsert the hudi table with a dataframe that has value for 1 column and null value for other columns 4. the upsert should ignore the null from source and retain the not null value as is in hudi table **Expected behavior** I want to ignore nulls from source while doing upsert. I want the target field to be not affected if the source is null. And I want to do this using Spark Streaming. **Environment Description** * Hudi version : 0.5.2 * Spark version : 2.4.5 * Hive version : 2.3.6 * Hadoop version : Amazon 2.8.5 * Storage (HDFS/S3/GCS..) : S3 * Running on Docker? (yes/no) : no **Additional context** I am trying to move from Delta to Hudi. In delta i was able to do this easily, whereas in hudi i dont find a doc online to accomplish this. **Stacktrace** ```Add the stacktrace of the error.``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
