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
Copyright © 尚硅谷大数据 2019 all right reserved,powered by Gitbook
该文件最后修订时间: 2019-03-13 17:12:42

results matching ""

    No results matching ""