并行对hive表进行操作(按照日期分区,统计数据)

#!/bin/sh
source ~/.bash_profile;
source /etc/profile;
  
start_date="20190622"
end_date="20190625"
while [ "$start_date" -le "$end_date" ];
do
yestertoday=`date -d "$start_date" +%Y-%m-%d`
today=`date -d "$start_date+1days" +%Y-%m-%d`
echo "yestertoday is $yestertoday today is $today"
start_date=`date -d "$start_date+1days" +%Y%m%d`
nohup hive -hiveconf yesterday=yesterday−hiveconftoday=today -f update-from-table.hql> $yestertoday-run-update.log 2&1 &
done

  

上一篇:常用标准库


下一篇:c++之结构详解