I have a query which provides the max_processed_date (it provides a single value) and this date is used to fetch data from master_table.I am using the hivevars to do so, but it is directly substituting the query instead of first evaluating it.
set hivevar max_date= select max_processed_date from Tab_date where process='X';
select * from master_table where process_date > ${hivevar:max_date}
but this performs as select * from master_table where process_date > select max_processed_date from Tab_date where process='X';
which is not supported by hiveql. Is it possible that the hivevar can be evaluated first and this value can be used in the master_table query ?