I have two tables. test1 and test2
hive> select * from test1;
OK
id year
1 2017
2 2017
hive> select * from test2;
OK
no year
2 2017
3 2017
query :
select id, year from test1 where id > 1
union all
select no, year from test2 where no > 1
question 1: if i put the above query in a view and can I pass a parameter to it to use in the where clause (for id and no) ?
question 2 : can i frame the above query without the union all
appreciate the feedback.