Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Databricks - is not empty but it's not a Delta table

I run a query on Databricks:

DROP TABLE IF EXISTS dublicates_hotels;
CREATE TABLE IF NOT EXISTS dublicates_hotels
...

I'm trying to understand why I receive the following error:

Error in SQL statement: AnalysisException: Cannot create table ('default.dublicates_hotels'). The associated location ('dbfs:/user/hive/warehouse/dublicates_hotels') is not empty but it's not a Delta table

I already found a way how to solve it (by removing it manually):

dbutils.fs.rm('.../dublicates_hotels',recurse=True)

But I can't understand why it's still keeping the table? Even though that I created a new cluster (terminated the previous one) and I'm running this query with a new cluster attached.

Anyone can help me to understand that?

like image 585
QbS Avatar asked Dec 07 '25 06:12

QbS


1 Answers

I also faced a similar problem, then tried the command line CREATE OR REPLACE TABLE and it solved my problem.

like image 98
pej Avatar answered Dec 08 '25 21:12

pej



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!