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

AviralBhardwaj

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 ?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group