hive平台Shell文件

#!/bin/sh
#
for i in  '020W0700' '010WE0440' '020R0100' '020WE0300'

do
batch_code=$i
inc_day=$a
before=$b
sep_incday=$c
echo "tt   $sep_incday"
hive -e "
set mapreduce.job.queuename = root.ordi_predict;
set hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table dm_ordi_predict.batch_predict_result partition  (real_batch, inc_day)
select 
/*+mapjoin(a)*/
a.waybillno as waybillno_real,
a.dubbotime as real_dubbo,
a.opcode as real_op,
a.optime as real_optm,
get_json_object(compare_result,'$.showList[0].actualZone')actual_zone,
get_json_object(compare_result,'$.showList[2].staticBatch.batchCode') prd_batch,
get_json_object(compare_result,'$.wayBillBaseInfo.dubboParam') prd_input,
a.batchcode as real_batch,
$inc_day as inc_day
from 
(select
*
from
    dm_predict.dfs_wb_real_batchcode_log
where
    inc_day ='$inc_day'
    and batchcode = '$batch_code' ) a ;
"

done

参数配置:
序号 参数名称 参数值
1     a               $[time(yyyyMMdd)]
2     b               $[time(yyyyMMdd,-2d)]
3     c               $[time(yyyy-MM-dd)]

上一篇:2021-2027全球与中国校园管理系统市场现状及未来发展趋势


下一篇:2021-2027全球与中国医学影像外包市场现状及未来发展趋势