命令:
(1)vi hive.sql
sql = “select * from table;”
hive -f hive.sql
(2)遍历一个表多次插入其他的表
from table1
insert into table2 where q1=v1
insert into table2 where q2=v2
(3)遍历hive表格并写入文件
hive -e “select * from table;” >> file.txt
命令:
(1)vi hive.sql
sql = “select * from table;”
hive -f hive.sql
(2)遍历一个表多次插入其他的表
from table1
insert into table2 where q1=v1
insert into table2 where q2=v2
(3)遍历hive表格并写入文件
hive -e “select * from table;” >> file.txt