Script to delete all tables in Hive
hive -e ‘show tables’ | xargs -I ‘{}’ hive -e ‘drop table {}’
Tags: hive
This entry was posted
on Wednesday, April 18th, 2012 at 10:24 am and is filed under General.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
April 3rd, 2013 at 9:21 am
I might suggest you specify the database being used, if needed:
hive -e ‘use XXX;show tables’ | xargs -I ‘{}’ hive -e ‘use XXX;drop table {}’
/rob
March 24th, 2016 at 6:56 am
Thanks, exactly what I was looking for.
Christophe