cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write to Salesforce object using Spark Salesforce Library

theSoyf
New Contributor II

Screen Shot 2022-12-14 at 8.18.07 AMHi 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)

2 REPLIES 2

Aviral-Bhardwaj
Esteemed Contributor III

this could not be the whole error can you please share the driver/error logs thread dump, I will try to help you

Gauthy
New Contributor II

Im facing the same issue while trying to write to Salesforce, if you have found a resolution could you please share it ?

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!