Forum Discussion
Getting error while creating external table by using Delta Table in Apache Spark
- 11 months ago
Hi aAmirkHan
I replicated your scenario. You need to cjange your code like below example. it's working for me
df.write \ .format("delta") \ .option("path","abfss://[email protected]/rawdata_LS.Lakehouse/Files/Python_Assignment_1/Ele_Store1") \ .saveAsTable("elec_store")If i run this it was written to table section as delat table.
In yout case you can use this code below..with your abfss path
df.write \ .format("delta") \ .option("path", "abfss://4d1f6b14-075a-47b0-ab85-205195008be7@onelake.dfs.fabric.microsoft.com/8826417a-348f-488d-867a-554768d2ee1b/Files/external_products") \ .saveAsTable("external_products")it will works. Hope this helps you..
Thank you
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
Hi aAmirkHan
I replicated your scenario. You need to cjange your code like below example. it's working for me
df.write \
.format("delta") \
.option("path","abfss://[email protected]/rawdata_LS.Lakehouse/Files/Python_Assignment_1/Ele_Store1") \
.saveAsTable("elec_store")
If i run this it was written to table section as delat table.
In yout case you can use this code below..with your abfss path
df.write \
.format("delta") \
.option("path", "abfss://4d1f6b14-075a-47b0-ab85-205195008be7@onelake.dfs.fabric.microsoft.com/8826417a-348f-488d-867a-554768d2ee1b/Files/external_products") \
.saveAsTable("external_products")
it will works. Hope this helps you..
Thank you
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
i use your code and it can create external table.
but when i use "DESCRIBE FORMATTED external_products;", type is "MANAGED" (not "EXTERNAL"), location is "abfss://.../Tables/dbo/external_products" (not "abfss://.../Files/external_products").
Is it new feature or issues?