cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Esteemed Contributor
Esteemed Contributor

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
Esteemed Contributor
Esteemed Contributor

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
Esteemed Contributor
Esteemed Contributor

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
Esteemed Contributor
Esteemed Contributor

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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.