Monday, 27 July 2015

Deleting all the tables in a hive

You can run the below command to delete all the tables from a given database.  hive -e 'use sample_db;show tables' | xargs -I '{}' hive -e 'use sample_db;drop table {}'  Where sample_Db is the database  (Use single quotes not back tick)

No comments:

Post a Comment