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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Alerod31
Frequent Visitor

Can´t save a table in a Warehouse with pyspark

Good morning,

I have a problem when saving a table in a warehouse using a notebook and pyspark. In this capacity, only my user works and has access to everything.

 

I try to use this code:

df.write.format("delta").save(url)

 

and the error I get is:

Caused by: Operation failed: "Forbidden", 403, PUT,  , AuthorizationPermissionMismatch, "This request is not authorized to perform this operation using this permission. RequestId: --- Time: ---"

 

However, if I do it from a data flow, it allows me to save correctly.

Please help!!

1 ACCEPTED SOLUTION
suparnababu8
Super User
Super User

Hi @Alerod31 

 

I think you don't have permission to write as table. make sure your accaunt has the right permisssions for the target storage location. If needed, check with your adminiistrator to confirm you have the prooper roles and access. Make sure the URL you are using in the save method is accurate and leads to the correct location. Try with follwing code again.

df.write.format("delta").save("url")

If you need more info pls go thorugh below urls. It might helps you to reolve your problem.

Solved: Re: Save a pyspark dataframe in a table in warehou... - Microsoft Fabric Community

apache spark - How to specify the path where saveAsTable saves files to? - Stack Overflow

pyspark.sql.DataFrameWriter.saveAsTable — PySpark 3.5.5 documentation

 

Thank you!

 

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

View solution in original post

4 REPLIES 4
v-achippa
Community Support
Community Support

Hi @Alerod31,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @suparnababu8 for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue? or let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Alerod31,

 

We wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Alerod31,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the super user resolved your issue.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Thanks and regards,

Anjan Kumar Chippa

suparnababu8
Super User
Super User

Hi @Alerod31 

 

I think you don't have permission to write as table. make sure your accaunt has the right permisssions for the target storage location. If needed, check with your adminiistrator to confirm you have the prooper roles and access. Make sure the URL you are using in the save method is accurate and leads to the correct location. Try with follwing code again.

df.write.format("delta").save("url")

If you need more info pls go thorugh below urls. It might helps you to reolve your problem.

Solved: Re: Save a pyspark dataframe in a table in warehou... - Microsoft Fabric Community

apache spark - How to specify the path where saveAsTable saves files to? - Stack Overflow

pyspark.sql.DataFrameWriter.saveAsTable — PySpark 3.5.5 documentation

 

Thank you!

 

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.