HIVE脚本任务

  hadoop fs -mkdir -p /aztest/hiveinput

  hadoop fs -put az.data /aztest/hiveinput/

  l 创建job描述文件和hive脚本

    Hive脚本: test.sql

use default;
drop table aztest;
create table aztest(id int,name string) row format delimited fields terminated by ',';
load data inpath '/aztest/hiveinput' into table aztest;
create table azres as select * from aztest;
insert overwrite directory '/aztest/hiveoutput' select count(1) from aztest; 

    Job描述文件:hivef.job  

#hivef.job
type=command
command=/usr/local/src/hive-1.2.1/bin/hive -f 'test.sql'

  2、将所有job资源文件打到一个zip包中

  12_Azkaban案例实践5_Command操作Hive脚本任务

  3、在azkaban的web管理界面创建工程并上传zip包

  4、启动job

  12_Azkaban案例实践5_Command操作Hive脚本任务

  12_Azkaban案例实践5_Command操作Hive脚本任务

 

相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2022-01-06
  • 2021-12-14
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-01
  • 2021-07-11
  • 2021-09-21
  • 2021-12-31
  • 2021-07-25
  • 2021-07-15
相关资源
相似解决方案