How to pass variable values of a hive script, to a shell script within it

614 Views Asked by At

I have a hive script which takes parameters in the form of --hivevar var_name="value" from beeline and the substitution works well within hive queries.

Within this hive script, I wanted to run a shell script with a variable passed as a parameter. I tried

!sh /home/tempscript {variable_name}

But the script does not take the substituted value, rather it passes the string '{variable-name}' to the shell script.

Any way to get around this?

0

There are 0 best solutions below