Consider using CTE is possible, with the sequence as below for your references.
This is Hive script incorporate into Ozzie workflow.
with test_CTE as
(select * from table1),
(select col1, col2, col3 from test_CTE)
insert into table mytablename partition(biz_dt)
select col1 as name1, col2 as name2, col3 as name3 from testOne_CTE