Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How can we replace value of hive variables to check for any errors

Highlighted

How can we replace value of hive variables to check for any errors

New Contributor

We have a query in which we have defined more than 50 variables.

we call this hql via shell script, most of the times i get into syntax issue where i have not defined hive variables properly in the query.

Example
set hive var0=value0;set hive var1=value1;set hive var2=value2;select*from${hiveconf:var0}where col1=${hiveconf:var1}and col2=${hiveconf:var2};

I want to to check the above query result after replacing hive variables, So is there a way to check if the variables are parsed in the right way or are there any syntax errors.

Please let me know for any alternatives as well.