@libjack:
Hi,
I wanted to pass parameters into the hql from ksh script. I went through Apache hive using variables document. The below worked fine where I set the values inside hql:
SET hivevar:parm1=valu1;
CREATE SCHEMA IF NOT EXISTS ${parm1};
But I wanted to pass the parameters while invoking hive inside ksh. I have the variables and its value in a file as below:
--hiveconf:
SET hivevar:parm1=valu1;
--Inside .ksh:
hive --hivevar "'cat ${hiveconf}`" -f hiveScript.hql
--hiveScript.hql:
CREATE SCHEMA IF NOT EXISTS ${parm1};
This fails. I tried with hiveconf as well. How to pass the variable to hql? Is it possible to pass as a file?
Thanks.