I have a shell script code that automates the beeline commands. The code is able to connect to the JDBC, but it sits there, it doesn't seem to execute the further codes in the shell script, ie. it doesn't truncate the table, doesn't load the data, doesn't insert. Below is the whole code::
beeline -u $BEELINE_PREFIX -e use next;
echo "truncating the staging table tbl1..."
beeline -u $BEELINE_PREFIX -e "TRUNCATE TABLE next.tbl1;"
echo "Loading the data in stating table tbl1"
beeline -u $BEELINE_PREFIX -e "LOAD DATA LOCAL INPATH 'path_to/tbl1.txt' INTO TABLE next.tbl1;"
echo "Appending the data into history table tbl1.."
beeline -u $BEELINE_PREFIX -e "insert into table next.hist_tbl1 select *,'$unix_time' from next.tbl1;"
When I execute ./tbl1.sh
I could see below output:
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.5.0-292 by ApacheHive
The code seem to only execute the veru first "beeline -u", i.e, JDBC connection only. I have noted that, When I use ctrl +c, then it goes forward, and throw below error
Error:Errorwhile processing statement: FAILED:ExecutionError,return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask.File file:/usr/ibmpacks/current/bigsql/hive/lib/hive-hbase-handler.jar does not exist (state=08S01,code=1)
Any idea, what is the mistake?