hiveSql.sh脚本
hive -e "insert into table test.sudian select split(a.key,'_')[0] as deviceid,(case when watchtime < 0 then 300000 when watchtime > 10800000 then 300000 else watchtime end) as watchtime from knowyou_edw.edw_userbehavior a where a.dt='$1' and a.code='0x0202' and a.videoname = '深夜书店'"
shudian.sh脚本 传入参数 20171001 20181227
!/bin/bash
begin_date=2
while [ "end_date" ]
do
echo $begin_date
你的hive脚本
sh hiveSql.sh {begin_date}" +%Y%m%d`
don
网友评论