chovy-3012 commented on PR #48:
URL: 
https://github.com/apache/doris-spark-connector/pull/48#issuecomment-1232766404

   According to the code, I found that `dataframe` must convert to `json` for 
it to work.
   Here is the code:
   ```scala
       df.selectExpr("CAST(timestamp AS STRING)", "CAST(partition as STRING) as 
f2")
         // must convert to json
         .toJSON
         .writeStream
         .format("doris")
         .option("checkpointLocation", "/tmp/test")
         .option("doris.table.identifier", dorisTable)
         .option("doris.fenodes", dorisFeNodes)
         .option("user", dorisUser)
         .option("password", dorisPwd)
         .option("doris.write.fields","f1,f2")
         .option("sink.batch.size",2)
         .option("sink.max-retries",2)
         .start().awaitTermination()
       spark.stop()
   ```
   
   But `dataframe` should write to `doris` as expected.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to