How do you view the value of a hive variable you have set with the command "SET a = 'B,C,D'"? I don't want to use the variable- just see the value I have set it to. Also is there a good resource for Hive documentation like this? The Apache website is not very helpful.
Asked
Active
Viewed 2.2k times
3 Answers
46
Found my answer. The answer is simply: "Set a;" Stupid syntax IMO, but thats the way it is.
![](../../users/profiles/2449503.webp)
abu
- 898
- 1
- 7
- 14
12
Another way to view the value of a variable is via the hiveconf
variable
hive> select ${hiveconf.a};
where a
is the variable name
To see the values of all the variables, simply type
set -v
![](../../users/profiles/638670.webp)
Abbas Gadhia
- 13,110
- 8
- 53
- 66
11
The bellow will set the value of zzz
hive> set zzz=5;
To see what value in zzz use the bellow command
hive> set zzz;
zzz=5
![](../../users/profiles/5070526.webp)
Sachin Sukumaran
- 619
- 1
- 8
- 21