前提hadoop 和azkaban都已经装好了

hive -f  test.hql或者hive -f  test.sql

脚本提前写好

如果报错

org.apache.hadoop.fs.FileAlreadyExistsException: Parent path is not a directory: /user user

hadoop fs -rm -r -skipTrash /user

搞定

job文件

type=command
command=chmod 777 -R ./
command.1=hive -f test.hql

hql文件

create database test;
use test;
CREATE TABLE test(
    id int,
    name string,
    class string
)ROW FORMAT DELIMITED 
FIELDS TERMINATED BY '\t';

打包zip,上传,执行,搞定

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐