Hi all, I am trying to create a hive variable and store the current time stamp. Then run some complex select queries and then create another variable to store current timestamp and then find the runtime. The problem I am facing is every time I use the variable it gives me the current time instead of the assigned value. It just runs the current timestamp function every time. Below is the code snippet.
Code set hivevar:start_tm=current_timestamp(); select ${hivevar:start_tm}; select query; select ${hivevar:start_tm}; Here the start_tm variable calculates every time the current time and returns always the current time. How can I just store the value once and use that value for this variable. Ease clarify. Thanks, Elango