That's not what I've found:
$ hive -e "show tables"
table1
table2
$ echo $?
0
$ hive -e "show partitions notable"
FAILED: SemanticException [Error 10001]: Table not found notable
$ echo $?
17
In a bash script:
hive -e "show partitions notable"
hiveresult=`echo $?`
if [ $hiveresult -ne 0 ]; t
Hi,
I have a bash script that runs a hive query and I would like it to do
something if the query succeeds and something else if it fails.
My testings show that a query failure does not change Hive's exit code,
what's the right way to achieve this ?
Thanks,
Daniel