Cannot Drop the unmannaged Delta lake table through pyspark code

162 views Asked by At

I am trying to drop a unmanaged table but it only drops its metadata. I am using the following Code in Databricks

spark.sql("DROP TABLE IF EXISTS default.StoresSales")
dbutils.fs.rm("dbfs:/mnt/ext_source/sparkDeltaTables/default.StoresSales",True)

Tried True and False both options but nothing works with the files at located on the Storage. I need to manually delete the files.

The command gives the following Output: java.io.IOException: com.microsoft.azure.storage.StorageException: This operation is not permitted on a non-empty directory.

0

There are 0 answers