It's pretty straightforward what I'm trying to do. I just need to count the records in multiple Hive tables.
I want to create a very simple hql script that takes a file.txt with table names as input and count the total number of records in each of them:
SELECT COUNT(*) from <tablename>
Output should be like:
table1 count1
table2 count2
table3 count3
I'm new to Hive and not very well versed in Unix scripting, and I'm unable to figure out how to create a script to perform this.
Can someone please help me in doing this? Thanks in advance.