In Hive,how to store the results of a query in a variable? I've tried the below command: SET hivevar:a=(Query);
But instead of the result,query itself is getting stored. Is there any way for storing the results?
In Hive,how to store the results of a query in a variable? I've tried the below command: SET hivevar:a=(Query);
But instead of the result,query itself is getting stored. Is there any way for storing the results?
Hive variables are nothing but a text replacement mechanism.
The replacement is done before parsing and execution.
Passing a query result as an argument to another query can be done from the shell, e.g. -