cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create table The associated location ('dbfs:/mnt/[REDACTED]/folder/table_location') is not empty but it's not a Delta table

Ancil
Contributor II

Hi Team,

I have created new databricks workspace for using private network. I want to read/write/update delta table created in old databricks and stored in ADLS as delta.

Any one please help me on this?.....

I tried to create delta table in same location but getting error" Cannotcreate table (tablenmae) . the assosciated location (dbfs mount path) is not empty but its not a Delta Table

1 ACCEPTED SOLUTION

Accepted Solutions

Lakshay
Databricks Employee
Databricks Employee

Hi @Ancil P A​ , First of all, we need to know the status of the data in that location i.e. is it corrupted or is it just in a different format?

In either case, there is no delta log available that is the metadata for the delta table. In absence of a delta log, you cannot create a delta table on top of a non-delta table.

Assuming the data is not corrupted and is in non-delta format, the best solution, in this case, is to create a new delta table and insert the data in this new delta table.

View solution in original post

7 REPLIES 7

Lakshay
Databricks Employee
Databricks Employee

Hi @Ancil P A​ , It looks like the table location you are using is not empty. Could you please ensure that the table location is empty . You can use the "rm -r" command to delete the files recursively for that location.

Ancil
Contributor II

I have created new databricks workspace for using private network. I want to read/write/update delta table created in old databricks and stored in ADLS as delta.

Any one please help me on this?.....

I tried to create delta table in same location but getting error" Cannotcreate table (tablenmae) . the assosciated location (dbfs mount path) is not empty but its not a Delta Table

Ancil
Contributor II

Is there any way to use same delta table adls location in new Databricks workspace . Because I need old data in new Databricks workspace

Lakshay
Databricks Employee
Databricks Employee

Hi @Ancil P A​ , Databricks allows you to create a delta table on a non-empty location if the location has data in delta format. From, the error message it seems that the data is not in delta format.

Ancil
Contributor II

Thank you for update, Is there any way to convert the table to DELTA tables.

And use the same data and ADLS location new databricks workspace

Lakshay
Databricks Employee
Databricks Employee

Hi @Ancil P A​ , First of all, we need to know the status of the data in that location i.e. is it corrupted or is it just in a different format?

In either case, there is no delta log available that is the metadata for the delta table. In absence of a delta log, you cannot create a delta table on top of a non-delta table.

Assuming the data is not corrupted and is in non-delta format, the best solution, in this case, is to create a new delta table and insert the data in this new delta table.

Anonymous
Not applicable

Hi @Ancil P A​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group