How to write to Salesforce object using Spark Salesforce Library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2022 05:21 AM
Hi I'm facing an issue when writing to a salesforce object. I'm using the springml/spark-salesforce library. I have the above libraries installed as recommended based on my research.
I try to write like this:
(_sqldf
.write
.format("com.springml.spark.salesforce")
.option("username", sf_username)
.option("password", sf_password_token)
.option("sfObject", sf_object)
.option("upsert", True)
.save())
But I am receiving this error:
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 15.0 failed 4 times, most recent failure: Lost task 0.3 in stage 15.0 (TID 15) (10.139.64.32 executor 0): java.lang.IllegalArgumentException: Can not instantiate Stax reader for XML source type class org.codehaus.stax2.io.Stax2ByteArraySource (unrecognized type)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:12 AM
this could not be the whole error can you please share the driver/error logs thread dump, I will try to help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 04:07 AM
Im facing the same issue while trying to write to Salesforce, if you have found a resolution could you please share it ?

