Bug - Cannot create table The associated location is not empty and also not a Delta table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 11:00 AM
I am getting the error:
Cannot create table ('`hive_metastore`.`MY_SCHEMA`.`MY_TABLE`'). The associated location ('dbfs:/user/hive/warehouse/my_schema.db/my_table') is not empty and also not a Delta table.
When running
Getting
[TABLE_OR_VIEW_NOT_FOUND] The table or view `hive_metastore`.`MY_SCHEMA`.`MY_TABLE` cannot be found. Verify the spelling and correctness of the schema and catalog.
location is not empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 06:49 PM
Hi @gilo12 delete the table data if not important from the above location `dbfs:/user/hive/warehouse/my_schema.db/my_table' and then create the table it will work.
For deletion use:
dbutils.fs.rm('dbfs:/user/hive/warehouse/my_schema.db/my_table',True)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 01:48 AM
Hi @gilo12
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!

