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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
zenith
Frequent Visitor

Spark Tables CREATE OR REPLACE not working

When running this code 

 
%%sql
CREATE OR REPLACE TABLE sample (
    integer INT,
    string VARCHAR(50)
)
 
I get the error message "Error: REPLACE TABLE is only supported with v2 tables." Removing REPLACE fixes the code, however is this functionality that will be added into Fabric later, or is there something that needs to be enabled to allow CREATE OR REPLACE statements? 
2 REPLIES 2
HimanshuS-msft
Community Support
Community Support

Hello @zenith , 

Currently the  Spark version on Fabric is Spark 3.3 and Spark 3.3 in this  version of Spark we do have the Replace option please see here .

HimanshuSmsft_0-1695248243279.png

 

I am aware of that databricks does provide that option at this time .  We request you to please log the ask here https://ideas.fabric.microsoft.com/ .

 

Thanks 
Himanshu




 

 

 

 

 

HimanshuS-msft
Community Support
Community Support

Hello @zenith 
Thanks for using the Fabric community.
I have a repro and let me reach out to the internal team to get more help on this .


Error: REPLACE TABLE is only supported with v2 tables. org.apache.spark.sql.errors.QueryCompilationErrors$.operationOnlySupportedWithV2TableError(QueryCompilationErrors.scala:506) org.apache.spark.sql.catalyst.analysis.ResolveSessionCatalog$$anonfun$apply$1.applyOrElse(ResolveSessionCatalog.scala:189)

Thanks
HImanshu

Helpful resources

Announcements
Expanding the Synapse Forums

New forum boards available in Synapse

Ask questions in Data Engineering, Data Science, Data Warehouse and General Discussion.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Update Carousel

Fabric Monthly Update - April 2024

Check out the April 2024 Fabric update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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