Member since
09-10-2015
16
Posts
1
Kudos Received
0
Solutions
09-22-2015
10:05 AM
I was just asking it. yes it solved using bc
... View more
09-22-2015
06:17 AM
@Harsh J Using hive -f a file can be passed, but the main purpose of writing the loop in script is to automate the process. I have to apply the same command for 250 tables.
... View more
09-22-2015
01:38 AM
@Harsh J By saying "Generate a list of queries" you mean, creating a list of queries and separate by ;(semicolon) in hive command like hive -e 'query1;query2;...queryN' ?
... View more
09-16-2015
03:18 AM
In my db i have many tables that start with 'bza' in table name. I wrote all those table names into a text file name as tables.txt Now using a shell script (count_row.sh) I am reading each line from tables.txt and execuing the hive commnad: while IFS='' read -r line || [[ -n "$line" ]]; do
echo ""
echo ""
echo ""
echo "Counting the table : $line"
eval "hive -e 'select count(*) from $line'"
done < "$1" This results in total rows from each table, which I am writting it into a text file rows.txt as $ ./count_row.sh tables.txt > row.txt Now my task is I want to count the total number of rows from all the tables by summing the individual result. Is there any way to achieve that ? Or any alternate way to count the rows from mutliple tables.
... View more
Labels:
- Labels:
-
Apache Hive