Reputation: 1
I wish to delete the contents of an Azure Blob container by creating an internal Hive table over the contents of the container and the dropping the table as shown below. The container contains a bunch of text files. However, dropping the Hive table doesn't appear to delete the contents of the container.
Am I correct in assuming that dropping an internal table will not remove the contents of the container because HDInsight uses Azure Blob Storage as its storage and not HDFS? Any insight would be greatly appreciated. Thanks.
Cheers Ryan
--Create internal table
CREATE TABLE temp_logs(
student_id INT,
subject_id INT,
marks INT,
insert_date STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LOCATION 'wasb://[email protected]/';
--Drop internal table and its underlying files in Azure Blob
DROP TABLE temp_logs;
Upvotes: 0
Views: 207
Reputation: 679
Drop internal hive table will remove the data. It is the same behavior as other hadoop systems.
When you drop the table, the container will remain. Even after you delete the cluster, the container will stay.
Upvotes: 2