shanglifeecif_cron.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. #--------------------------------------------
  3. #Date: 2021/05/13
  4. #Author:koucx
  5. export LANG="en_US.UTF-8"
  6. source /etc/profile
  7. source ~/.bash_profile;
  8. source /home/bireport/TDH-Client/init.sh
  9. ################################################
  10. shanglifeecif_sql="
  11. BEGIN
  12. -- 执行跑批任务
  13. dbms_output.put_line( '跑批开始!');
  14. dbms_output.put_line(to_char(sysdate,'yyyy-MM-dd HH:mm:ss') || '跑批开始!');
  15. shanglifeecif.customertotaltemp();
  16. -- DELETE FROM shanglifeecif.individual;
  17. --初始化客户信息
  18. -- shanglifeecif.init_all_individual();
  19. --更新用户等级信息
  20. -- shanglifeecif.up_t_customers_class_1();
  21. --更新其它信息
  22. -- shanglifeecif.up_other_customerinfo();
  23. --更新被保人信息
  24. -- shanglifeecif.update_insuredinfo();
  25. -- shanglifeecif.init_individual_main();
  26. -- shanglifeecif.same_customer();
  27. -- shanglifeecif.data_cleaning();
  28. -- shanglifeecif.init_insurancearrangement_main();
  29. -- shanglifeecif.insuranceclaimthread_main();
  30. -- shanglifeecif.init_indrelationship_main();
  31. -- shanglifeecif.partytimeline_main();
  32. -- shanglifeecif.age_sex_distribution();
  33. -- shanglifeecif.riskcode_statistics();
  34. -- shanglifeecif.bdnum_distribution();
  35. -- shanglifeecif.surrender_protection_temp();
  36. -- shanglifeecif.updateIndividualLable();
  37. -- shanglifeecif.effective_customer();
  38. EXCEPTION
  39. -- 引用一个NO_DATA_FOUND的EXCEPTION。
  40. WHEN NO_DATA_FOUND THEN
  41. -- 输出变量v_comment的值。
  42. dbms_output.put_line('当天跑批未完成!')
  43. WHEN TOO_MANY_ROWS THEN
  44. dbms_output.put_line('当天出现多条跑批数据!')
  45. END;"
  46. beeline -u "jdbc:hive2://10.50.254.45:10000" --hiveconf hive.metastore.client.socket.timeout=86400000 --hiveconf hive.server2.idle.session.timeout=43200000 --hiveconf hive.server2.session.check.interval=900000 -e "${shanglifeecif_sql}"