shanglifeecif_cron_test.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. #--------------------------------------------
  3. #Date: 2022/05/6
  4. #Author:LuGuangChen
  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. dbms_output.put_line(to_char(sysdate,'yyyy-MM-dd HH:mm:ss') || '跑批开始!');
  13. -- ok
  14. -- shanglifeecif.customertotaltemp();
  15. -- ok
  16. -- DELETE FROM shanglifeecif.individual;
  17. --初始化客户信息
  18. -- shanglifeecif.init_all_individual();
  19. --更新用户等级信息 ok
  20. -- shanglifeecif.up_t_customers_class_1();
  21. --更新其它信息
  22. -- shanglifeecif.up_other_customerinfo();
  23. --更新被保人信息
  24. -- shanglifeecif.update_insuredinfo();
  25. shanglifeecif.same_customer();
  26. shanglifeecif.data_cleaning();
  27. shanglifeecif.init_insurancearrangement_main();
  28. shanglifeecif.insuranceclaimthread_main();
  29. shanglifeecif.init_indrelationship_main();
  30. shanglifeecif.partytimeline_main();
  31. shanglifeecif.age_sex_distribution();
  32. shanglifeecif.customer_risk_temp();
  33. shanglifeecif.riskcode_statistics();
  34. shanglifeecif.bdnum_distribution();
  35. shanglifeecif.surrender_protection_temp();
  36. shanglifeecif.updateIndividualLable();
  37. shanglifeecif.effective_customer();
  38. -- 2022/05/20 start 陆光晨 分渠道展示
  39. -- 初始化用户渠道关系表
  40. -- shanglifeecif.init_customerno_salecom_relation();
  41. --客户信息添加渠道
  42. -- shanglifeecif.init_Individual_salecom();
  43. -- 分渠道重新计算标签值,并更新到用户渠道关系表中
  44. -- shanglifeecif.update_customerno_salecom_relation_labels();
  45. -- 2022/05/20 end 陆光晨 分渠道展示
  46. dbms_output.put_line(to_char(sysdate,'yyyy-MM-dd HH:mm:ss') || '跑批完成!');
  47. END;"
  48. 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 --hiveconf hive.zookeeper.session.timeout=86400000 -e "${shanglifeecif_sql}"