3.5 hive 脚本
步骤1: 创建 hive.sql
脚本文件
use default;
drop table student;
create table student(id int, name string)
row format delimited fields terminated by '\t';
load data local inpath '/opt/module/datas/student.txt' into table student;
insert overwrite local directory '/opt/module/datas/student'
row format delimited fields terminated by '\t'
select * from student;
步骤2: 创建hive.job
描述文件
hive.job
# hive job
type=command
command=hive -f /opt/module/azkaban/jobs/hive.sql