#!/usr/bin/python
timesnap = 1558454400000
calc_days = 16
start_month = 5
start_day = 22
num =22
start_m_days=31
for j in range(calc_days) :
if start_day +1+j>start_m_days:
print """INSERT INTO `br_sdk_druid`.`t_sdk_act_config_task` ( `name`, `type`, `create_time`, `update_time`, `info`, `status`) VALUES ( 'RETAINED@linlhTEST@"""+str(timesnap+j*24*60*60*1000)+"""', '1', '2019-"""+str(start_month+1).zfill(2)+'-'+str(start_
day+1+j-start_m_days).zfill(2)+""" 02:00:00', '2019-"""+str(start_month+1).zfill(2)+'-'+str(start_day+1+j-start_m_days).zfill(2)+"""', '{\"baseInput\":\"/data/br/base/action/inputpath/source/liujun"""+str(num)+"""/2019/"""+str(start_month+1).zfill(2)+'/'+str(start_day
+1+j-start_m_days).zfill(2)+"""\",\"baseOutput\":\"/data/br/base/action/inputpath/result/liujun"""+str(num)+"""/2019/"""+str(start_month+1).zfill(2)+'/'+str(start_day+1+j-start_m_days).zfill(2)+"""/RETAINED\",\"configMap\":{},\"gran\":\"DAY\",\"monitorTime\":"""+str(t
imesnap+j*24*60*60*1000)+""",\"mrTypeName\":\"RETAINED\"}', '2');"""
else:
print """INSERT INTO `br_sdk_druid`.`t_sdk_act_config_task` ( `name`, `type`, `create_time`, `update_time`, `info`, `status`) VALUES ( 'RETAINED@linlhTEST@"""+str(timesnap+j*24*60*60*1000)+"""', '1', '2019-"""+str(start_month).zfill(2)+'-'+str(start_da
y+1+j).zfill(2)+""" 02:00:00', '2019-"""+str(start_month).zfill(2)+'-'+str(start_day+1+j).zfill(2)+"""', '{\"baseInput\":\"/data/br/base/action/inputpath/source/liujun"""+str(num)+"""/2019/"""+str(start_month).zfill(2)+'/'+str(start_day+1+j).zfill(2)+"""\",\"baseOutpu
t\":\"/data/br/base/action/inputpath/result/liujun"""+str(num)+"""/2019/"""+str(start_month).zfill(2)+'/'+str(start_day+1+j).zfill(2)+"""/RETAINED\",\"configMap\":{},\"gran\":\"DAY\",\"monitorTime\":"""+str(timesnap+j*24*60*60*1000)+""",\"mrTypeName\":\"RETAINED\"}',
'2');"""

posted on 2019-06-06 20:46  咖啡猫来啦  阅读(801)  评论(0编辑  收藏  举报