|
@@ -67,7 +67,7 @@ mysql_to_hdfs_lzo_no_partition() {
|
|
|
ods_feedback(){
|
|
|
mysql_to_hdfs_lzo "$url" "$username" "$password" /warehouse/saga_dw/ods/tmp/ \
|
|
|
"id, project_id, object_id, source_type, user_id, user_phone, user_name, value_type, item_id, value, create_time, next_open_time, model, duration_type, custom_plan, curr_temp, nick_name, result, exe_result, fb_temp, remark" \
|
|
|
- "select id, project_id, object_id, source_type, user_id, user_phone, user_name, value_type, item_id, value, create_time, next_open_time, model, duration_type, custom_plan, curr_temp, nick_name, result, exe_result, fb_temp, remark from feedback where date_format(create_time, '%Y-%m-%d') = '$do_date' and 1 = 1 " \
|
|
|
+ "select id, project_id, object_id, source_type, user_id, user_phone, user_name, value_type, item_id, value, create_time, next_open_time, model, duration_type, custom_plan, curr_temp, nick_name, result, exe_result, fb_temp, remark from feedback where date_format(create_time, '%Y-%m-%d') = '$do_date' and 1 = 1 " \
|
|
|
ods_bus_feedback
|
|
|
}
|
|
|
|
|
@@ -78,9 +78,27 @@ ods_feedback_tmp(){
|
|
|
ods_bus_feedback_tmp
|
|
|
}
|
|
|
|
|
|
+# 照明操作记录
|
|
|
+ods_light_switch(){
|
|
|
+ mysql_to_hdfs_lzo "$url" "$username" "$password" /warehouse/saga_dw/ods/tmp/ \
|
|
|
+ "id, project_id, object_id, source_type, user_id, user_phone, user_name, on_off, result, create_time, exe_result" \
|
|
|
+ "select id, project_id, object_id, source_type, user_id, user_phone, user_name, on_off, result, create_time, exe_result from light_switch where date_format(create_time, '%Y-%m-%d') = '$do_date' and 1 = 1 " \
|
|
|
+ ods_bus_light_switch
|
|
|
+}
|
|
|
+
|
|
|
+ods_light_switch_tmp(){
|
|
|
+ mysql_to_hdfs_lzo_no_partition "$url" "$username" "$password" /warehouse/saga_dw/ods/tmp/ \
|
|
|
+ "id, project_id, object_id, source_type, user_id, user_phone, user_name, on_off, result, create_time, exe_result" \
|
|
|
+ "select id, project_id, object_id, source_type, user_id, user_phone, user_name, on_off, result, create_time, exe_result from light_switch where 1 = 1 " \
|
|
|
+ ods_bus_light_switch_tmp
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
case $1 in
|
|
|
"all")
|
|
|
ods_feedback
|
|
|
+ ods_light_switch
|
|
|
;;
|
|
|
"ods_feedback")
|
|
|
ods_feedback
|
|
@@ -88,4 +106,10 @@ case $1 in
|
|
|
"ods_feedback_tmp")
|
|
|
ods_feedback_tmp
|
|
|
;;
|
|
|
+"ods_light_switch")
|
|
|
+ ods_light_switch
|
|
|
+ ;;
|
|
|
+"ods_light_switch_tmp")
|
|
|
+ ods_light_switch_tmp
|
|
|
+ ;;
|
|
|
esac
|