Commit f63e0ea5 by 李辅翼

信用分数据接入

parent 8342683b
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 3 --target-dir /data/traffic/tmp/ACD_DUTYSIMPLE_Day_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by SGBH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day ,'$time',to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_ACD_DUTYSIMPLE_A result where to_char(result.GXSJ,'yyyy-MM-dd')='$1' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/ACD_DUTYSIMPLE_Day_tmp' INTO TABLE acd_dutysimple_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO acd_dutysimple_all PARTITION(month) SELECT * from acd_dutysimple_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 3 --target-dir /data/traffic/tmp/ACD_DUTYSIMPLEHUMAN_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by b.sgbh --where "1=1" --query """select result.*,'$time' from zckj.VM_ACD_DUTYSIMPLEHUMAN_A result join (select sgbh, xzqh FROM zckj.VM_ACD_DUTYSIMPLE_A where to_char(GXSJ,'yyyy-MM-dd')='$1')b on result.sgbh = b.sgbh and result.xzqh = b.xzqh and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/ACD_DUTYSIMPLEHUMAN_DAY_tmp' INTO TABLE acd_dutysimplehuman_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO acd_dutysimplehuman_all SELECT * from acd_dutysimplehuman_day " --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 3 --target-dir /data/traffic/tmp/ACD_FILE_A_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by SGBH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM') as month,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXSJ,'yyyy-MM-dd') as day FROM zckj.VM_ACD_FILE_A result where to_char(result.GXSJ,'yyyy-MM-dd')='$1' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/ACD_FILE_A_DAY_tmp' INTO TABLE ACD_FILE_A_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ACD_FILE_A_ALL PARTITION(day) SELECT * from ACD_FILE_A_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /data/traffic/tmp/ACD_FILEHUMAN_A_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by b.sgbh --where "1=1" --query """select result.*,'$time' from zckj.VM_ACD_FILEHUMAN_A result join (select sgbh, xzqh FROM zckj.VM_ACD_FILE_A where to_char(GXSJ,'yyyy-MM-dd')='$4')b on result.sgbh = b.sgbh and result.xzqh = b.xzqh and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/ACD_FILEHUMAN_A_DAY_tmp' INTO TABLE ACD_FILEHUMAN_A_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ACD_FILEHUMAN_A_ALL SELECT * from ACD_FILEHUMAN_A_DAY" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 1 --target-dir /data/traffic/tmp/DRIVINGLICENSE_GY_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by DABH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day ,'$time',to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_DRIVINGLICENSE_GY result where to_char(result.GXSJ,'yyyy-MM-dd')='$1' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/DRIVINGLICENSE_GY_DAY_tmp' INTO TABLE DRIVINGLICENSE_GY_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO DRIVINGLICENSE_GY_ALL PARTITION(month) SELECT * from DRIVINGLICENSE_GY_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /data/traffic/tmp/drvflow_day_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by lsh --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day,'$time',to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_DRV_FLOW result where to_char(result.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/drvflow_day_tmp' INTO TABLE DrvFlow_Day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO DrvFlow_ALL PARTITION(month) SELECT * from DrvFlow_Day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 3 --target-dir /data/traffic/tmp/KCKP_ACCIDENTINFO_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by ACCIDENTINFOID --where "1=1" --query """SELECT result.*, to_char(result.FINISHTIME,'yyyy-MM-dd') as day,'$time',to_char(result.FINISHTIME,'yyyy-MM') as month FROM zckj.VM_QUICK_ACCIDENTINFO result where to_char(result.FINISHTIME,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/KCKP_ACCIDENTINFO_DAY_tmp' INTO TABLE KCKP_ACCIDENTINFO_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO KCKP_ACCIDENTINFO_ALL PARTITION(month) SELECT * from KCKP_ACCIDENTINFO_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 3 --target-dir /data/traffic/tmp/KCKP_DRIVERINFO_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by DRIVERINFOID --where "1=1" --query """SELECT result.*, to_char(result.CREATETIME,'yyyy-MM-dd') as day,'$time',to_char(result.CREATETIME,'yyyy-MM') as month FROM zckj.VM_QUICK_SETTLEMENT result where to_char(result.CREATETIME,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/KCKP_DRIVERINFO_DAY_tmp' INTO TABLE KCKP_DRIVERINFO_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO KCKP_DRIVERINFO_ALL PARTITION(month) SELECT * from KCKP_DRIVERINFO_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /data/traffic/tmp/vehflow_day_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by LSH --where "1=1" --query """SELECT result.*, to_char(result.GXRQ,'yyyy-MM-dd') as day,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXRQ,'yyyy-MM') as month FROM zckj.VM_VEH_FLOW result where to_char(result.GXRQ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/vehflow_day_tmp' INTO TABLE ods.imp_vehflow_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ods.imp_vehflow_i PARTITION(month) SELECT * from ods.imp_vehflow_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 3 --target-dir /data/traffic/tmp/VEHICLE_GY_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by XH --where "1=1" --query """SELECT result.*, to_char(result.GXRQ,'yyyy-MM-dd') as day,'$time',to_char(result.GXRQ,'yyyy-MM') as month FROM zckj.VM_VEHICLE_GY result where to_char(result.GXRQ,'yyyy-MM-dd')='$1' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/VEHICLE_GY_DAY_tmp' INTO TABLE VEHICLE_GY_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO VEHICLE_GY_ALL PARTITION(month) SELECT * from VEHICLE_GY_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /ods/vio/imp_vio_violation_del_day_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by wfbh --where "1=1" --query """SELECT a.*,to_char(a.GXSJ,'yyyy-MM') as month,'$time',to_char(a.GXSJ,'yyyy-MM-dd') as day FROM zckj.VM_VIO_VIOLATION_DEL a where to_char(a.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/ods/vio/imp_vio_violation_del_day_tmp' INTO TABLE ods.imp_vio_violation_del_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /illegal/ods/VIO_FORCE_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by XH --where "1=1" --query """select result.*,to_char(result.GXSJ,'yyyy-MM') as month,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXSJ,'yyyy-MM-dd') as day from zckj.VM_VIO_FORCE result where to_char(result.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/illegal/ods/VIO_FORCE_DAY_tmp' INTO TABLE illegal.vio_force_ods_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_ods_all PARTITION(day) SELECT * from illegal.vio_force_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /illegal/ods/VIO_FORCE_DEL_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by XH --where "1=1" --query """select result.*,to_char(result.GXSJ,'yyyy-MM') as month,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXSJ,'yyyy-MM-dd') as day from zckj.VM_VIO_FORCE_DEL_A result where to_char(result.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/illegal/ods/VIO_FORCE_DEL_DAY_tmp' INTO TABLE illegal.vio_force_del_ods_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_del_ods_all PARTITION(day) SELECT * from illegal.vio_force_del_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /illegal/ods/VIO_FORCE_HIS_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by XH --where "1=1" --query """select result.*,to_char(result.GXSJ,'yyyy-MM') as month,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXSJ,'yyyy-MM-dd') as day from zckj.VM_VIO_FORCE_HIS_A result where to_char(result.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/illegal/ods/VIO_FORCE_HIS_DAY_tmp' INTO TABLE illegal.vio_force_his_ods_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_his_ods_all PARTITION(day) SELECT * from illegal.vio_force_his_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect $1 --username $2 --password $3 -m 1 --target-dir /data/traffic/tmp/VIO_SURVEIL_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by XH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day,'$time',to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_VIO_SURVEIL result where to_char(result.GXSJ,'yyyy-MM-dd')='$4' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/VIO_SURVEIL_DAY_tmp' INTO TABLE vio_surveil_day"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO vio_surveil_all PARTITION(month) SELECT * from vio_surveil_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 1 --target-dir /data/traffic/tmp/VIO_VIOLATION_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by WFBH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day ,to_char(current_date,'yyyy-MM-dd') as insert_date,to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_VIO_VIOLATION result where to_char(result.GXSJ,'yyyy-MM-dd')='$1' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/VIO_VIOLATION_DAY_tmp' INTO TABLE VIO_VIOLATION_DAY"
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO VIO_VIOLATION_ALL PARTITION(month) SELECT * from VIO_VIOLATION_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO acd_dutysimple_all PARTITION(month) SELECT * from acd_dutysimple_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO acd_dutysimplehuman_all SELECT * from acd_dutysimplehuman_day " --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ACD_FILE_A_ALL PARTITION(day) SELECT * from ACD_FILE_A_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ACD_FILEHUMAN_A_ALL SELECT * from ACD_FILEHUMAN_A_DAY" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO DRIVINGLICENSE_GY_ALL PARTITION(month) SELECT * from DRIVINGLICENSE_GY_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO DrvFlow_ALL PARTITION(month) SELECT * from DrvFlow_Day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO KCKP_ACCIDENTINFO_ALL PARTITION(month) SELECT * from KCKP_ACCIDENTINFO_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO KCKP_DRIVERINFO_ALL PARTITION(month) SELECT * from KCKP_DRIVERINFO_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ods.imp_vehflow_i PARTITION(month) SELECT * from ods.imp_vehflow_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO VEHICLE_GY_ALL PARTITION(month) SELECT * from VEHICLE_GY_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO ods.imp_vio_violation_del_i PARTITION(day) SELECT * from ods.imp_vio_violation_del_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_ods_all PARTITION(day) SELECT * from illegal.vio_force_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_del_ods_all PARTITION(day) SELECT * from illegal.vio_force_del_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO illegal.vio_force_his_ods_all PARTITION(day) SELECT * from illegal.vio_force_his_ods_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO vio_surveil_all PARTITION(month) SELECT * from vio_surveil_day DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "INSERT INTO VIO_VIOLATION_ALL PARTITION(month) SELECT * from VIO_VIOLATION_DAY DISTRIBUTE BY rand()" --hiveconf hive.exec.dynamic.partition.mode=nonstrict --hiveconf hive.exec.dynamic.partition=true --hiveconf hive.exec.max.dynamic.partitions=36600 --hiveconf hive.exec.max.dynamic.partitions.pernode=36600
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.acd_dutysimple_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.acd_dutysimplehuman_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.acd_file_a_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.acd_filehuman_a_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.drivinglicense_gy_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.drvflow_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.kckp_accidentinfo_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.kckp_driverinfo_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table ods.imp_vehflow_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.vehicle_gy_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table ods.imp_vio_violation_del_day"
#!/bin/bash
#!/bin/bash
hdfs dfs -rmr /illegal/ods/VIO_FORCE_DAY/
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table illegal.vio_force_ods_day"
#!/bin/bash
#!/bin/bash
hdfs dfs -rmr /illegal/ods/VIO_FORCE_DEL_DAY/
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table illegal.vio_force_del_ods_day"
#!/bin/bash
#!/bin/bash
hdfs dfs -rmr /illegal/ods/VIO_FORCE_HIS_DAY/
#/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table illegal.vio_force_his_ods_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.vio_surveil_day"
#!/bin/bash
#!/bin/bash
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "TRUNCATE table default.vio_violation_day"
#!/bin/bash
#!/bin/bash
time3=$(date "+%Y-%m-%d %H:%M:%S")
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/sqoop import --connect jdbc:oracle:thin:@172.16.17.82:1521:gyjg --username gyjg_zckj --password zckj2018 -m 1 --target-dir /data/traffic/tmp/DRIVINGLICENSE_GY_DAY_tmp --delete-target-dir --fields-terminated-by "^" --lines-terminated-by "\n" --hive-drop-import-delims --split-by DABH --where "1=1" --query """SELECT result.*, to_char(result.GXSJ,'yyyy-MM-dd') as day ,'$time3',to_char(result.GXSJ,'yyyy-MM') as month FROM zckj.VM_DRIVINGLICENSE_GY result where to_char(result.GXSJ,'yyyy-MM-dd')='2019-07-05' and \$CONDITIONS"""
/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/hive -e "LOAD DATA INPATH '/data/traffic/tmp/DRIVINGLICENSE_GY_DAY_tmp' INTO TABLE DRIVINGLICENSE_GY_DAY"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment