ad1happy2go commented on issue #10233:
URL: https://github.com/apache/hudi/issues/10233#issuecomment-1849561433

   @Sarfaraz-214 You are right. With autogenerated keys there should not be any 
requirement for precombine or ordering field.
   This actually even applies to datasource writer and not limited to 
deltastreamer.
   
   ```
   from pyspark.sql.types import StringType
   from pyspark.sql import functions as F
   from pyspark.sql import types as T
   
   import uuid
   from pyspark.sql import Row
   import random
   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
   }
   
   df = spark.createDataFrame(spark.sparkContext.parallelize(data), schema)
   
   
df.write.format("org.apache.hudi").options(**hudi_configs).mode("append").save(PATH)
   ```
   


-- 
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

Reply via email to