overwriting external hive tables

80 Views Asked by At

External tables in hive cannot be deleted. Then how can we overwrite it?

Is overwrting hive tables possible , when we cant drop them?

1

There are 1 best solutions below

0
Koushik Roy On

Of course its possible.
Pls note external tables are actually hdfs tables but not owned or managed by hive. Hive metastore stores only the schema metadata of the external table. Hive does not manage, or restrict access, to the actual external data. So, you can overwrite it but you're not the owner of the table. Even if you drop the table using hive, only metadata gets removed and physical data exists in external storage.

Below pic will give you more idea about how hive handles external tables. pic enter image description here