wudla 2 years ago
parent
commit
80bbfb60e1
2 changed files with 3 additions and 3 deletions
  1. 1 1
      energy/dayTask/mysql_to_hdfs.sh
  2. 2 2
      energy/dayTask/py_mysql.sh

+ 1 - 1
energy/dayTask/mysql_to_hdfs.sh

@@ -41,7 +41,7 @@ mysql_to_hdfs_lzo() {
 
 ## 能源 15 分钟差值
 ods_energy_15_min(){
-  mysql_to_hdfs_lzo $url $username $password /warehouse/saga_dw/ods/tmp/ "building, func_id, meter, data_time, data_value" "select building, func_id, meter, from_unixtime(unix_timestamp(data_time) + 28800) as data_time, data_value from energy_15_min where 1 = 1 " ods_energy_15_min
+  mysql_to_hdfs_lzo $url $username $password /warehouse/saga_dw/ods/tmp/ "building, func_id, meter, data_time, data_value" "select building, func_id, meter, data_time, data_value from energy_15_min where 1 = 1 " ods_energy_15_min
 }
 
 ## 能源 15 分钟分精度

+ 2 - 2
energy/dayTask/py_mysql.sh

@@ -13,7 +13,7 @@ if [ -n "$2" ] ;then
     start_time=`date -d "-1 day $current_day" +%Y%m%d`000000
     end_time=`date -d "0 day $current_day" +%Y%m%d`000000
 
-    energy_start_time=`date -d "-2 day $current_day" +%Y%m%d`160000
+    energy_start_time=`date -d "-2 day $current_day" +%Y%m%d`000000
     energy_end_time=`date -d "-1 day $current_day" +%Y%m%d`160000
 else
     echo "====没有输入数据的日期,取当前时间的前一天===="
@@ -39,7 +39,7 @@ echo "energy_end_time:"  $energy_end_time
 
 ## 能源数据
 energy_hbase_to_mysql(){
-  /usr/local/bin/python3 /opt/app/python_transfer/start_mysql.py 10101 --start_time $energy_start_time --end_time $energy_end_time
+  /usr/local/bin/python3 /opt/app/python_transfer/start_mysql.py 10101 --start_time $start_time --end_time $end_time
 }
 
 ## CO2