I'm creating a view in hive which unions two tables and has a lot of data. Is there a way to pass a filter paramter to view in hive so that it is applied to the table as well. I have
CREATE VIEW abc
AS
SELECT * FROM
(SELECT * FROM table_a
UNION
SELECT * table_b) temp;
If I run something like SELECT * FROM abc WHERE day='2018-10-22'
It should return the union on the selected date only like
SELECT * FROM table _a WHERE day='2018-10-22' UNION
SELECT * FROM table _b WHERE day='2018-10-22'
How do I create a view to do this.