1

I am looking for a way to delete a Managed table without deleting the underlying data in Databricks.

I accidentally created a Managed table on top of the data stored in my mounted storage account when I was actually looking to create an External (Unmanaged) table.

Is there a way to do this? Maybe 'delete' is actually not the correct term here and what I am looking for is a way to de-register the table from the hive metastore?

Minura Punchihewa
  • 1,498
  • 1
  • 12
  • 35
  • 1
    Maybe you could try to convert it from managed to external? ->[link](https://stackoverflow.com/questions/11839989/can-i-change-a-table-from-internal-to-external-in-hive) – Kombajn zbożowy Dec 15 '22 at 12:33
  • @Kombajnzbożowy Amazing answer...never knew we could convert...One more question...sorry to hijack this thread...just trying to learn and understand, 1. when a managed table is created, I was assuming that the data would be copied over to the default path (something /user/hive/warehouse) Is this assumption correct ? 2. When we mention the word LOCATION while creating the table to point to a mounted storage will it not automatically be considered as an external table ? 3. Is it possible to create a managed table pointing to a different path without changing environmental variables ? – rainingdistros Dec 16 '22 at 12:01
  • 1. No, there's no data copy when any kind of table is created; 2. Yes, LOCATION in CREATE TABLE statement makes table external; 3. No – Kombajn zbożowy Dec 16 '22 at 12:37

0 Answers0