The Managed and External tables are created with the same location.
When you drop the internal table what will happen to the data file? Will it cause any problem to external table or the file location of the external table?
The Managed and External tables are created with the same location.
When you drop the internal table what will happen to the data file? Will it cause any problem to external table or the file location of the external table?
The table is a metadata containing columns specification, location path, table type, SerDe, statistics, grants, etc. Dropping location folder or files will not drop the table, only data is dropped. Table and data in Hive are loosely connected, this is very convenient because you can manage data using not only Hive and you can create Hive table on top of existing data produced by some other tools, Hive is only one of many tools you can have in Hadoop and not necessarily Hadoop only.
One table knows nothing about another table built on top of the same location. Of course when you drop Managed table created with the same location as another External or also Managed table, the location will be dropped. Select from another table will return no rows. If you want to drop table and leave it's location as is, set EXTERNAL=TRUE
before dropping it:
ALTER TABLE abc SET TBLPROPERTIES('EXTERNAL'='TRUE');
See also this answer on the similar topic with interesting tests: https://stackoverflow.com/a/54038932/2700344