天天看點

71 Azkaban HIVE腳本任務

建立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=/home/hadoop/apps/hive/bin/hive -f 'test.sql'
      

2、将所有job資源檔案打到一個zip包中

繼續閱讀