Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
JayJay11
Resolver II
Resolver II

Error when writing dataframe to delta table

Hello all,

 

second time trying to post this, as the first try was marked as spam (???).

 

I try to write a dataframe back to a delta table and get an error. This is the code I use to create the dataframe:

 

 

dfCustomer = spark.read.table("LakehouseOperations.factCustomerBase")
dfScope = spark.read.table("LakehouseOperations.tecDataScopeSnapshots")

dfCustomerJoined = dfCustomer.join(dfScope, dfCustomer.snapshot_date == dfScope.scopeDate, "inner").drop("scopeDate", "scopeDateBuckets")

dfCustomerJoined.write.mode("overwrite").format("delta").option("overwriteSchema", "true").save("Tables/factCustomerBase")

 

 

Then I get the error, see the screenshots here:

 

error message part1.pngerror message part4.pngerror message part2.pngerror message part3.png

 

How can I solve this? Thanks!

1 ACCEPTED SOLUTION

The solution was to change the spark session configuration via the workspace settings:

 

Spark Config.PNG

 

What it actually does / means... I don't know.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @JayJay11 ,

Thanks for using Fabric Community.
As part of testing, can you try to create a new table.

dfCustomerJoined.write.mode("overwrite").format("delta").option("overwriteSchema", "true").save("Tables/factCustomerBaseJoined")

 
Let me know the output of it.

The solution was to change the spark session configuration via the workspace settings:

 

Spark Config.PNG

 

What it actually does / means... I don't know.

I got the same error even after using the mentioned spark properties.

Anonymous
Not applicable

Glad to know that you were able to resolve your issue. Please continue using Fabric Community on your further queries.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.