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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
HarderT
Helper II
Helper II

Spark SQL to Delta Table

Hey Guys,

 

I have a short question.

 

Is it possible to save a table in delta format in MS Fabric with notebooks in Spark SQL?

 

Thanks for help!

 

Best Regards

Tim

1 ACCEPTED SOLUTION

Hello @Anonymous,

 

thanks for the links you sent me. This is what I was looking for.

 

%%sql

CREATE TABLE salestable
(
Orderid INT NOT NULL,
OrderDate TIMESTAMP NOT NULL,
CustomerName STRING,
SalesTotal FLOAT NOT NULL
)
USING DELTA

 

 

I put this here so others with the same problem can find it here directly.

 

Many thanks and Best Regards

Tim

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @HarderT ,

As far as I concerned,  it is possible to save a table in delta format in MS Fabric with notebooks in Spark SQL. You can use the method of the Spark DataFrame API to specify the format as “delta” and the destination as the Tables section of the lakehouse. For example, if you have a DataFrame called that you want to save as a delta table named , you can use the following code:writedfmy_table

df.write.mode("overwrite").format("delta").partitionBy("Year","Quarter").save("Tables/" + table_name)

This will create a delta table in the lakehouse that you can query with SQL or Spark.

Lakehouse tutorial - Prepare and transform data in the lakehouse - Microsoft Fabric | Microsoft Lear...

Work with Delta Lake tables in Microsoft Fabric - Training | Microsoft Learn

OneCopy quickstart, transform data with Spark and query with SQL - Microsoft Fabric | Microsoft Lear...

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Hello @Anonymous,

 

thanks for the links you sent me. This is what I was looking for.

 

%%sql

CREATE TABLE salestable
(
Orderid INT NOT NULL,
OrderDate TIMESTAMP NOT NULL,
CustomerName STRING,
SalesTotal FLOAT NOT NULL
)
USING DELTA

 

 

I put this here so others with the same problem can find it here directly.

 

Many thanks and Best Regards

Tim

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.