Passing parameter in hive is not working for me. My code:
hive> set x='test variable';
hive> ${hiveconf:x};
I get this error:
FAILED: Parse Error: line 1:0 cannot recognize input near
''test variable'' '<EOF>' '<EOF>'
Passing parameter in hive is not working for me. My code:
hive> set x='test variable';
hive> ${hiveconf:x};
I get this error:
FAILED: Parse Error: line 1:0 cannot recognize input near
''test variable'' '<EOF>' '<EOF>'
hive> ${hiveconf:x};
Will literally substitute 'test variable'
. so you're executing the command
hive> 'test variable';
which SHOULD result in an error, since that's not a command I've ever seen with SQL.
If you're trying to output the value of x, you just have to do
SET x;
If you want to use the value of x in a statement, you can do
SELECT * FROM TABLE tbl WHERE a=${hiveconf:x};
would run the command
SELECT * FROM TABLE tbl WHERE a='test variable';
Try :
hive> set x='test variable';
hive> set;
You will see value of x
variable among values of many variable.