When you drop a managed table in Hadoop, what happens to the underlying data files?
Think about who controls the data lifecycle in managed tables.
Managed tables control both metadata and data. Dropping them deletes both.
Where is the data stored for an external table in Hadoop?
External tables allow you to keep data where you want.
External tables point to data stored outside the default warehouse directory.
Given an external table pointing to data at /user/data/sales, what happens to the data files if you run DROP TABLE external_sales;?
CREATE EXTERNAL TABLE external_sales(id INT, amount FLOAT) LOCATION '/user/data/sales';
-- Then run:
DROP TABLE external_sales;Dropping external tables affects metadata only.
Dropping an external table deletes only metadata; data files remain intact.
A user created a managed table and loaded data into it. After dropping the table, the data files are missing. What is the most likely cause?
Recall the difference in data handling between managed and external tables.
Managed tables control data lifecycle; dropping them deletes data files.
You want to create a table in Hadoop that allows multiple teams to access shared data without risk of accidental deletion of the data files. Which table type should you choose?
Think about which table type protects data files from deletion when dropped.
External tables keep data files outside Hadoop's control, preventing accidental deletion.