1

I have the next hive script:

SET LAB_MS_EXT_SCHEME='INTERAL';
set LAB_MS_EXT_SCHEME;
set ${hiveconf:name};

So I try to call this script from bash:

hive -hiveconf name=HELLLO -f myScript.hql

As a result I have the next output:

LAB_MS_EXT_SCHEME='INTERAL'
${hiveconf:name} is undefined

I will be very thankfull if somebody help me to pass parameters to hive script.

Speise
  • 789
  • 1
  • 12
  • 28

1 Answers1

-1

You need to use the hiveconf for variable substitution.Please check these link for the answer.

How to set variables in HIVE scripts

Passing parameters in Hive script

Hive shell inside scripts

Community
  • 1
  • 1
Sandeep Singh
  • 7,790
  • 4
  • 43
  • 68