From 9dfe392fe93a0bafa7836e6d4c1a60b462d2fd51 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Tue, 12 Aug 2025 15:16:03 +0300 Subject: [PATCH 01/21] fix connections --- .../check_if_need_to_repeat_job.hpl | 2 +- .../check_if_work_activity_job_exists.hpl | 8 ++++---- .../parallel/work_activity_flow.hpl | 18 +++++------------- .../parallel/work_activity_flow_delta.hpl | 14 +++++--------- .../parallel/work_activity_flow_repeat.hpl | 18 +++++------------- .../recruitment_five_flow_delta.hpl | 2 +- .../recruitment_five_flow_on_error.hpl | 2 +- .../work_activity/recruitments_five_flow.hpl | 2 +- 8 files changed, 23 insertions(+), 43 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl index dd36f41..dcb65d7 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS (SELECT 1 diff --git a/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl b/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl index b562353..70c1393 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl @@ -67,7 +67,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS ( @@ -94,13 +94,13 @@ none - Basic Y + + N 0 + Basic ${STATUS} - - 944 diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl index d6b47c7..1ade769 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl @@ -57,7 +57,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y @@ -93,12 +93,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard Y - N - Y N N @@ -108,7 +105,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 992 @@ -128,12 +124,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard N - N - Y N N @@ -141,7 +134,6 @@ and recruitment_id = '${IDM_ID}'; VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 288 @@ -159,7 +151,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 10 WITH trud_info AS (SELECT ri.info, @@ -260,7 +252,7 @@ FROM trud_info ti; 1000 - ervu-dashboard-test + ervu-dashboard recruit_id diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl index 9ce3108..1a50b86 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl @@ -60,7 +60,7 @@ error_code - ervu-dashboard-test + ervu-dashboard Y @@ -97,7 +97,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y @@ -132,12 +132,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard N - N - Y N N @@ -149,7 +146,6 @@ SET error_code = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 @@ -167,7 +163,7 @@ and recruitment_id = '${IDM_ID}'; none - ervu-dashboard-test + ervu-dashboard N 10 WITH trud_info AS (SELECT ri.info, @@ -268,7 +264,7 @@ FROM trud_info ti; 1000 - ervu-dashboard-test + ervu-dashboard recruit_id diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl index a4a1f14..6d5d9cd 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl @@ -60,7 +60,7 @@ error_code - ervu-dashboard-test + ervu-dashboard Y @@ -96,12 +96,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard Y - N - Y N N @@ -111,7 +108,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 976 @@ -131,12 +127,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard N - N - Y N N @@ -164,7 +157,6 @@ DO UPDATE SET execution_datetime = DEFAULT, error_description = NULL, error_code = NULL; - 272 @@ -182,7 +174,7 @@ DO UPDATE SET none - ervu-dashboard-test + ervu-dashboard N 10 WITH trud_info AS (SELECT ri.info, @@ -283,7 +275,7 @@ FROM trud_info ti; 1000 - ervu-dashboard-test + ervu-dashboard recruit_id diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl index 1b75c94..c8787e1 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl @@ -57,7 +57,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl index 043e444..e1aeda3 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl @@ -57,7 +57,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl index 7d302c7..b1c9b40 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl @@ -57,7 +57,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT From 246c489b6d64b6e47bf218640babcdf631337cd7 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Tue, 12 Aug 2025 16:42:25 +0300 Subject: [PATCH 02/21] new_citizen --- map_v1/connections/db.json | 103 + map_v1/connections/db_mln118_to_local.json | 103 + map_v1/connections/db_uat.json | 103 + map_v1/connections/db_uat_to_here.json | 103 + map_v1/connections/db_uat_to_here_mln.json | 103 + map_v1/connections/db_uat_to_local_mln.json | 103 + map_v1/connections/mo_db.json | 103 + map_v1/country/appeals.main_profile.hpl | 200 ++ map_v1/country/appeals.reasons_appeal.hpl | 317 ++ map_v1/country/appeals.topic_appeal.hpl | 300 ++ map_v1/country/job_recruitments_country.hwf | 1084 +++++++ map_v1/country/main_dashboard.appeals.hpl | 298 ++ .../main_dashboard.recruitment_campaign.hpl | 336 ++ .../main_dashboard.total_registered.hpl | 323 ++ .../main_dashboard.waiting_registration.hpl | 313 ++ .../ratings.consideration_complaint.hpl | 117 + .../country/recruitment_campaign.appeals.hpl | 306 ++ .../recruitment_campaign.subpoenas.hpl | 420 +++ .../country/select_recruitments_country.hpl | 75 + map_v1/country/total_registered.age.hpl | 430 +++ map_v1/country/total_registered.busyness.hpl | 335 ++ .../country/total_registered.child_minor.hpl | 360 +++ .../total_registered.driver_license.hpl | 379 +++ .../total_registered.education_level.hpl | 342 ++ .../total_registered.marital_status.hpl | 322 ++ .../country/total_registered.reg_mil_cat.hpl | 368 +++ .../total_registered.removed_registry.hpl | 356 +++ map_v1/country/total_registered.subpoenas.hpl | 452 +++ .../clearing_recruits_from_citizen_table.hpl | 193 ++ ...b_clearing_recruits_from_citizen_table.hwf | 61 + .../checkpoinnt_raw_info_recruits_err.hpl | 131 + .../checkpoint_raw_info_recruits_success.hpl | 131 + .../job_if_err_raw_inf_recr.hwf | 242 ++ .../job_raw_info_recruits.hwf | 266 ++ .../raw_info_recruits/raw_info_recruits.hpl | 76 + .../branching_job_general_info_recruits.hpl | 230 ++ ...status_job_general_info_recruits_error.hpl | 103 + ...atus_job_general_info_recruits_success.hpl | 103 + ...eck_status_job_info_recruits_from_json.hpl | 200 ++ ..._status_parallel_recruits_info_citizen.hpl | 184 ++ .../citizen_tables/child/branching_child.hpl | 124 + .../child/branching_child_delta.hpl | 142 + .../change_status_child_flow1_error.hpl | 250 ++ .../change_status_child_flow1_success.hpl | 250 ++ .../change_status_child_flow2_error.hpl | 254 ++ .../change_status_child_flow2_success.hpl | 254 ++ .../change_status_child_flow3_error.hpl | 255 ++ .../change_status_child_flow3_success.hpl | 255 ++ .../change_status_child_flow4_error.hpl | 256 ++ .../change_status_child_flow4_success.hpl | 256 ++ .../change_status_child_flow5_error.hpl | 256 ++ .../change_status_child_flow5_success.hpl | 256 ++ .../change_status_delta_child_flow1_error.hpl | 101 + ...hange_status_delta_child_flow1_success.hpl | 103 + .../change_status_delta_child_flow2_error.hpl | 101 + ...hange_status_delta_child_flow2_success.hpl | 103 + .../change_status_delta_child_flow3_error.hpl | 101 + ...hange_status_delta_child_flow3_success.hpl | 103 + .../change_status_delta_child_flow4_error.hpl | 101 + ...hange_status_delta_child_flow4_success.hpl | 103 + .../change_status_delta_child_flow5_error.hpl | 101 + ...hange_status_delta_child_flow5_success.hpl | 103 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 142 + .../checkpoints/check_if_job_child_exists.hpl | 130 + .../checkpoints/checkpoint_child_error.hpl | 273 ++ .../checkpoints/checkpoint_job_child.hpl | 869 ++++++ .../checkpoint_job_child_delta.hpl | 869 ++++++ .../checkpoints/job_create_files_child.hwf | 235 ++ .../citizen_tables/child/job_child.hwf | 2478 +++++++++++++++ .../child/parallel/child_flow1.hpl | 229 ++ .../child/parallel/child_flow2.hpl | 142 + .../child/parallel/child_flow3.hpl | 142 + .../child/parallel/child_flow4.hpl | 142 + .../child/parallel/child_flow5.hpl | 142 + .../child/parallel/delta_child_flow1.hpl | 143 + .../child/parallel/delta_child_flow2.hpl | 143 + .../child/parallel/delta_child_flow3.hpl | 143 + .../child/parallel/delta_child_flow4.hpl | 143 + .../child/parallel/delta_child_flow5.hpl | 143 + .../recruitment_rows_five_flow_if_error.hpl | 185 ++ .../citizen/branching_citizen.hpl | 0 .../citizen/branching_citizen_delta.hpl | 0 .../change_status_citizen_flow1_error.hpl | 0 .../change_status_citizen_flow1_success.hpl | 0 .../change_status_citizen_flow2_error.hpl | 0 .../change_status_citizen_flow2_success.hpl | 0 .../change_status_citizen_flow3_error.hpl | 0 .../change_status_citizen_flow3_success.hpl | 0 .../change_status_citizen_flow4_error.hpl | 0 .../change_status_citizen_flow4_success.hpl | 0 .../change_status_citizen_flow5_error.hpl | 0 .../change_status_citizen_flow5_success.hpl | 0 ...hange_status_delta_citizen_flow1_error.hpl | 0 ...nge_status_delta_citizen_flow1_success.hpl | 0 ...hange_status_delta_citizen_flow2_error.hpl | 0 ...nge_status_delta_citizen_flow2_success.hpl | 0 ...hange_status_delta_citizen_flow3_error.hpl | 0 ...nge_status_delta_citizen_flow3_success.hpl | 0 ...hange_status_delta_citizen_flow4_error.hpl | 0 ...nge_status_delta_citizen_flow4_success.hpl | 0 ...hange_status_delta_citizen_flow5_error.hpl | 0 ...nge_status_delta_citizen_flow5_success.hpl | 0 .../change_status_to_processing.hpl | 0 .../change_status_to_processing_delta.hpl | 0 .../check_if_job_citizen_exists.hpl | 0 .../checkpoints/checkpoint_citizen_error.hpl | 0 .../checkpoints/checkpoint_job_citizen.hpl | 0 .../checkpoint_job_citizen_delta.hpl | 0 .../checkpoints/job_create_files_citizen.hwf | 0 .../citizen_tables/citizen/delta_citizen.hpl | 318 ++ .../citizen_tables/citizen/job_citizen.hwf | 0 .../citizen/parallel/citizen_flow1.hpl | 0 .../citizen/parallel/citizen_flow2.hpl | 0 .../citizen/parallel/citizen_flow3.hpl | 0 .../citizen/parallel/citizen_flow4.hpl | 0 .../citizen/parallel/citizen_flow5.hpl | 0 .../citizen/parallel/delta_citizen_flow1.hpl | 0 .../citizen/parallel/delta_citizen_flow2.hpl | 0 .../citizen/parallel/delta_citizen_flow3.hpl | 0 .../citizen/parallel/delta_citizen_flow4.hpl | 0 .../citizen/parallel/delta_citizen_flow5.hpl | 0 .../recruitment_rows_five_flow_if_error.hpl | 0 ...hing_citizen_appealing_violations_fz53.hpl | 124 + ...itizen_appealing_violations_fz53_delta.hpl | 142 + ..._appealing_violations_fz53_flow1_error.hpl | 250 ++ ...ppealing_violations_fz53_flow1_success.hpl | 250 ++ ..._appealing_violations_fz53_flow2_error.hpl | 254 ++ ...ppealing_violations_fz53_flow2_success.hpl | 254 ++ ..._appealing_violations_fz53_flow3_error.hpl | 255 ++ ...ppealing_violations_fz53_flow3_success.hpl | 255 ++ ..._appealing_violations_fz53_flow4_error.hpl | 256 ++ ...ppealing_violations_fz53_flow4_success.hpl | 256 ++ ..._appealing_violations_fz53_flow5_error.hpl | 256 ++ ...ppealing_violations_fz53_flow5_success.hpl | 256 ++ ..._appealing_violations_fz53_flow1_error.hpl | 101 + ...ppealing_violations_fz53_flow1_success.hpl | 101 + ..._appealing_violations_fz53_flow2_error.hpl | 102 + ...ppealing_violations_fz53_flow2_success.hpl | 101 + ..._appealing_violations_fz53_flow3_error.hpl | 101 + ...ppealing_violations_fz53_flow3_success.hpl | 101 + ..._appealing_violations_fz53_flow4_error.hpl | 101 + ...ppealing_violations_fz53_flow4_success.hpl | 101 + ..._appealing_violations_fz53_flow5_error.hpl | 101 + ...ppealing_violations_fz53_flow5_success.hpl | 101 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + ...tizen_appealing_violations_fz53_exists.hpl | 130 + ...itizen_appealing_violations_fz53_error.hpl | 273 ++ ..._job_citizen_appealing_violations_fz53.hpl | 869 ++++++ ...itizen_appealing_violations_fz53_delta.hpl | 869 ++++++ .../job_citizen_appealing_violations_fz53.hwf | 2478 +++++++++++++++ ...itizen_appealing_violations_fz53_flow1.hpl | 161 + ...itizen_appealing_violations_fz53_flow2.hpl | 158 + ...itizen_appealing_violations_fz53_flow3.hpl | 158 + ...itizen_appealing_violations_fz53_flow4.hpl | 158 + ...itizen_appealing_violations_fz53_flow5.hpl | 158 + ...itizen_appealing_violations_fz53_flow1.hpl | 158 + ...itizen_appealing_violations_fz53_flow2.hpl | 158 + ...itizen_appealing_violations_fz53_flow3.hpl | 158 + ...itizen_appealing_violations_fz53_flow4.hpl | 158 + ...itizen_appealing_violations_fz53_flow5.hpl | 158 + .../recruitment_rows_five_flow_if_error.hpl | 185 ++ ...nching_citizen_criminal_liability_fz53.hpl | 124 + ..._citizen_criminal_liability_fz53_delta.hpl | 142 + ...en_criminal_liability_fz53_flow1_error.hpl | 250 ++ ..._criminal_liability_fz53_flow1_success.hpl | 250 ++ ...en_criminal_liability_fz53_flow2_error.hpl | 254 ++ ..._criminal_liability_fz53_flow2_success.hpl | 254 ++ ...en_criminal_liability_fz53_flow3_error.hpl | 255 ++ ..._criminal_liability_fz53_flow3_success.hpl | 255 ++ ...en_criminal_liability_fz53_flow4_error.hpl | 256 ++ ..._criminal_liability_fz53_flow4_success.hpl | 256 ++ ...en_criminal_liability_fz53_flow5_error.hpl | 256 ++ ..._criminal_liability_fz53_flow5_success.hpl | 256 ++ ...en_criminal_liability_fz53_flow1_error.hpl | 101 + ..._criminal_liability_fz53_flow1_success.hpl | 101 + ...en_criminal_liability_fz53_flow2_error.hpl | 102 + ..._criminal_liability_fz53_flow2_success.hpl | 101 + ...en_criminal_liability_fz53_flow3_error.hpl | 101 + ..._criminal_liability_fz53_flow3_success.hpl | 101 + ...en_criminal_liability_fz53_flow4_error.hpl | 101 + ..._criminal_liability_fz53_flow4_success.hpl | 101 + ...en_criminal_liability_fz53_flow5_error.hpl | 101 + ..._criminal_liability_fz53_flow5_success.hpl | 101 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + ...citizen_criminal_liability_fz53_exists.hpl | 130 + ..._citizen_criminal_liability_fz53_error.hpl | 273 ++ ...nt_job_citizen_criminal_liability_fz53.hpl | 869 ++++++ ..._citizen_criminal_liability_fz53_delta.hpl | 869 ++++++ .../job_citizen_criminal_liability_fz53.hwf | 2482 +++++++++++++++ .../citizen_criminal_liability_fz53_flow1.hpl | 183 ++ .../citizen_criminal_liability_fz53_flow2.hpl | 180 ++ .../citizen_criminal_liability_fz53_flow3.hpl | 180 ++ .../citizen_criminal_liability_fz53_flow4.hpl | 180 ++ .../citizen_criminal_liability_fz53_flow5.hpl | 180 ++ ..._citizen_criminal_liability_fz53_flow1.hpl | 180 ++ ..._citizen_criminal_liability_fz53_flow2.hpl | 180 ++ ..._citizen_criminal_liability_fz53_flow3.hpl | 180 ++ ..._citizen_criminal_liability_fz53_flow4.hpl | 180 ++ ..._citizen_criminal_liability_fz53_flow5.hpl | 180 ++ .../recruitment_rows_five_flow_if_error.hpl | 185 ++ .../branching_citizen_guardianship.hpl | 124 + ...tatus_citizen_guardianship_flow1_error.hpl | 250 ++ ...tus_citizen_guardianship_flow1_success.hpl | 250 ++ ...tatus_citizen_guardianship_flow2_error.hpl | 254 ++ ...tus_citizen_guardianship_flow2_success.hpl | 254 ++ ...tatus_citizen_guardianship_flow3_error.hpl | 255 ++ ...tus_citizen_guardianship_flow3_success.hpl | 255 ++ ...tatus_citizen_guardianship_flow4_error.hpl | 256 ++ ...tus_citizen_guardianship_flow4_success.hpl | 256 ++ ...tatus_citizen_guardianship_flow5_error.hpl | 256 ++ ...tus_citizen_guardianship_flow5_success.hpl | 256 ++ ...tatus_delta_citizen_guardianship_error.hpl | 110 + ...tus_delta_citizen_guardianship_success.hpl | 110 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + ...eck_if_job_citizen_guardianship_exists.hpl | 130 + .../checkpoint_citizen_guardianship_error.hpl | 273 ++ .../checkpoint_job_citizen_guardianship.hpl | 869 ++++++ .../job_create_files_citizen_guardianship.hwf | 235 ++ .../delta_citizen_guardianship.hpl | 122 + .../job_citizen_guardianship.hwf | 1811 +++++++++++ .../parallel/citizen_guardianship_flow1.hpl | 228 ++ .../parallel/citizen_guardianship_flow2.hpl | 141 + .../parallel/citizen_guardianship_flow3.hpl | 141 + .../parallel/citizen_guardianship_flow4.hpl | 141 + .../parallel/citizen_guardianship_flow5.hpl | 141 + .../recruitment_rows_five_flow_if_error.hpl | 261 ++ .../branching_citizen_liability_fz53.hpl | 124 + ...branching_citizen_liability_fz53_delta.hpl | 142 + ...tus_citizen_liability_fz53_flow1_error.hpl | 250 ++ ...s_citizen_liability_fz53_flow1_success.hpl | 250 ++ ...tus_citizen_liability_fz53_flow2_error.hpl | 254 ++ ...s_citizen_liability_fz53_flow2_success.hpl | 254 ++ ...tus_citizen_liability_fz53_flow3_error.hpl | 255 ++ ...s_citizen_liability_fz53_flow3_success.hpl | 255 ++ ...tus_citizen_liability_fz53_flow4_error.hpl | 256 ++ ...s_citizen_liability_fz53_flow4_success.hpl | 256 ++ ...tus_citizen_liability_fz53_flow5_error.hpl | 256 ++ ...s_citizen_liability_fz53_flow5_success.hpl | 256 ++ ...lta_citizen_liability_fz53_flow1_error.hpl | 101 + ...a_citizen_liability_fz53_flow1_success.hpl | 101 + ...lta_citizen_liability_fz53_flow2_error.hpl | 102 + ...a_citizen_liability_fz53_flow2_success.hpl | 101 + ...lta_citizen_liability_fz53_flow3_error.hpl | 101 + ...a_citizen_liability_fz53_flow3_success.hpl | 101 + ...lta_citizen_liability_fz53_flow4_error.hpl | 101 + ...a_citizen_liability_fz53_flow4_success.hpl | 101 + ...lta_citizen_liability_fz53_flow5_error.hpl | 101 + ...a_citizen_liability_fz53_flow5_success.hpl | 101 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + ...k_if_job_citizen_liability_fz53_exists.hpl | 130 + ...heckpoint_citizen_liability_fz53_error.hpl | 273 ++ .../checkpoint_job_citizen_liability_fz53.hpl | 869 ++++++ ...point_job_citizen_liability_fz53_delta.hpl | 869 ++++++ .../job_citizen_liability_fz53.hwf | 2480 +++++++++++++++ .../parallel/citizen_liability_fz53_flow1.hpl | 205 ++ .../parallel/citizen_liability_fz53_flow2.hpl | 202 ++ .../parallel/citizen_liability_fz53_flow3.hpl | 202 ++ .../parallel/citizen_liability_fz53_flow4.hpl | 202 ++ .../parallel/citizen_liability_fz53_flow5.hpl | 202 ++ .../delta_citizen_liability_fz53_flow1.hpl | 202 ++ .../delta_citizen_liability_fz53_flow2.hpl | 202 ++ .../delta_citizen_liability_fz53_flow3.hpl | 202 ++ .../delta_citizen_liability_fz53_flow4.hpl | 202 ++ .../delta_citizen_liability_fz53_flow5.hpl | 202 ++ .../recruitment_rows_five_flow_if_error.hpl | 185 ++ .../branching_citizen_spouse.hpl | 124 + ...ange_status_citizen_spouse_flow1_error.hpl | 250 ++ ...ge_status_citizen_spouse_flow1_success.hpl | 250 ++ ...ange_status_citizen_spouse_flow2_error.hpl | 254 ++ ...ge_status_citizen_spouse_flow2_success.hpl | 254 ++ ...ange_status_citizen_spouse_flow3_error.hpl | 255 ++ ...ge_status_citizen_spouse_flow3_success.hpl | 255 ++ ...ange_status_citizen_spouse_flow4_error.hpl | 256 ++ ...ge_status_citizen_spouse_flow4_success.hpl | 256 ++ ...ange_status_citizen_spouse_flow5_error.hpl | 256 ++ ...ge_status_citizen_spouse_flow5_success.hpl | 256 ++ ...ange_status_delta_citizen_spouse_error.hpl | 110 + ...ge_status_delta_citizen_spouse_success.hpl | 110 + .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + .../check_if_job_citizen_spouse_exists.hpl | 130 + .../checkpoint_citizen_spouse_error.hpl | 273 ++ .../checkpoint_job_citizen_spouse.hpl | 869 ++++++ .../checkpoints/xxjob_create_files_child.hwf | 235 ++ .../citizen_spouse/delta_citizen_spouse.hpl | 181 ++ .../citizen_spouse/job_citizen_spouse.hwf | 1841 +++++++++++ .../parallel/citizen_spouse_flow1.hpl | 268 ++ .../parallel/citizen_spouse_flow2.hpl | 180 ++ .../parallel/citizen_spouse_flow3.hpl | 180 ++ .../parallel/citizen_spouse_flow4.hpl | 180 ++ .../parallel/citizen_spouse_flow5.hpl | 180 ++ .../recruitment_rows_five_flow_if_error.hpl | 261 ++ .../passport/branching_passport.hpl | 124 + .../change_status_delta_passport_error.hpl | 110 + .../change_status_delta_passport_success.hpl | 110 + .../change_status_passport_flow1_error.hpl | 250 ++ .../change_status_passport_flow1_success.hpl | 250 ++ .../change_status_passport_flow2_error.hpl | 254 ++ .../change_status_passport_flow2_success.hpl | 254 ++ .../change_status_passport_flow3_error.hpl | 255 ++ .../change_status_passport_flow3_success.hpl | 255 ++ .../change_status_passport_flow4_error.hpl | 256 ++ .../change_status_passport_flow4_success.hpl | 256 ++ .../change_status_passport_flow5_error.hpl | 256 ++ .../change_status_passport_flow5_success.hpl | 256 ++ .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + .../check_if_job_passport_exists.hpl | 130 + .../checkpoints/checkpoint_job_passport.hpl | 869 ++++++ .../checkpoints/checkpoint_passport_error.hpl | 273 ++ .../checkpoints/xxjob_create_files_child.hwf | 235 ++ .../passport/delta_passport.hpl | 141 + .../citizen_tables/passport/job_passport.hwf | 1845 +++++++++++ .../passport/parallel/passport_flow1.hpl | 224 ++ .../passport/parallel/passport_flow2.hpl | 137 + .../passport/parallel/passport_flow3.hpl | 137 + .../passport/parallel/passport_flow4.hpl | 137 + .../passport/parallel/passport_flow5.hpl | 137 + .../recruitment_rows_five_flow_if_error.hpl | 261 ++ .../prosecution/branching_prosecution.hpl | 124 + .../change_status_delta_prosecution_error.hpl | 110 + ...hange_status_delta_prosecution_success.hpl | 110 + .../change_status_prosecution_flow1_error.hpl | 250 ++ ...hange_status_prosecution_flow1_success.hpl | 250 ++ .../change_status_prosecution_flow2_error.hpl | 254 ++ ...hange_status_prosecution_flow2_success.hpl | 254 ++ .../change_status_prosecution_flow3_error.hpl | 255 ++ ...hange_status_prosecution_flow3_success.hpl | 255 ++ .../change_status_prosecution_flow4_error.hpl | 256 ++ ...hange_status_prosecution_flow4_success.hpl | 256 ++ .../change_status_prosecution_flow5_error.hpl | 256 ++ ...hange_status_prosecution_flow5_success.hpl | 256 ++ .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + .../check_if_job_prosecution_exists.hpl | 130 + .../checkpoint_job_prosecution.hpl | 869 ++++++ .../checkpoint_prosecution_error.hpl | 273 ++ .../checkpoints/xxjob_create_files_child.hwf | 235 ++ .../prosecution/delta_prosecution.hpl | 180 ++ .../prosecution/job_prosecution.hwf | 1843 +++++++++++ .../parallel/prosecution_flow1.hpl | 266 ++ .../parallel/prosecution_flow2.hpl | 179 ++ .../parallel/prosecution_flow3.hpl | 179 ++ .../parallel/prosecution_flow4.hpl | 179 ++ .../parallel/prosecution_flow5.hpl | 179 ++ .../recruitment_rows_five_flow_if_error.hpl | 261 ++ .../punishment/branching_punishment.hpl | 124 + .../change_status_delta_punishment_error.hpl | 110 + ...change_status_delta_punishment_success.hpl | 110 + .../change_status_punishment_flow1_error.hpl | 250 ++ ...change_status_punishment_flow1_success.hpl | 250 ++ .../change_status_punishment_flow2_error.hpl | 254 ++ ...change_status_punishment_flow2_success.hpl | 254 ++ .../change_status_punishment_flow3_error.hpl | 255 ++ ...change_status_punishment_flow3_success.hpl | 255 ++ .../change_status_punishment_flow4_error.hpl | 256 ++ ...change_status_punishment_flow4_success.hpl | 256 ++ .../change_status_punishment_flow5_error.hpl | 256 ++ ...change_status_punishment_flow5_success.hpl | 256 ++ .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + .../check_if_job_punishment_exists.hpl | 130 + .../checkpoints/checkpoint_job_punishment.hpl | 869 ++++++ .../checkpoint_punishment_error.hpl | 273 ++ .../checkpoints/xxjob_create_files_child.hwf | 235 ++ .../punishment/delta_punishment.hpl | 162 + .../punishment/job_punishment.hwf | 1841 +++++++++++ .../punishment/parallel/punishment_flow1.hpl | 163 + .../punishment/parallel/punishment_flow2.hpl | 162 + .../punishment/parallel/punishment_flow3.hpl | 161 + .../punishment/parallel/punishment_flow4.hpl | 161 + .../punishment/parallel/punishment_flow5.hpl | 161 + .../recruitment_rows_five_flow_if_error.hpl | 261 ++ .../snils_inn/branching_snils_inn.hpl | 124 + .../snils_inn/branching_snils_inn_delta.hpl | 142 + ...nge_status_delta_snils_inn_flow1_error.hpl | 101 + ...e_status_delta_snils_inn_flow1_success.hpl | 101 + ...nge_status_delta_snils_inn_flow2_error.hpl | 102 + ...e_status_delta_snils_inn_flow2_success.hpl | 101 + ...nge_status_delta_snils_inn_flow3_error.hpl | 101 + ...e_status_delta_snils_inn_flow3_success.hpl | 101 + ...nge_status_delta_snils_inn_flow4_error.hpl | 101 + ...e_status_delta_snils_inn_flow4_success.hpl | 101 + ...nge_status_delta_snils_inn_flow5_error.hpl | 101 + ...e_status_delta_snils_inn_flow5_success.hpl | 101 + .../change_status_snils_inn_flow1_error.hpl | 250 ++ .../change_status_snils_inn_flow1_success.hpl | 250 ++ .../change_status_snils_inn_flow2_error.hpl | 254 ++ .../change_status_snils_inn_flow2_success.hpl | 254 ++ .../change_status_snils_inn_flow3_error.hpl | 255 ++ .../change_status_snils_inn_flow3_success.hpl | 255 ++ .../change_status_snils_inn_flow4_error.hpl | 256 ++ .../change_status_snils_inn_flow4_success.hpl | 256 ++ .../change_status_snils_inn_flow5_error.hpl | 256 ++ .../change_status_snils_inn_flow5_success.hpl | 256 ++ .../change_status_to_processing.hpl | 142 + .../change_status_to_processing_delta.hpl | 102 + .../check_if_job_snils_inn_exists.hpl | 130 + .../checkpoints/checkpoint_job_snils_inn.hpl | 869 ++++++ .../checkpoint_job_snils_inn_delta.hpl | 869 ++++++ .../checkpoint_snils_inn_error.hpl | 273 ++ .../snils_inn/job_snils_inn.hwf | 2516 +++++++++++++++ .../parallel/delta_snils_inn_flow1.hpl | 202 ++ .../parallel/delta_snils_inn_flow2.hpl | 202 ++ .../parallel/delta_snils_inn_flow3.hpl | 202 ++ .../parallel/delta_snils_inn_flow4.hpl | 202 ++ .../parallel/delta_snils_inn_flow5.hpl | 202 ++ .../snils_inn/parallel/snils_inn_flow1.hpl | 208 ++ .../snils_inn/parallel/snils_inn_flow2.hpl | 201 ++ .../snils_inn/parallel/snils_inn_flow3.hpl | 201 ++ .../snils_inn/parallel/snils_inn_flow4.hpl | 201 ++ .../snils_inn/parallel/snils_inn_flow5.hpl | 201 ++ .../recruitment_rows_five_flow_if_error.hpl | 185 ++ .../check_if_need_to_repeat_job.hpl | 86 + .../check_if_work_activity_job_exists.hpl | 113 + .../work_activity/delta_work_activity.hpl | 27 + .../parallel/work_activity_flow.hpl | 384 +++ .../parallel/work_activity_flow_delta.hpl | 396 +++ .../parallel/work_activity_flow_repeat.hpl | 407 +++ .../recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../work_activity/recruitments_five_flow.hpl | 356 +++ .../work_activity/work_activity_job.hwf | 309 ++ .../general_info_recruits_in_process.hpl | 116 + .../job_general_info_recruits.hwf | 1312 ++++++++ .../job_info_recruits_from_json.hwf | 529 ++++ .../job_parallel_recruits_info_citizen.hwf | 190 ++ .../main_profile/main_profile.hpl | 265 ++ .../main_profile/main_profile.hwf | 126 + .../main_profile/nlvl_main_profile.hpl | 210 ++ .../info_recruits/branching_recruits_info.hpl | 124 + .../branching_recruits_info_delta.hpl | 142 + ...status_delta_recruits_info_flow1_error.hpl | 103 + ...atus_delta_recruits_info_flow1_success.hpl | 102 + ...status_delta_recruits_info_flow2_error.hpl | 103 + ...atus_delta_recruits_info_flow2_success.hpl | 102 + ...status_delta_recruits_info_flow3_error.hpl | 103 + ...atus_delta_recruits_info_flow3_success.hpl | 102 + ...status_delta_recruits_info_flow4_error.hpl | 103 + ...atus_delta_recruits_info_flow4_success.hpl | 102 + ...status_delta_recruits_info_flow5_error.hpl | 103 + ...atus_delta_recruits_info_flow5_success.hpl | 102 + ...hange_status_recruits_info_flow1_error.hpl | 249 ++ ...nge_status_recruits_info_flow1_success.hpl | 249 ++ ...hange_status_recruits_info_flow2_error.hpl | 253 ++ ...nge_status_recruits_info_flow2_success.hpl | 253 ++ ...hange_status_recruits_info_flow3_error.hpl | 254 ++ ...nge_status_recruits_info_flow3_success.hpl | 254 ++ ...hange_status_recruits_info_flow4_error.hpl | 255 ++ ...nge_status_recruits_info_flow4_success.hpl | 255 ++ ...hange_status_recruits_info_flow5_error.hpl | 255 ++ ...nge_status_recruits_info_flow5_success.hpl | 255 ++ .../change_status_to_processing.hpl | 143 + .../change_status_to_processing_delta.hpl | 142 + .../check_if_job_recruits_info_exists.hpl | 130 + .../checkpoint_job_recruits_info.hpl | 1004 ++++++ .../checkpoint_job_recruits_info_delta.hpl | 1004 ++++++ .../checkpoint_recruit_info_error.hpl | 284 ++ .../job_check_files_recruits_info.hwf | 330 ++ .../job_checkpoints_recruits_info.hwf | 91 + .../job_create_files_recruits_info.hwf | 235 ++ .../job_recruit_last_update_date.hwf | 124 + .../info_recruits/job_recruits_info.hwf | 2776 +++++++++++++++++ .../parallel/delta_recruits_info_flow1.hpl | 151 + .../parallel/delta_recruits_info_flow2.hpl | 151 + .../parallel/delta_recruits_info_flow3.hpl | 151 + .../parallel/delta_recruits_info_flow4.hpl | 151 + .../parallel/delta_recruits_info_flow5.hpl | 151 + .../parallel/recruits_info_flow1.hpl | 232 ++ .../parallel/recruits_info_flow2.hpl | 141 + .../parallel/recruits_info_flow3.hpl | 141 + .../parallel/recruits_info_flow4.hpl | 141 + .../parallel/recruits_info_flow5.hpl | 141 + .../recruit_update_date_ervu_dashboard.hpl | 95 + .../recruitment_rows_five_flow_if_error.hpl | 185 ++ .../recruits_info_param_create_date.hpl | 111 + .../row_last_recruit_update_date.hpl | 108 + .../recruitment/job_recruitment.hwf | 144 + .../info_recruits/recruitment/recruitment.hpl | 204 ++ .../recruitment_param_create_date.hpl | 76 + .../supportive_jobs/job_create_files.hwf | 215 ++ .../job_create_files_for_test.hwf | 145 + .../job_recruit_create_date.hwf | 124 + .../recruit_create_date_person_registry.hpl | 95 + .../supportive_jobs/recruitment_rows.hpl | 76 + .../recruitment_rows_five_flow.hpl | 121 + .../recruitment_rows_five_flow_child.hpl | 121 + .../recruitment_rows_five_flow_citizen.hpl | 121 + ...flow_citizen_appealing_violations_fz53.hpl | 121 + ...e_flow_citizen_criminal_liability_fz53.hpl | 121 + ...nt_rows_five_flow_citizen_guardianship.hpl | 121 + ..._rows_five_flow_citizen_liability_fz53.hpl | 121 + ...ruitment_rows_five_flow_citizen_spouse.hpl | 121 + .../recruitment_rows_five_flow_passport.hpl | 121 + ...recruitment_rows_five_flow_prosecution.hpl | 121 + .../recruitment_rows_five_flow_punishment.hpl | 121 + .../recruitment_rows_five_flow_snils_inn.hpl | 121 + .../row_last_recruit_create_date.hpl | 109 + map_v1/instruction.txt | 2 + ...ob_copy_deferment_punishment_fz53_info.hwf | 119 + map_v1/job_general.hwf | 230 ++ map_v1/job_pack.pub_recruitment.hwf | 133 + map_v1/job_recruitments_all.hwf | 453 +++ map_v1/log.txt | 0 map_v1/log/log-file-action.csv | 5 + map_v1/log/log-file-workflow.csv | 1368 ++++++++ map_v1/log/workflows-logging.hpl | 830 +++++ map_v1/log_jobs/log_job_info_recruits.txt | 0 .../log_jobs/log_job_info_recruits_once.txt | 0 map_v1/log_jobs/log_job_ratings.txt | 0 map_v1/log_jobs/log_job_recruitments_all.txt | 0 .../log_jobs/log_job_recruitments_country.txt | 0 .../log_jobs/log_job_recruitments_milcom.txt | 0 .../log_jobs/log_job_recruitments_mildis.txt | 0 .../log_jobs/log_job_recruitments_region.txt | 0 .../pipeline-run-configuration/local.json | 20 + .../rdbms/118_ervu-person-registry.json | 26 + .../rdbms/118_ervu-subpoena-registry.json | 26 + .../rdbms/119_ervu-dashboard-copy.json | 27 + map_v1/metadata/rdbms/ervu-dashboard.json | 27 + map_v1/metadata/rdbms/ervu-journal.json | 26 + .../metadata/rdbms/ervu_person_registry.json | 26 + map_v1/metadata/rdbms/incident.json | 26 + map_v1/metadata/rdbms/metrics.json | 27 + .../postgres.appeal-document-service.json | 26 + .../postgres.decision-document-service.json | 26 + .../rdbms/postgres.person_registry.json | 26 + map_v1/metadata/rdbms/postgres.subpoena.json | 26 + .../workflow-log/workflow-logging.json | 16 + .../workflow-run-configuration/local.json | 11 + map_v1/mil_com/job_recruitments_milcom.hwf | 2185 +++++++++++++ .../m_d.rec_cam(m_c)_to_decision_service.hpl | 142 + ....rec_cam(m_c)_to_decision_service_uniq.hpl | 178 ++ .../m_d.rec_cam(m_c)_to_person_registry.hpl | 274 ++ ...m(m_c)_to_person_registry_postponement.hpl | 137 + ...)_to_person_registry_postponement_uniq.hpl | 170 + ...d.rec_cam(m_c)_to_person_registry_uniq.hpl | 342 ++ .../m_d.rec_cam(m_c)_to_subpoena_registry.hpl | 272 ++ ...rec_cam(m_c)_to_subpoena_registry_uniq.hpl | 369 +++ ...in_dashboard.recruitment_campaign(m_c).hwf | 769 +++++ .../postponement_percents.hpl | 112 + .../recruitment_season_combination.hpl | 126 + .../recruitment_season_combination_uniq.hpl | 124 + .../main_dashboard.total_registered(m_c).hpl | 436 +++ .../main_dashboard.total_registered(m_c).hwf | 309 ++ ...in_dashboard.total_registered_pr1(m_c).hpl | 334 ++ ...in_dashboard.total_registered_pr2(m_c).hpl | 334 ++ ...in_dashboard.total_registered_pr3(m_c).hpl | 334 ++ ...in_dashboard.total_registered_pr4(m_c).hpl | 334 ++ ...in_dashboard.total_registered_pr5(m_c).hpl | 334 ++ ...in_dashboard.waiting_registration(m_c).hpl | 272 ++ ...in_dashboard.waiting_registration(m_c).hwf | 309 ++ ...ashboard.waiting_registration_pr1(m_c).hpl | 272 ++ ...ashboard.waiting_registration_pr2(m_c).hpl | 272 ++ ...ashboard.waiting_registration_pr3(m_c).hpl | 272 ++ ...ashboard.waiting_registration_pr4(m_c).hpl | 272 ++ ...ashboard.waiting_registration_pr5(m_c).hpl | 272 ++ map_v1/mil_com/parameters/add_schema.hpl | 692 ++++ .../array_recruitment_for_parallel.hpl | 113 + .../mil_com/parameters/array_recruitments.hpl | 120 + .../array_season_recruitments.hpl | 114 + .../array_season_recruitments_all.hpl | 121 + ...array_season_recruitments_all_parallel.hpl | 154 + .../recruitment_campaign.subpoenas(m_c).hpl | 702 +++++ .../recruitment_campaign.subpoenas(m_c).hwf | 487 +++ ...cruitment_campaign.subpoenas(m_c)_uniq.hpl | 799 +++++ .../recruitment_season_combination.hpl | 126 + .../recruitment_season_combination_uniq.hpl | 124 + .../total_registered.age(m_c).hpl | 548 ++++ .../total_registered.age(m_c).hwf | 312 ++ .../total_registered.age_pr1(m_c).hpl | 446 +++ .../total_registered.age_pr2(m_c).hpl | 446 +++ .../total_registered.age_pr3(m_c).hpl | 446 +++ .../total_registered.age_pr4(m_c).hpl | 446 +++ .../total_registered.age_pr5(m_c).hpl | 446 +++ .../total_registered.busyness(m_c).hpl | 691 ++++ .../total_registered.busyness(m_c).hwf | 309 ++ .../total_registered.busyness_pr1(m_c).hpl | 589 ++++ .../total_registered.busyness_pr2(m_c).hpl | 589 ++++ .../total_registered.busyness_pr3(m_c).hpl | 589 ++++ .../total_registered.busyness_pr4(m_c).hpl | 589 ++++ .../total_registered.busyness_pr5(m_c).hpl | 589 ++++ .../total_registered.child_minor(m_c).hpl | 424 +++ .../total_registered.child_minor(m_c).hwf | 312 ++ .../total_registered.child_minor_pr1(m_c).hpl | 322 ++ .../total_registered.child_minor_pr2(m_c).hpl | 322 ++ .../total_registered.child_minor_pr3(m_c).hpl | 322 ++ .../total_registered.child_minor_pr4(m_c).hpl | 322 ++ .../total_registered.child_minor_pr5(m_c).hpl | 322 ++ .../total_registered.driver_license(m_c).hpl | 414 +++ .../total_registered.driver_license(m_c).hwf | 309 ++ ...tal_registered.driver_license_pr1(m_c).hpl | 312 ++ ...tal_registered.driver_license_pr2(m_c).hpl | 312 ++ ...tal_registered.driver_license_pr3(m_c).hpl | 312 ++ ...tal_registered.driver_license_pr4(m_c).hpl | 312 ++ ...tal_registered.driver_license_pr5(m_c).hpl | 312 ++ .../total_registered.education_level(m_c).hpl | 452 +++ .../total_registered.education_level(m_c).hwf | 309 ++ ...al_registered.education_level_pr1(m_c).hpl | 350 +++ ...al_registered.education_level_pr2(m_c).hpl | 350 +++ ...al_registered.education_level_pr3(m_c).hpl | 350 +++ ...al_registered.education_level_pr4(m_c).hpl | 350 +++ ...al_registered.education_level_pr5(m_c).hpl | 350 +++ .../total_registered.marital_status(m_c).hpl | 372 +++ .../total_registered.marital_status(m_c).hwf | 312 ++ ...tal_registered.marital_status_pr1(m_c).hpl | 270 ++ ...tal_registered.marital_status_pr2(m_c).hpl | 270 ++ ...tal_registered.marital_status_pr3(m_c).hpl | 270 ++ ...tal_registered.marital_status_pr4(m_c).hpl | 270 ++ ...tal_registered.marital_status_pr5(m_c).hpl | 270 ++ .../total_registered.reg_mil_cat(m_c).hpl | 453 +++ .../total_registered.reg_mil_cat(m_c).hwf | 309 ++ .../total_registered.reg_mil_cat_pr1(m_c).hpl | 351 +++ .../total_registered.reg_mil_cat_pr2(m_c).hpl | 351 +++ .../total_registered.reg_mil_cat_pr3(m_c).hpl | 351 +++ .../total_registered.reg_mil_cat_pr4(m_c).hpl | 351 +++ .../total_registered.reg_mil_cat_pr5(m_c).hpl | 351 +++ ...total_registered.removed_registry(m_c).hpl | 348 +++ ...total_registered.removed_registry(m_c).hwf | 312 ++ ...l_registered.removed_registry_pr1(m_c).hpl | 246 ++ ...l_registered.removed_registry_pr2(m_c).hpl | 246 ++ ...l_registered.removed_registry_pr3(m_c).hpl | 246 ++ ...l_registered.removed_registry_pr4(m_c).hpl | 246 ++ ...l_registered.removed_registry_pr5(m_c).hpl | 246 ++ .../total_registered.subpoenas(m_c).hpl | 581 ++++ .../total_registered.subpoenas(m_c).hwf | 312 ++ .../total_registered.subpoenas_pr1(m_c).hpl | 490 +++ .../total_registered.subpoenas_pr2(m_c).hpl | 490 +++ .../total_registered.subpoenas_pr3(m_c).hpl | 490 +++ .../total_registered.subpoenas_pr4(m_c).hpl | 490 +++ .../total_registered.subpoenas_pr5(m_c).hpl | 490 +++ .../appeals.reasons_appeal(m_d).hpl | 351 +++ .../appeals.topic_appeal(m_d).hpl | 334 ++ map_v1/mil_district/array_mildis.hwf | 156 + map_v1/mil_district/job_get_rows_mildis.hwf | 122 + .../mil_district/job_recruitments_mildis.hwf | 1091 +++++++ .../main_dashboard.appeals(m_d).hpl | 332 ++ ...in_dashboard.recruitment_campaign(m_d).hpl | 370 +++ .../main_dashboard.total_registered(m_d).hpl | 357 +++ ...in_dashboard.waiting_registration(m_d).hpl | 347 +++ .../recruitment_campaign.appeals(m_d).hpl | 335 ++ .../recruitment_campaign.subpoenas(m_d).hpl | 454 +++ map_v1/mil_district/rows_id-array_mildis.hpl | 74 + .../select_recruitments_mildis(m_d).hpl | 193 ++ .../select_recruitments_mildis(m_d)rows.hpl | 82 + .../total_registered.age(m_d).hpl | 463 +++ .../total_registered.busyness(m_d).hpl | 371 +++ .../total_registered.child_minor(m_d).hpl | 394 +++ .../total_registered.driver_license(m_d).hpl | 403 +++ .../total_registered.education_level(m_d).hpl | 377 +++ .../total_registered.marital_status(m_d).hpl | 356 +++ .../total_registered.reg_mil_cat(m_d).hpl | 396 +++ ...total_registered.removed_registry(m_d).hpl | 390 +++ .../total_registered.subpoenas(m_d).hpl | 486 +++ map_v1/pack.pub_recruitment.hpl | 173 + map_v1/predictive_metrics/data_collection.hpl | 203 ++ map_v1/predictive_metrics/next_lvl_org_pm.hpl | 177 ++ map_v1/predictive_metrics/predictive.hwf | 165 + map_v1/predictive_metrics/predictive_data.hpl | 461 +++ map_v1/project-config.json | 9 + map_v1/ratings/job_ratings.hwf | 350 +++ map_v1/ratings/ratings.appear_subpoena.hpl | 228 ++ map_v1/ratings/ratings.conscription_info.hpl | 242 ++ .../ratings.consideration_complaint.hpl | 219 ++ .../job_last_recording_date.hwf | 171 + map_v1/recording_date/last_recording_date.hpl | 100 + map_v1/region/appeals.reasons_appeal(reg).hpl | 245 ++ map_v1/region/appeals.review_rating.hpl | 156 + map_v1/region/appeals.topic_appeal(reg).hpl | 248 ++ map_v1/region/array_reg.hwf | 157 + map_v1/region/auxiliary/array_region.hpl | 73 + .../auxiliary/update_appeal_recruitments.hpl | 291 ++ map_v1/region/job_get_rows_reg.hwf | 120 + map_v1/region/job_recruitments_region.hwf | 1771 +++++++++++ map_v1/region/main_dashboard.appeals(reg).hpl | 394 +++ ...in_dashboard.recruitment_campaign(reg).hpl | 302 ++ .../main_dashboard.total_registered(reg).hpl | 289 ++ ...in_dashboard.waiting_registration(reg).hpl | 279 ++ .../recruitment_campaign.appeals(reg).hpl | 391 +++ .../recruitment_campaign.subpoenas(reg).hpl | 386 +++ map_v1/region/rows_id-array_reg.hpl | 74 + .../select_recruitments_region(reg).hpl | 198 ++ .../select_recruitments_region(reg)rows.hpl | 76 + map_v1/region/total_registered.age(reg).hpl | 395 +++ .../region/total_registered.busyness(reg).hpl | 295 ++ .../total_registered.child_minor(reg).hpl | 326 ++ .../total_registered.driver_license(reg).hpl | 340 ++ .../total_registered.education_level(reg).hpl | 308 ++ .../total_registered.marital_status(reg).hpl | 288 ++ .../total_registered.reg_mil_cat(reg).hpl | 328 ++ ...total_registered.removed_registry(reg).hpl | 322 ++ .../total_registered.subpoenas(reg).hpl | 418 +++ map_v1/supportive_jobs/clearing_logs.hwf | 83 + .../percent_for_waiting_reg.hpl | 111 + .../citizen/check_if_need_to_repeat_job.hpl | 86 + .../check_if_citizen_job_exists.hpl | 113 + .../citizen_tables/citizen/citizen_job.hwf | 329 ++ .../citizen_tables/citizen/delta_citizen.hpl | 295 +- .../citizen/parallel/citizen_flow.hpl | 395 +++ .../citizen/parallel/citizen_flow_delta.hpl | 396 +++ .../citizen/parallel/citizen_flow_repeat.hpl | 418 +++ .../citizen/recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../citizen/recruitments_five_flow.hpl | 356 +++ 709 files changed, 185899 insertions(+), 293 deletions(-) create mode 100644 map_v1/connections/db.json create mode 100644 map_v1/connections/db_mln118_to_local.json create mode 100644 map_v1/connections/db_uat.json create mode 100644 map_v1/connections/db_uat_to_here.json create mode 100644 map_v1/connections/db_uat_to_here_mln.json create mode 100644 map_v1/connections/db_uat_to_local_mln.json create mode 100644 map_v1/connections/mo_db.json create mode 100644 map_v1/country/appeals.main_profile.hpl create mode 100644 map_v1/country/appeals.reasons_appeal.hpl create mode 100644 map_v1/country/appeals.topic_appeal.hpl create mode 100644 map_v1/country/job_recruitments_country.hwf create mode 100644 map_v1/country/main_dashboard.appeals.hpl create mode 100644 map_v1/country/main_dashboard.recruitment_campaign.hpl create mode 100644 map_v1/country/main_dashboard.total_registered.hpl create mode 100644 map_v1/country/main_dashboard.waiting_registration.hpl create mode 100644 map_v1/country/ratings.consideration_complaint.hpl create mode 100644 map_v1/country/recruitment_campaign.appeals.hpl create mode 100644 map_v1/country/recruitment_campaign.subpoenas.hpl create mode 100644 map_v1/country/select_recruitments_country.hpl create mode 100644 map_v1/country/total_registered.age.hpl create mode 100644 map_v1/country/total_registered.busyness.hpl create mode 100644 map_v1/country/total_registered.child_minor.hpl create mode 100644 map_v1/country/total_registered.driver_license.hpl create mode 100644 map_v1/country/total_registered.education_level.hpl create mode 100644 map_v1/country/total_registered.marital_status.hpl create mode 100644 map_v1/country/total_registered.reg_mil_cat.hpl create mode 100644 map_v1/country/total_registered.removed_registry.hpl create mode 100644 map_v1/country/total_registered.subpoenas.hpl create mode 100644 map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl create mode 100644 map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf create mode 100644 map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl create mode 100644 map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl create mode 100644 map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf create mode 100644 map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf create mode 100644 map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl create mode 100644 map_v1/info_recruits/branching_job_general_info_recruits.hpl create mode 100644 map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl create mode 100644 map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl create mode 100644 map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl create mode 100644 map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/branching_child.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/child/job_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/child_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/child_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/child_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/child_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/branching_citizen.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf (100%) create mode 100644 map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/job_citizen.hwf (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl (100%) rename {mappings => map_v1}/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl (100%) create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/job_passport.hwf create mode 100644 map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf create mode 100644 map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf create mode 100644 map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl create mode 100644 map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl create mode 100644 map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf create mode 100644 map_v1/info_recruits/general_info_recruits_in_process.hpl create mode 100644 map_v1/info_recruits/job_general_info_recruits.hwf create mode 100644 map_v1/info_recruits/job_info_recruits_from_json.hwf create mode 100644 map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf create mode 100644 map_v1/info_recruits/main_profile/main_profile.hpl create mode 100644 map_v1/info_recruits/main_profile/main_profile.hwf create mode 100644 map_v1/info_recruits/main_profile/nlvl_main_profile.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf create mode 100644 map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf create mode 100644 map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf create mode 100644 map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl create mode 100644 map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl create mode 100644 map_v1/info_recruits/recruitment/job_recruitment.hwf create mode 100644 map_v1/info_recruits/recruitment/recruitment.hpl create mode 100644 map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/job_create_files.hwf create mode 100644 map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf create mode 100644 map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf create mode 100644 map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl create mode 100644 map_v1/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl create mode 100644 map_v1/instruction.txt create mode 100644 map_v1/job_copy_deferment_punishment_fz53_info.hwf create mode 100644 map_v1/job_general.hwf create mode 100644 map_v1/job_pack.pub_recruitment.hwf create mode 100644 map_v1/job_recruitments_all.hwf create mode 100644 map_v1/log.txt create mode 100644 map_v1/log/log-file-action.csv create mode 100644 map_v1/log/log-file-workflow.csv create mode 100644 map_v1/log/workflows-logging.hpl create mode 100644 map_v1/log_jobs/log_job_info_recruits.txt create mode 100644 map_v1/log_jobs/log_job_info_recruits_once.txt create mode 100644 map_v1/log_jobs/log_job_ratings.txt create mode 100644 map_v1/log_jobs/log_job_recruitments_all.txt create mode 100644 map_v1/log_jobs/log_job_recruitments_country.txt create mode 100644 map_v1/log_jobs/log_job_recruitments_milcom.txt create mode 100644 map_v1/log_jobs/log_job_recruitments_mildis.txt create mode 100644 map_v1/log_jobs/log_job_recruitments_region.txt create mode 100644 map_v1/metadata/pipeline-run-configuration/local.json create mode 100644 map_v1/metadata/rdbms/118_ervu-person-registry.json create mode 100644 map_v1/metadata/rdbms/118_ervu-subpoena-registry.json create mode 100644 map_v1/metadata/rdbms/119_ervu-dashboard-copy.json create mode 100644 map_v1/metadata/rdbms/ervu-dashboard.json create mode 100644 map_v1/metadata/rdbms/ervu-journal.json create mode 100644 map_v1/metadata/rdbms/ervu_person_registry.json create mode 100644 map_v1/metadata/rdbms/incident.json create mode 100644 map_v1/metadata/rdbms/metrics.json create mode 100644 map_v1/metadata/rdbms/postgres.appeal-document-service.json create mode 100644 map_v1/metadata/rdbms/postgres.decision-document-service.json create mode 100644 map_v1/metadata/rdbms/postgres.person_registry.json create mode 100644 map_v1/metadata/rdbms/postgres.subpoena.json create mode 100644 map_v1/metadata/workflow-log/workflow-logging.json create mode 100644 map_v1/metadata/workflow-run-configuration/local.json create mode 100644 map_v1/mil_com/job_recruitments_milcom.hwf create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl create mode 100644 map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl create mode 100644 map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl create mode 100644 map_v1/mil_com/parameters/add_schema.hpl create mode 100644 map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl create mode 100644 map_v1/mil_com/parameters/array_recruitments.hpl create mode 100644 map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl create mode 100644 map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl create mode 100644 map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl create mode 100644 map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl create mode 100644 map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf create mode 100644 map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl create mode 100644 map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl create mode 100644 map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl create mode 100644 map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl create mode 100644 map_v1/mil_district/appeals.reasons_appeal(m_d).hpl create mode 100644 map_v1/mil_district/appeals.topic_appeal(m_d).hpl create mode 100644 map_v1/mil_district/array_mildis.hwf create mode 100644 map_v1/mil_district/job_get_rows_mildis.hwf create mode 100644 map_v1/mil_district/job_recruitments_mildis.hwf create mode 100644 map_v1/mil_district/main_dashboard.appeals(m_d).hpl create mode 100644 map_v1/mil_district/main_dashboard.recruitment_campaign(m_d).hpl create mode 100644 map_v1/mil_district/main_dashboard.total_registered(m_d).hpl create mode 100644 map_v1/mil_district/main_dashboard.waiting_registration(m_d).hpl create mode 100644 map_v1/mil_district/recruitment_campaign.appeals(m_d).hpl create mode 100644 map_v1/mil_district/recruitment_campaign.subpoenas(m_d).hpl create mode 100644 map_v1/mil_district/rows_id-array_mildis.hpl create mode 100644 map_v1/mil_district/select_recruitments_mildis(m_d).hpl create mode 100644 map_v1/mil_district/select_recruitments_mildis(m_d)rows.hpl create mode 100644 map_v1/mil_district/total_registered.age(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.busyness(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.child_minor(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.driver_license(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.education_level(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.marital_status(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.reg_mil_cat(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.removed_registry(m_d).hpl create mode 100644 map_v1/mil_district/total_registered.subpoenas(m_d).hpl create mode 100644 map_v1/pack.pub_recruitment.hpl create mode 100644 map_v1/predictive_metrics/data_collection.hpl create mode 100644 map_v1/predictive_metrics/next_lvl_org_pm.hpl create mode 100644 map_v1/predictive_metrics/predictive.hwf create mode 100644 map_v1/predictive_metrics/predictive_data.hpl create mode 100644 map_v1/project-config.json create mode 100644 map_v1/ratings/job_ratings.hwf create mode 100644 map_v1/ratings/ratings.appear_subpoena.hpl create mode 100644 map_v1/ratings/ratings.conscription_info.hpl create mode 100644 map_v1/ratings/ratings.consideration_complaint.hpl create mode 100644 map_v1/recording_date/job_last_recording_date.hwf create mode 100644 map_v1/recording_date/last_recording_date.hpl create mode 100644 map_v1/region/appeals.reasons_appeal(reg).hpl create mode 100644 map_v1/region/appeals.review_rating.hpl create mode 100644 map_v1/region/appeals.topic_appeal(reg).hpl create mode 100644 map_v1/region/array_reg.hwf create mode 100644 map_v1/region/auxiliary/array_region.hpl create mode 100644 map_v1/region/auxiliary/update_appeal_recruitments.hpl create mode 100644 map_v1/region/job_get_rows_reg.hwf create mode 100644 map_v1/region/job_recruitments_region.hwf create mode 100644 map_v1/region/main_dashboard.appeals(reg).hpl create mode 100644 map_v1/region/main_dashboard.recruitment_campaign(reg).hpl create mode 100644 map_v1/region/main_dashboard.total_registered(reg).hpl create mode 100644 map_v1/region/main_dashboard.waiting_registration(reg).hpl create mode 100644 map_v1/region/recruitment_campaign.appeals(reg).hpl create mode 100644 map_v1/region/recruitment_campaign.subpoenas(reg).hpl create mode 100644 map_v1/region/rows_id-array_reg.hpl create mode 100644 map_v1/region/select_recruitments_region(reg).hpl create mode 100644 map_v1/region/select_recruitments_region(reg)rows.hpl create mode 100644 map_v1/region/total_registered.age(reg).hpl create mode 100644 map_v1/region/total_registered.busyness(reg).hpl create mode 100644 map_v1/region/total_registered.child_minor(reg).hpl create mode 100644 map_v1/region/total_registered.driver_license(reg).hpl create mode 100644 map_v1/region/total_registered.education_level(reg).hpl create mode 100644 map_v1/region/total_registered.marital_status(reg).hpl create mode 100644 map_v1/region/total_registered.reg_mil_cat(reg).hpl create mode 100644 map_v1/region/total_registered.removed_registry(reg).hpl create mode 100644 map_v1/region/total_registered.subpoenas(reg).hpl create mode 100644 map_v1/supportive_jobs/clearing_logs.hwf create mode 100644 map_v1/supportive_jobs/percent_for_waiting_reg.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl diff --git a/map_v1/connections/db.json b/map_v1/connections/db.json new file mode 100644 index 0000000..eb00421 --- /dev/null +++ b/map_v1/connections/db.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.10.31.118", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu-person-registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "postgres", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-recr", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "Encrypted 2be98caba1cd2df80aa0aa672d193bdde", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.10.31.118", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "appeal-document-service", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "postgres", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.10.31.118", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu-decision-document-service", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "postgres", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.10.31.118", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu-subpoena-registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "postgres", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/db_mln118_to_local.json b/map_v1/connections/db_mln118_to_local.json new file mode 100644 index 0000000..223067c --- /dev/null +++ b/map_v1/connections/db_mln118_to_local.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.10.30.118", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-test", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/db_uat.json b/map_v1/connections/db_uat.json new file mode 100644 index 0000000..83656a5 --- /dev/null +++ b/map_v1/connections/db_uat.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "readonly", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/db_uat_to_here.json b/map_v1/connections/db_uat_to_here.json new file mode 100644 index 0000000..3a818ca --- /dev/null +++ b/map_v1/connections/db_uat_to_here.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-recr", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "readonly", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/db_uat_to_here_mln.json b/map_v1/connections/db_uat_to_here_mln.json new file mode 100644 index 0000000..538792f --- /dev/null +++ b/map_v1/connections/db_uat_to_here_mln.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.10.30.118", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-recr", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "readonly", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/db_uat_to_local_mln.json b/map_v1/connections/db_uat_to_local_mln.json new file mode 100644 index 0000000..72c88ec --- /dev/null +++ b/map_v1/connections/db_uat_to_local_mln.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "10.65.244.3", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-test", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.65.244.45", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "6432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "readonly", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/connections/mo_db.json b/map_v1/connections/mo_db.json new file mode 100644 index 0000000..7b50151 --- /dev/null +++ b/map_v1/connections/mo_db.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "person-dbhost", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "4444", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "person-dbname", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "person-dbuser", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "Encrypted 2be98afb80fd5818ba554aa72ce93bcc9", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "dashboard-dbhost", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "1111", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "dashboard-dbname", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "dashboard-dbuser", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "Encrypted 2daf9dca008c89396af54aa72ce93bcc9", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "appeal-dbhost", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "2222", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "appeal-dbname", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "appeal-dbuser", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "Encrypted 2be98afa91ad79785a754aa72ce93bcc9", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "decision-dbhost", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "3333", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "decision-dbname", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "decision-dbuser", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "Encrypted 2befccaab03d49b8ba554aa72ce93bcc9", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "subpoena-dbhost", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "5555", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "subpoena-dbname", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "subpoena-dbuser", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "Encrypted 2beebdaaa1ac8978aaa54aa72ce93bcc9", + "description" : "" + } ] +} \ No newline at end of file diff --git a/map_v1/country/appeals.main_profile.hpl b/map_v1/country/appeals.main_profile.hpl new file mode 100644 index 0000000..6ceb452 --- /dev/null +++ b/map_v1/country/appeals.main_profile.hpl @@ -0,0 +1,200 @@ + + + + appeals.main_profile + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/11/11 16:52:36.340 + - + 2024/11/11 16:52:36.340 + + + + + + Table input appel-doc + Merge join + Y + + + Table input person-reg + Merge join + Y + + + Merge join + Memory group by + Y + + + + Table input appel-doc + TableInput + + Y + + 1 + + none + + + postgres.appeal-document-service + N + 0 + SELECT +recruit_id +FROM public.appeal_document + N + + + 480 + 160 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + + + N + N + N + N + + Y + N + N + + + N + Y + N + Y + + + 1104 + 160 + + + + Memory group by + MemoryGroupBy + + Y + + 1 + + none + + + + + N + + + + + 800 + 160 + + + + Sort rows + SortRows + + Y + + 1 + + none + + + N + ${java.io.tmpdir} + + + out + 1000000 + N + + + 960 + 160 + + + + Table input person-reg + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + recruit_id +FROM public.recruits r +JOIN public.recruits_info ri + ON ri.recruit_id = r.id +WHERE r.current_recruitment_id IS NOT NULL + AND r.target_recruitment_id IS NOT NULL + N + + + 480 + 288 + + + + Merge join + MergeJoin + + Y + + 1 + + none + + + LEFT OUTER + + recruit_id + + + recruit_id + + Table input appel-doc + Table input person-reg + + + 640 + 160 + + + + + + diff --git a/map_v1/country/appeals.reasons_appeal.hpl b/map_v1/country/appeals.reasons_appeal.hpl new file mode 100644 index 0000000..76c5740 --- /dev/null +++ b/map_v1/country/appeals.reasons_appeal.hpl @@ -0,0 +1,317 @@ + + + + appeals.reasons_appeal + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/28 11:14:23.116 + - + 2025/01/28 11:14:23.116 + + + + + + Execute SQL script + Table input (subpoena) РФ/осень + Y + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (appeals.reasons_appeal) + Y + + + Table input (subpoena) РФ/осень + Get variables 2 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.reasons_appeal +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 336 + 448 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 800 + 448 + + + + Insert / update (appeals.reasons_appeal) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + schema + schema + + + = + recruitment_id + REG_ID + + appeals +
reasons_appeal
+ + recruitment_id + recruitment_id + N + + + schema + schema + N + + + appeal + appeal + Y + + + incorrect_inf + incorrect_inf + Y + + + incorrect_inf_percent + incorrect_inf_percent + Y + + + sending_documents + sending_documents + Y + + + sending_documents_percent + sending_documents_percent + Y + + + decision_disagreement + decision_disagreement + Y + + + decision_disagreement_persent + decision_disagreement_persent + Y + + + complaint_withdrawal + complaint_withdrawal + Y + + + complaint_withdrawal_percent + complaint_withdrawal_percent + Y + + + N + + + 1296 + 448 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 448 + + + + Table input (subpoena) РФ/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(appeal), 0) appeal, + COALESCE(SUM(incorrect_inf), 0) incorrect_inf, + COALESCE(SUM(sending_documents), 0) sending_documents, + COALESCE(SUM(decision_disagreement), 0) decision_disagreement, + COALESCE(SUM(complaint_withdrawal), 0) complaint_withdrawal, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(incorrect_inf) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) incorrect_inf_percent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(sending_documents) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) sending_documents_percent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(decision_disagreement) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) decision_disagreement_persent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(complaint_withdrawal) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) complaint_withdrawal_percent, + '${REG_ID}' AS recruitment_id, + 'Ministry' AS schema +FROM appeals.reasons_appeal +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE; + Y + + + 576 + 448 + + + + + +
diff --git a/map_v1/country/appeals.topic_appeal.hpl b/map_v1/country/appeals.topic_appeal.hpl new file mode 100644 index 0000000..1b596fe --- /dev/null +++ b/map_v1/country/appeals.topic_appeal.hpl @@ -0,0 +1,300 @@ + + + + appeals.topic_appeal + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/28 11:14:23.116 + - + 2025/01/28 11:14:23.116 + + + + + + Execute SQL script + Table input (subpoena) РФ/осень + Y + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (appeals.topic_appeal) + Y + + + Table input (subpoena) РФ/осень + Get variables 2 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.topic_appeal +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 336 + 448 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 800 + 448 + + + + Insert / update (appeals.topic_appeal) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + schema + schema + + + + = + recruitment_id + REG_ID + + + appeals + topic_appeal
+ + recruitment_id + recruitment_id + N + + + schema + schema + N + + + registration + registration + Y + + + registration_percent + registration_percent + Y + + + sabpoena + sabpoena + Y + + + sabpoena_percent + sabpoena_percent + Y + + + temporary_measures + temporary_measures + Y + + + temporary_measures_percent + temporary_measures_percent + Y + + + appear + appear + Y + +
+ N + + + 1296 + 448 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 448 + + + + Table input (subpoena) РФ/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(appear), 0) appear, + COALESCE(SUM(registration), 0) registration, + COALESCE(SUM(sabpoena), 0) sabpoena, + COALESCE(SUM(temporary_measures), 0) temporary_measures, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(registration) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) registration_percent, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(sabpoena) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) sabpoena_percent, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(temporary_measures) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) temporary_measures_percent, + '${REG_ID}' AS recruitment_id, + 'Ministry' AS schema +FROM appeals.topic_appeal +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE; + Y + + + 576 + 448 + + + + + +
diff --git a/map_v1/country/job_recruitments_country.hwf b/map_v1/country/job_recruitments_country.hwf new file mode 100644 index 0000000..443e47b --- /dev/null +++ b/map_v1/country/job_recruitments_country.hwf @@ -0,0 +1,1084 @@ + + + job_recruitments_country + Y + + + + 0 + - + 2024/08/15 16:02:12.821 + - + 2024/08/15 16:02:12.821 + + + REG_ID + + + + + VK_ARRAY + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 1088 + + + + main_dashboard.appeals + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.appeals.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1360 + 624 + + + + Success + + SUCCESS + + N + 1536 + 624 + + + + main_dashboard.recruitment_campaign + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.recruitment_campaign.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 704 + + + + Success 2 + + SUCCESS + + N + 1536 + 704 + + + + main_dashboard.total_registered + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.total_registered.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 768 + + + + Success 3 + + SUCCESS + + N + 1536 + 768 + + + + main_dashboard.waiting_registration + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.waiting_registration.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 848 + + + + Success 4 + + SUCCESS + + N + 1536 + 848 + + + + recruitment_campaign.subpoenas + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/recruitment_campaign.subpoenas.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 928 + + + + Success 6 + + SUCCESS + + N + 1536 + 928 + + + + total_registered.reg_mil_cat + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.reg_mil_cat.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1008 + + + + Success 7 + + SUCCESS + + N + 1536 + 1008 + + + + total_registered.removed_registry + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.removed_registry.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1088 + + + + Success 8 + + SUCCESS + + N + 1536 + 1088 + + + + total_registered.subpoenas + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.subpoenas.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1152 + + + + Success 9 + + SUCCESS + + N + 1536 + 1152 + + + + total_registered.driver_license + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.driver_license.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1216 + + + + Success 10 + + SUCCESS + + N + 1536 + 1216 + + + + total_registered.child_minor + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.child_minor.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1280 + + + + Success 11 + + SUCCESS + + N + 1536 + 1280 + + + + total_registered.age + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.age.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1344 + + + + Success 12 + + SUCCESS + + N + 1536 + 1344 + + + + total_registered.marital_status + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.marital_status.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1408 + + + + Success 13 + + SUCCESS + + N + 1536 + 1408 + + + + total_registered.education_level + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.education_level.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1488 + + + + Success 14 + + SUCCESS + + N + 1536 + 1488 + + + + total_registered.busyness + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.busyness.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1568 + + + + Success 15 + + SUCCESS + + N + 1536 + 1568 + + + + recruitment_campaign.appeals + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/recruitment_campaign.appeals.hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1360 + 1632 + + + + Success 16 + + SUCCESS + + N + 1536 + 1632 + + + + select_recruitments_country + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/country/select_recruitments_country.hpl + Basic + + Y + + N + local + N + N + Y + Y + 768 + 1088 + + + + appeals.reasons_appeal.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/country/appeals.reasons_appeal.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1360 + 544 + + + + Success 5 + + SUCCESS + + N + 1536 + 544 + + + + appeals.topic_appeal.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/country/appeals.topic_appeal.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1360 + 464 + + + + Success 17 + + SUCCESS + + N + 1536 + 464 + + + + + + main_dashboard.recruitment_campaign + Success 2 + Y + Y + N + + + main_dashboard.total_registered + Success 3 + Y + Y + N + + + main_dashboard.waiting_registration + Success 4 + Y + Y + N + + + recruitment_campaign.subpoenas + Success 6 + Y + Y + N + + + total_registered.reg_mil_cat + Success 7 + Y + Y + N + + + total_registered.removed_registry + Success 8 + Y + Y + N + + + total_registered.subpoenas + Success 9 + Y + Y + N + + + total_registered.driver_license + Success 10 + Y + Y + N + + + total_registered.child_minor + Success 11 + Y + Y + N + + + total_registered.age + Success 12 + Y + Y + N + + + total_registered.marital_status + Success 13 + Y + Y + N + + + total_registered.education_level + Success 14 + Y + Y + N + + + total_registered.busyness + Success 15 + Y + Y + N + + + recruitment_campaign.appeals + Success 16 + Y + Y + N + + + Start + select_recruitments_country + Y + Y + Y + + + main_dashboard.appeals + Success + Y + Y + N + + + select_recruitments_country + main_dashboard.appeals + Y + Y + N + + + select_recruitments_country + main_dashboard.recruitment_campaign + Y + Y + N + + + select_recruitments_country + main_dashboard.total_registered + Y + Y + N + + + select_recruitments_country + main_dashboard.waiting_registration + Y + Y + N + + + select_recruitments_country + recruitment_campaign.subpoenas + Y + Y + N + + + select_recruitments_country + total_registered.reg_mil_cat + Y + Y + N + + + select_recruitments_country + total_registered.removed_registry + Y + Y + N + + + select_recruitments_country + total_registered.subpoenas + Y + Y + N + + + select_recruitments_country + total_registered.driver_license + Y + Y + N + + + select_recruitments_country + total_registered.child_minor + Y + Y + N + + + select_recruitments_country + total_registered.age + Y + Y + N + + + select_recruitments_country + total_registered.marital_status + Y + Y + N + + + select_recruitments_country + total_registered.education_level + Y + Y + N + + + select_recruitments_country + total_registered.busyness + Y + Y + N + + + select_recruitments_country + recruitment_campaign.appeals + Y + Y + N + + + appeals.reasons_appeal.hpl + Success 5 + Y + Y + N + + + select_recruitments_country + appeals.reasons_appeal.hpl + Y + Y + N + + + appeals.topic_appeal.hpl + Success 17 + Y + Y + N + + + select_recruitments_country + appeals.topic_appeal.hpl + Y + Y + N + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/country/main_dashboard.appeals.hpl b/map_v1/country/main_dashboard.appeals.hpl new file mode 100644 index 0000000..7ee6bfe --- /dev/null +++ b/map_v1/country/main_dashboard.appeals.hpl @@ -0,0 +1,298 @@ + + + + main_dashboard.appeals + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (main_dashboard.appeals) 2 + Y + + + Table input (appeal_document) РФ + Get variables 3 2 + Y + + + Execute SQL script + Table input (appeal_document) РФ + Y + + + + Execute SQL script + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.appeals +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 336 + 272 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 768 + 272 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + main_dashboard + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + average_rating + average_rating + Y + + + average_to_face + average_to_face + Y + + + "average_EPGU" + average_epgu + Y + + + average_to_face_percent + average_to_face_percent + Y + + + "average_EPGU_percent" + average_epgu_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ Y + + + 1120 + 272 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 912 + 272 + + + + Table input (appeal_document) РФ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_appeals), 0) total_appeals, + COALESCE(SUM(resolved), 0) resolved, + COALESCE(ROUND(AVG(average_consideration) FILTER (where average_consideration!=0),1), 0) average_consideration, + COALESCE(ROUND(AVG(average_rating)FILTER (where average_rating!=0),1), 0) average_rating, + COALESCE(SUM(average_to_face), 0) average_to_face, + COALESCE(SUM("average_EPGU"), 0) average_epgu, + COALESCE( + CASE + WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0 + THEN ROUND((SUM(average_to_face) / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2) + ELSE 0 + END, + 0 + ) average_to_face_percent, + COALESCE( + CASE + WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0 + THEN ROUND((SUM("average_EPGU") / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2) + ELSE 0 + END, + 0 + ) average_epgu_percent, + '${REG_ID}' AS recruitment_id, + 'Ministry' AS schema +FROM main_dashboard.appeals +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE; + Y + + + 560 + 272 + + + + + +
diff --git a/map_v1/country/main_dashboard.recruitment_campaign.hpl b/map_v1/country/main_dashboard.recruitment_campaign.hpl new file mode 100644 index 0000000..69ab311 --- /dev/null +++ b/map_v1/country/main_dashboard.recruitment_campaign.hpl @@ -0,0 +1,336 @@ + + + + main_dashboard.recruitment_campaign + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.recruitment_campaign) + Y + + + Table input (subpoena) РФ/осень + Get variables 2 2 + Y + + + Execute SQL script + Table input (subpoena) РФ/осень + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 784 + 480 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1248 + 480 + + + + Insert / update (main_dashboard.recruitment_campaign) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + spring_autumn + spring_autumn + + + = + recruitment_id + REG_ID + + + = + schema + schema + + main_dashboard + recruitment_campaign
+ + subpoenas_sent + count_subpoena + Y + + + appeared_on_subpoenas + count_appeared + Y + + + not_appeared_on_subpoenas + count_not_appeared + Y + + + new_recruits + new_recruits + Y + + + postponement_have_right + postponement_have_right + Y + + + postponement_granted + postponement_granted + Y + + + appeared_on_subpoenas_percent + appeared_on_subpoenas_percent + Y + + + not_appeared_on_subpoenas_percent + not_appeared_on_subpoenas_percent + Y + + + postponement_have_right_percent + postponement_have_right_percent + Y + + + postponement_granted_percent + postponement_granted_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1744 + 480 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1456 + 480 + + + + Table input (subpoena) РФ/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoenas_sent), 0) count_subpoena, + COALESCE(SUM(appeared_on_subpoenas), 0) count_appeared, + COALESCE(SUM(not_appeared_on_subpoenas), 0) count_not_appeared, + COALESCE(SUM(new_recruits), 0) new_recruits, + COALESCE(SUM(postponement_have_right), 0) postponement_have_right, + COALESCE(SUM(postponement_granted), 0) postponement_granted, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(not_appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_have_right) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_have_right_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_granted) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_granted_percent, + '${REG_ID}' AS recruitment_id, + spring_autumn, + 'Ministry' AS schema +FROM main_dashboard.recruitment_campaign +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 1024 + 480 + + + + + +
diff --git a/map_v1/country/main_dashboard.total_registered.hpl b/map_v1/country/main_dashboard.total_registered.hpl new file mode 100644 index 0000000..fb16125 --- /dev/null +++ b/map_v1/country/main_dashboard.total_registered.hpl @@ -0,0 +1,323 @@ + + + + main_dashboard.total_registered + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.total_registered) + Y + + + Execute SQL script + Table input (person_registry) РФ + Y + + + + Execute SQL script + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 240 + 368 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 624 + 368 + + + + Insert / update (main_dashboard.total_registered) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + convicts + convicts + N + +
+ N + + + 1008 + 368 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 368 + + + + Table input (person_registry) РФ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_registered), 0) total_count, + COALESCE(SUM("total_registered_M"), 0) male_count, + COALESCE(SUM("total_registered_W"), 0) female_count, + COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion, + COALESCE(SUM(contract_criterion), 0) contract_criterion, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${REG_ID}' AS recruitment_id, + convicts, + 'Ministry' AS schema +FROM main_dashboard.total_registered +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY convicts; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/country/main_dashboard.waiting_registration.hpl b/map_v1/country/main_dashboard.waiting_registration.hpl new file mode 100644 index 0000000..8bf390e --- /dev/null +++ b/map_v1/country/main_dashboard.waiting_registration.hpl @@ -0,0 +1,313 @@ + + + + main_dashboard.waiting_registration + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input 2 (person_registry) РФ + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.waiting_registration) + Y + + + Execute SQL script + Table input 2 (person_registry) РФ + Y + + + + Execute SQL script + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 416 + 352 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 832 + 352 + + + + Insert / update (main_dashboard.waiting_registration) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + + = + schema + schema + + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1360 + 352 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1040 + 352 + + + + Table input 2 (person_registry) РФ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(waiting_registration), 0) waiting_count, + COALESCE(SUM("waiting_registration_M"), 0) male_count, + COALESCE(SUM("waiting_registration_W"), 0) female_count, + COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion, + COALESCE(SUM(contract_criterion), 0) contract_criterion, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${REG_ID}' AS recruitment_id, + 'Ministry' AS schema +FROM main_dashboard.waiting_registration +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE; + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/country/ratings.consideration_complaint.hpl b/map_v1/country/ratings.consideration_complaint.hpl new file mode 100644 index 0000000..94bc346 --- /dev/null +++ b/map_v1/country/ratings.consideration_complaint.hpl @@ -0,0 +1,117 @@ + + + ratings.consideration_complaint + Y + + + + Normal + 0 + / + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input (appeal_document) РФ + Insert / update (main_dashboard.appeals) + Y + + + + Insert / update (main_dashboard.appeals) + InsertUpdate + + Y + + 1 + + none + + + ervu-dashboard + 100 + N + + main_dashboard + appeals
+ + recruitment_id + recruitment_id + = + + + + total_appeals + total_appeals + Y + + + recruitment_id + recruitment_id + N + +
+ + + + 752 + 176 + Y + +
+ + Table input (appeal_document) РФ + TableInput + + Y + + 1 + + none + + + postgres.appeal-document-service + WITH +t1 AS ( + SELECT COUNT(*) AS total_appeals + FROM public.appeal_document +) -- нет причин обжалований +SELECT + t1.total_appeals, + '00' AS recruitment_id, + 0 AS incorrect_inf, + 0 AS no_data, + 0 AS other, + 0 AS incorrect_inf_percent, + 0 AS no_data_percent, + 0 AS other_percent +FROM t1; + 0 + + N + N + N + + + + 400 + 176 + Y + + + + + +
diff --git a/map_v1/country/recruitment_campaign.appeals.hpl b/map_v1/country/recruitment_campaign.appeals.hpl new file mode 100644 index 0000000..c0e04c4 --- /dev/null +++ b/map_v1/country/recruitment_campaign.appeals.hpl @@ -0,0 +1,306 @@ + + + + recruitment_campaign.appeals + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (appeal_document) РФ/осень + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.appeals) + Y + + + Execute SQL script + Table input (appeal_document) РФ/осень + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 208 + 256 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 656 + 256 + + + + Insert / update (main_dashboard.appeals) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + spring_autumn + spring_autumn + + + = + schema + schema + + recruitment_campaign + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + not_resolved + not_resolved + Y + + + not_resolved_percent + not_resolved_percent + Y + + + average_rating + average_rating + Y + + + resolved_percent + resolved_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1104 + 256 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 864 + 256 + + + + Table input (appeal_document) РФ/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_appeals), 0) total_appeals, + coalesce(ROUND(avg(average_consideration) FILTER (where average_consideration!=0),1),0) as average_consideration, + COALESCE(SUM(resolved), 0) resolved, + COALESCE(SUM(not_resolved), 0) not_resolved, + COALESCE( + CASE + WHEN SUM(total_appeals) > 0 + THEN ROUND((SUM(not_resolved) / SUM(total_appeals) * 100), 2) + ELSE 0 + END, + 0 + ) not_resolved_percent, + + coalesce(ROUND(avg(average_rating) FILTER (where average_rating!=0),1),0) as average_rating, + COALESCE( + CASE + WHEN SUM(total_appeals) > 0 + THEN ROUND((SUM(resolved) / SUM(total_appeals) * 100), 2) + ELSE 0 + END, + 0 + ) resolved_percent, + + '${REG_ID}' AS recruitment_id, + spring_autumn, + 'Ministry' AS schema +FROM recruitment_campaign.appeals +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 416 + 256 + + + + + +
diff --git a/map_v1/country/recruitment_campaign.subpoenas.hpl b/map_v1/country/recruitment_campaign.subpoenas.hpl new file mode 100644 index 0000000..8ff426a --- /dev/null +++ b/map_v1/country/recruitment_campaign.subpoenas.hpl @@ -0,0 +1,420 @@ + + + + recruitment_campaign.subpoenas + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/09 13:13:59.825 + - + 2024/08/09 13:13:59.825 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (subpoena) осень/РФ + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (recruitment_campaign.subpoenas) + Y + + + Execute SQL script + Table input (subpoena) осень/РФ + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 192 + 336 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 640 + 336 + + + + Insert / update (recruitment_campaign.subpoenas) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + spring_autumn + spring_autumn + + + = + schema + schema + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + restrictions_applied + count_restrictions_applied + Y + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + recruitment_id + recruitment_id + N + + + rest + rest + Y + + + spring_autumn + spring_autumn + N + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1104 + 336 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 848 + 336 + + + + Table input (subpoena) осень/РФ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + COALESCE(SUM(rest), 0) rest, + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${REG_ID}' AS recruitment_id, + spring_autumn, + 'Ministry' AS schema +FROM recruitment_campaign.subpoenas +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 416 + 336 + + + + + +
diff --git a/map_v1/country/select_recruitments_country.hpl b/map_v1/country/select_recruitments_country.hpl new file mode 100644 index 0000000..de9cad8 --- /dev/null +++ b/map_v1/country/select_recruitments_country.hpl @@ -0,0 +1,75 @@ + + + + select_recruitments_country + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/15 14:58:19.728 + - + 2024/08/15 14:58:19.728 + + + + + + Table input/регион + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 512 + 208 + + + + Table input/регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT 'f03fc8c0-2ce7-4121-a306-f82d65ea029d' AS RECRUITMENT_REG_ID, + array_agg(recruitment_dstr_id) AS VK_ARRAY_ID +FROM ervu_dashboard.array_mildis + + N + + + 336 + 208 + + + + + + diff --git a/map_v1/country/total_registered.age.hpl b/map_v1/country/total_registered.age.hpl new file mode 100644 index 0000000..6a9aaed --- /dev/null +++ b/map_v1/country/total_registered.age.hpl @@ -0,0 +1,430 @@ + + + + total_registered.age + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/все/на учете + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.age) + Y + + + Execute SQL script + Table input (person_registry) РФ/все/на учете + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 848 + 560 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1408 + 560 + + + + Insert / update (total_registered.age) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + schema + schema + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + schema + schema + N + + + convicts + convicts + N + + + total_count + total_count + Y + +
+ Y + + + 1904 + 560 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1616 + 560 + + + + Table input (person_registry) РФ/все/на учете + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + +SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM("17_years"), 0) "17_year_count", + COALESCE(SUM("18-26_years"), 0) "18-26_year_count", + COALESCE(SUM("27-30_years"), 0) "27-30_year_count", + COALESCE(SUM("31-35_years"), 0) "31-35_year_count", + COALESCE(SUM("36-40_years"), 0) "36-40_year_count", + COALESCE(SUM("41-45_years"), 0) "41-45_year_count", + COALESCE(SUM("51+_years"), 0) "51+_year_count", + COALESCE(SUM("46-50_years"), 0) "46-50_year_count", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("17_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "17_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("18-26_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "18-26_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("27-30_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "27-30_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("31-35_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "31-35_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("36-40_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "36-40_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("41-45_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "41-45_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("46-50_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "46-50_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("51+_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "51+_year_percent", + + '${REG_ID}' AS recruitment_id, + registered, + "all_M_W" AS gender, + convicts, + 'Ministry' AS schema +FROM total_registered.age +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 1104 + 560 + + + + + +
diff --git a/map_v1/country/total_registered.busyness.hpl b/map_v1/country/total_registered.busyness.hpl new file mode 100644 index 0000000..34e09b5 --- /dev/null +++ b/map_v1/country/total_registered.busyness.hpl @@ -0,0 +1,335 @@ + + + + total_registered.busyness + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/все/на учете + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.busyness) + Y + + + Execute SQL script + Table input (person_registry) РФ/все/на учете + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 112 + 480 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 736 + 480 + + + + Insert / update (total_registered.busyness) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + schema + schema + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1200 + 480 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 944 + 480 + + + + Table input (person_registry) РФ/все/на учете + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(study), 0) study, + COALESCE(SUM(work), 0) work, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) study_percent, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) work_percent, + + COALESCE(SUM(not_work), 0) no_info, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) no_info_percent, + + COALESCE(SUM(busyness), 0) total_people, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered, + convicts, + 'Ministry' AS schema +FROM total_registered.busyness +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 448 + 480 + + + + + +
diff --git a/map_v1/country/total_registered.child_minor.hpl b/map_v1/country/total_registered.child_minor.hpl new file mode 100644 index 0000000..4a42e43 --- /dev/null +++ b/map_v1/country/total_registered.child_minor.hpl @@ -0,0 +1,360 @@ + + + + total_registered.child_minor + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry)РФ/все + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.child_minor) + Y + + + Execute SQL script + Table input (person_registry)РФ/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 480 + 352 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 992 + 352 + + + + Insert / update (total_registered.child_minor) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + schema + schema + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + convicts + convicts + N + + + total_count + total_count + Y + +
+ N + + + 1488 + 352 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1200 + 352 + + + + Table input (person_registry)РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM(no_child), 0) no_children, + COALESCE(SUM("1_child"), 0) one_child, + COALESCE(SUM("2_child"), 0) two_children, + COALESCE(SUM("3_child"), 0) three_children, + COALESCE(SUM("4_more_child"), 0) four_or_more_children, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(no_child) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) no_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("1_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) one_child_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("2_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) two_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("3_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) three_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("4_more_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) four_or_more_children_percent, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Ministry' AS schema +FROM total_registered.child_minor +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 768 + 352 + + + + + +
diff --git a/map_v1/country/total_registered.driver_license.hpl b/map_v1/country/total_registered.driver_license.hpl new file mode 100644 index 0000000..9bd5d4e --- /dev/null +++ b/map_v1/country/total_registered.driver_license.hpl @@ -0,0 +1,379 @@ + + + + total_registered.driver_license + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/все + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.driver_license) 2 + Y + + + Execute SQL script + Table input (person_registry) РФ/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 608 + 400 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1104 + 400 + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + schema + schema + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + nope_repcent + nope_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + convicts + convicts + N + + + total_count + total + Y + +
+ Y + + + 1584 + 400 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1312 + 400 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total, + COALESCE(SUM("A"), 0) a, + COALESCE(SUM("B"), 0) b, + COALESCE(SUM("C"), 0) c, + COALESCE(SUM("D"), 0) d, + COALESCE(SUM("E"), 0) e, + COALESCE(SUM(nope), 0) nope, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("A") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) a_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("B") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) b_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("C") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) c_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("D") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) d_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("E") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) e_percent, -- нет такой категории + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(nope) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) nope_percent, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Ministry' AS schema +FROM total_registered.driver_license +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 864 + 400 + + + + + +
diff --git a/map_v1/country/total_registered.education_level.hpl b/map_v1/country/total_registered.education_level.hpl new file mode 100644 index 0000000..1b075c5 --- /dev/null +++ b/map_v1/country/total_registered.education_level.hpl @@ -0,0 +1,342 @@ + + + + total_registered.education_level + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/все + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.education_level) + Y + + + Execute SQL script + Table input (person_registry) РФ/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 176 + 320 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 656 + 320 + + + + Insert / update (total_registered.education_level) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + schema + schema + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1136 + 320 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 864 + 320 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(higher), 0) higher, + COALESCE(SUM(average), 0) average_prof, + COALESCE(SUM(only_general), 0) only_general, + COALESCE(SUM(no_data), 0) count_nodata, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(higher) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) higher_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(average) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) average_prof_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(only_general) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) only_general_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(no_data) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) count_nodata_percentage, + + COALESCE(SUM(education_level), 0) total, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Ministry' AS schema +FROM total_registered.education_level +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 432 + 320 + + + + + +
diff --git a/map_v1/country/total_registered.marital_status.hpl b/map_v1/country/total_registered.marital_status.hpl new file mode 100644 index 0000000..23e99f5 --- /dev/null +++ b/map_v1/country/total_registered.marital_status.hpl @@ -0,0 +1,322 @@ + + + + total_registered.marital_status + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/все + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.marital_status) + Y + + + Execute SQL script + Table input (person_registry) РФ/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 352 + 272 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 880 + 272 + + + + Insert / update (total_registered.marital_status) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + "all_M_W" + gender + + + = + schema + schema + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + schema + schema + N + + + convicts + convicts + N + + + other + other + Y + + + other_percent + other_percent + Y + +
+ Y + + + 1392 + 272 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1088 + 272 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(married), 0) married, + COALESCE(SUM(not_married), 0) not_married, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(not_married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) not_married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(other) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + COALESCE(SUM(marital_status), 0) total, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Ministry' AS schema +FROM total_registered.marital_status +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 608 + 272 + + + + + +
diff --git a/map_v1/country/total_registered.reg_mil_cat.hpl b/map_v1/country/total_registered.reg_mil_cat.hpl new file mode 100644 index 0000000..50afd53 --- /dev/null +++ b/map_v1/country/total_registered.reg_mil_cat.hpl @@ -0,0 +1,368 @@ + + + + total_registered.reg_mil_cat + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (person_registry) РФ/на учете + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.reg_mil_cat) + Y + + + Execute SQL script + Table input (person_registry) РФ/на учете + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 672 + 400 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1184 + 400 + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + mil_reg + mil_reg + + + = + schema + schema + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + + + schema + schema + N + +
+ N + + + 1648 + 400 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1392 + 400 + + + + Table input (person_registry) РФ/на учете + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(first_reg_17), 0) first_reg_17, + COALESCE(SUM(first_reg_18), 0) first_reg_18, + COALESCE(SUM("mil_spec_W"), 0) mil_spec_w, + COALESCE(SUM(returned_dep_liberty), 0) returned_dep_liberty, + COALESCE(SUM(punished), 0) punished, + COALESCE(SUM(received_citizenship), 0) received_citizenship, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_17) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + first_reg_17_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_18) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + first_reg_18_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(returned_dep_liberty) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + returned_dep_liberty_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM("mil_spec_W") / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + mil_spec_w_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(punished) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + punished_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(received_citizenship) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) + received_citizenship_percent, + '${REG_ID}'::uuid AS recruitment_id, + mil_reg, + 'Ministry' AS schema +FROM total_registered.reg_mil_cat +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 944 + 400 + + + + + +
diff --git a/map_v1/country/total_registered.removed_registry.hpl b/map_v1/country/total_registered.removed_registry.hpl new file mode 100644 index 0000000..18c9336 --- /dev/null +++ b/map_v1/country/total_registered.removed_registry.hpl @@ -0,0 +1,356 @@ + + + + total_registered.removed_registry + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (decision-document-service) РФ + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.removed_registry) + Y + + + Execute SQL script + Table input (decision-document-service) РФ + Y + + + + Execute SQL script + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 224 + 224 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 672 + 224 + + + + Insert / update (total_registered.removed_registry) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + living_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1136 + 224 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 880 + 224 + + + + Table input (decision-document-service) РФ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(age_limit), 0) age_limit, + COALESCE(SUM(death), 0) death, + COALESCE(SUM(removed_registry), 0) removed_registry, + COALESCE(SUM(deprivation_citizenship), 0) deprivation_citizenship, + COALESCE(SUM(travel_abroad), 0) travel_abroad, + COALESCE(SUM(living_abroad), 0) living_abroad, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(deprivation_citizenship) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) deprivation_citizen_percents, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(age_limit) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) age_limit_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(death) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) death_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(travel_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) travel_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(living_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) living_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(other) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + '${REG_ID}' AS recruitment_id, + 'Ministry' AS schema +FROM total_registered.removed_registry +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE; + Y + + + 464 + 224 + + + + + +
diff --git a/map_v1/country/total_registered.subpoenas.hpl b/map_v1/country/total_registered.subpoenas.hpl new file mode 100644 index 0000000..74c2520 --- /dev/null +++ b/map_v1/country/total_registered.subpoenas.hpl @@ -0,0 +1,452 @@ + + + + total_registered.subpoenas + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Table input (subpoena)РФ/рег + Get variables 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.subpoenas) + Y + + + Execute SQL script + Table input (subpoena)РФ/рег + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema = 'Ministry' + AND recruitment_id = '${REG_ID}' + + + 336 + 256 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 784 + 256 + + + + Insert / update (total_registered.subpoenas) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + mil_reg + mil_reg + + + = + schema + schema + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1248 + 256 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 992 + 256 + + + + Table input (subpoena)РФ/рег + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(average_appeared), 0) average_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(electron), 0) count_electron, + COALESCE(SUM(paper), 0) count_paper, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(electron) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) electron_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(paper) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) paper_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${REG_ID}' AS recruitment_id, + mil_reg, + 'Ministry' AS schema +FROM total_registered.subpoenas +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema = 'Region' +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 560 + 256 + + + + + +
diff --git a/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl b/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl new file mode 100644 index 0000000..5cb30a4 --- /dev/null +++ b/map_v1/dummy/clearing_recruits/clearing_recruits_from_citizen_table.hpl @@ -0,0 +1,193 @@ + + + + clearing_recruits_from_citizen_table + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/20 11:08:52.517 + - + 2025/05/20 11:08:52.517 + + + + + + Dummy (do nothing) + Copy rows to result + Y + + + Dummy (do nothing) 2 + Table input + Y + + + Dummy (do nothing) 3 + Execute SQL script delete citizen + Y + + + + Execute SQL script delete citizen + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + delete from ervu_dashboard.citizen where recruit_id = '${}' + + + 1648 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +/* +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +*/ +citizen AS ( + SELECT + '${RCRT_C}'::uuid AS recruitment_id, + unnest(string_to_array(trim(both '{}' + from '${CITIZ_ARR}' + ), ','))::uuid AS recruit_id +), +recruits AS ( + SELECT + '${RCRT_C}'::uuid AS recruitment_id, + unnest(string_to_array(trim(both '{}' + from '${RECR_ARR}' + ), ','))::uuid AS recruit_id +), +except_result AS ( + SELECT + recruit_id, + recruitment_id + FROM citizen + EXCEPT + SELECT + recruit_id, + recruitment_id + FROM recruits +) +SELECT + recruitment_id AS RECRUITMENT_ID, + array_agg(recruit_id) AS RECRUITS_ARRAY +FROM except_result +group by recruitment_id + Y + + + 960 + 400 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 384 + 240 + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 576 + 240 + + + + Dummy (do nothing) 2 + Dummy + + Y + + 1 + + none + + + + + 720 + 400 + + + + Dummy (do nothing) 3 + Dummy + + Y + + 1 + + none + + + + + 1328 + 416 + + + + + + diff --git a/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf b/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf new file mode 100644 index 0000000..fd44ffb --- /dev/null +++ b/map_v1/dummy/clearing_recruits/job_clearing_recruits_from_citizen_table.hwf @@ -0,0 +1,61 @@ + + + job_clearing_recruits_from_citizen_table + Y + + + + - + 2025/05/20 11:23:47.379 + - + 2025/05/20 11:23:47.379 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 672 + 352 + + + + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 58 + 736 + 208 + селектим id военкоматов и создаем массив рекрутов внутри этого военкомата из бд ervu_person_registry (таблица recruits) и +селектим id военкоматов и создаем массив рекрутов внутри этого военкомата из бд ervu_dashboard (таблица citizen) +-> затем с помощью except зачищаем лишние данные + 700 + + + + diff --git a/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl b/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl new file mode 100644 index 0000000..9f5eafc --- /dev/null +++ b/map_v1/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl @@ -0,0 +1,131 @@ + + + + checkpoinnt_raw_info_recruits_err + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 10:26:03.910 + - + 2025/05/21 10:26:03.910 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 496 + 256 + определение рекрута и военкомата на котором остановилась загрузка данных + 445 + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +rows AS ( + SELECT + recruit_id, + --ROW_NUMBER() OVER (ORDER BY recruit_id) AS + rn_recruit, + COALESCE(recruitment_id,target_recruitment_id) AS recruitment_id, + --ROW_NUMBER() OVER (ORDER BY COALESCE(recruitment_id,target_recruitment_id)) AS + rn_recruitment + FROM ervu_dashboard.citizen + WHERE (recruitment_id is not null or target_recruitment_id is not null) AND recruit_id IS NOT NULL +) +SELECT + 'job_if_err_raw_inf_recr' AS job_name, + CURRENT_TIMESTAMP AS last_update, + recruit_id AS last_recruit_id, + rn_recruit, + recruitment_id AS last_recruitment_id, + rn_recruitment, + 'ERROR' AS status +FROM rows +WHERE rn_recruitment = (SELECT MAX(rn_recruitment) FROM rows) +ORDER BY rn_recruit DESC +LIMIT 1; + N + + + 512 + 352 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 928 + 352 + +
+ + + +
diff --git a/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl b/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl new file mode 100644 index 0000000..d2ec458 --- /dev/null +++ b/map_v1/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl @@ -0,0 +1,131 @@ + + + + checkpoint_raw_info_recruits_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 10:25:24.598 + - + 2025/05/21 10:25:24.598 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 528 + 288 + определение рекрута и военкомата на котором остановилась загрузка данных + 445 + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +rows AS ( + SELECT + recruit_id, + --ROW_NUMBER() OVER (ORDER BY recruit_id) AS + rn_recruit, + COALESCE(recruitment_id,target_recruitment_id) AS recruitment_id, + --ROW_NUMBER() OVER (ORDER BY COALESCE(recruitment_id,target_recruitment_id)) AS + rn_recruitment + FROM ervu_dashboard.citizen + WHERE (recruitment_id is not null or target_recruitment_id is not null) AND recruit_id IS NOT NULL +) +SELECT + 'job_if_err_raw_inf_recr' AS job_name, + CURRENT_TIMESTAMP AS last_update, + recruit_id AS last_recruit_id, + rn_recruit, + recruitment_id AS last_recruitment_id, + rn_recruitment, + 'SUCCESS' AS status +FROM rows +WHERE rn_recruitment = (SELECT MAX(rn_recruitment) FROM rows) +ORDER BY rn_recruit DESC +LIMIT 1; + N + + + 544 + 384 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 960 + 384 + +
+ + + +
diff --git a/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf b/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf new file mode 100644 index 0000000..e1bf4c6 --- /dev/null +++ b/map_v1/dummy/raw_info_recruits/job_if_err_raw_inf_recr.hwf @@ -0,0 +1,242 @@ + + + job_if_err_raw_inf_recr + Y + + + + - + 2025/05/21 10:31:44.924 + - + 2025/05/21 10:31:44.924 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 496 + 368 + + + + checkpoint_recruitment_recruit.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit.hpl + Basic + + Y + + N + local + N + N + Y + N + 656 + 256 + + + + info_recruits_once.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/jobs_once/info_recruits_once.hpl + Basic + + + RCRT_C + RECRUITMENT_CITIZEN + + Y + + Y + local + N + N + Y + N + 1152 + 368 + + + + Success JOB IF ERROR + + SUCCESS + + N + 1728 + 368 + + + + recruitment_rows_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/recruitment_rows_if_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 912 + 368 + + + + ERROR JOB IF ERROR + + SUCCESS + + N + 1728 + 480 + + + + checkpoint_recruitment_recruit_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 1408 + 368 + + + + checkpoint_recruitment_recruit_err.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/checkpoint_recruitment_recruit_err.hpl + Basic + + Y + + N + local + N + N + Y + N + 1408 + 480 + + + + + + checkpoint_recruitment_recruit.hpl + recruitment_rows_if_error.hpl + N + Y + N + + + info_recruits_once.hpl + checkpoint_recruitment_recruit_success.hpl + Y + Y + N + + + info_recruits_once.hpl + checkpoint_recruitment_recruit_err.hpl + Y + N + N + + + recruitment_rows_if_error.hpl + info_recruits_once.hpl + Y + Y + N + + + checkpoint_recruitment_recruit_success.hpl + Success JOB IF ERROR + Y + Y + Y + + + checkpoint_recruitment_recruit_err.hpl + ERROR JOB IF ERROR + Y + Y + Y + + + Start + recruitment_rows_if_error.hpl + Y + Y + Y + + + + + + diff --git a/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf b/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf new file mode 100644 index 0000000..c54d0c0 --- /dev/null +++ b/map_v1/dummy/raw_info_recruits/job_raw_info_recruits.hwf @@ -0,0 +1,266 @@ + + + job_raw_info_recruits + Y + + + + - + 2025/05/21 10:06:15.097 + - + 2025/05/21 10:06:15.097 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 336 + 320 + + + + SQL delete ervu_person_registry_raw.recruits_info + + SQL + + ervu-dashboard + N + delete from ervu_person_registry_raw.recruits_info + N + N + N + 528 + 208 + + + + raw_info_recruits.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/dummy/raw_info_recruits/raw_info_recruits.hpl + Basic + + + RCRT_C + RECRUITMENT_CITIZEN + + Y + + Y + local + N + N + Y + N + 1232 + 320 + + + + Success + + SUCCESS + + N + 1936 + 320 + + + + Success 2 + + SUCCESS + + N + 1936 + 448 + + + + checkpoint_raw_info_recruits_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/dummy/raw_info_recruits/checkpoint_raw_info_recruits_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 1584 + 320 + + + + checkpoinnt_raw_info_recruits_err.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/dummy/raw_info_recruits/checkpoinnt_raw_info_recruits_err.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 1584 + 448 + + + + job_row_recruit_id.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/job_row_recruit_id.hwf + Nothing + + Y + + N + local + N + N + Y + N + 800 + 208 + + + + recruitment_rows.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/jobs_once/supportive_jobs/recruitment_rows.hpl + Basic + + Y + + N + local + N + N + Y + N + 960 + 320 + + + + + + checkpoint_raw_info_recruits_success.hpl + Success + Y + Y + N + + + checkpoinnt_raw_info_recruits_err.hpl + Success 2 + Y + Y + N + + + raw_info_recruits.hpl + checkpoint_raw_info_recruits_success.hpl + Y + Y + N + + + raw_info_recruits.hpl + checkpoinnt_raw_info_recruits_err.hpl + Y + N + N + + + Start + SQL delete ervu_person_registry_raw.recruits_info + Y + Y + Y + + + job_row_recruit_id.hwf + recruitment_rows.hpl + Y + N + Y + + + SQL delete ervu_person_registry_raw.recruits_info + job_row_recruit_id.hwf + Y + Y + N + + + recruitment_rows.hpl + raw_info_recruits.hpl + Y + Y + N + + + + + + diff --git a/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl b/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl new file mode 100644 index 0000000..a526fdb --- /dev/null +++ b/map_v1/dummy/raw_info_recruits/raw_info_recruits.hpl @@ -0,0 +1,76 @@ + + + + raw_info_recruits + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 10:09:54.850 + - + 2025/05/21 10:09:54.850 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + N + 0 + SELECT <values> FROM <table name> WHERE <conditions> + N + + + 384 + 240 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + + + lookup table
+
+ N + + + 768 + 240 + +
+ + + +
diff --git a/map_v1/info_recruits/branching_job_general_info_recruits.hpl b/map_v1/info_recruits/branching_job_general_info_recruits.hpl new file mode 100644 index 0000000..5de71d8 --- /dev/null +++ b/map_v1/info_recruits/branching_job_general_info_recruits.hpl @@ -0,0 +1,230 @@ + + + + branching_job_general_info_recruits + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/29 15:34:58.403 + - + 2025/05/29 15:34:58.403 + + + + + + JSON input state_job_general_info_recruits.json + Set variables + N + + + Table input + Insert / update 2 + Y + + + Insert / update 2 + Set variables + Y + + + + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + status + status + Y + + + record_created + record_created + Y + +
+ N + + + 928 + 144 + +
+ + JSON input state_job_general_info_recruits.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/checkpoints/state_job_general_info_recruits.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 560 + 384 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1136 + 144 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_general_info_recruits') AS job_name, + COALESCE(status, 'SUCCESS') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_general_info_recruits' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_general_info_recruits' + ) +) t + N + + + 400 + 144 + + + + + +
diff --git a/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl new file mode 100644 index 0000000..ba1084b --- /dev/null +++ b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_job_general_info_recruits_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 15:29:36.938 + - + 2025/06/16 15:29:36.938 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1216 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'job_general_info_recruits' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 848 + 384 + + + + + +
diff --git a/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl new file mode 100644 index 0000000..019ec56 --- /dev/null +++ b/map_v1/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_job_general_info_recruits_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 15:29:36.938 + - + 2025/06/16 15:29:36.938 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1200 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'job_general_info_recruits' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 832 + 304 + + + + + +
diff --git a/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl b/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl new file mode 100644 index 0000000..1daa60f --- /dev/null +++ b/map_v1/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl @@ -0,0 +1,200 @@ + + + + check_status_job_info_recruits_from_json + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 16:12:10.826 + - + 2025/06/16 16:12:10.826 + + + + + + Insert / update + Set variables + Y + + + Set variables + Write to log + N + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1056 + 384 + +
+ + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1296 + 384 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'job_child', + 'job_citizen_guardianship', + 'job_passport', + 'job_citizen_spouse', + 'job_prosecution', + 'job_punishment', + 'job_snils_inn', + 'job_citizen_liability_fz53', + 'job_citizen_criminal_liability_fz53', + 'job_citizen_appealing_violations_fz53' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'job_child', + 'job_citizen_guardianship', + 'job_passport', + 'job_citizen_spouse', + 'job_prosecution', + 'job_punishment', + 'job_snils_inn', + 'job_citizen_liability_fz53', + 'job_citizen_criminal_liability_fz53', + 'job_citizen_appealing_violations_fz53' + ) + ) = 10 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_info_recruits_from_json' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 688 + 384 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1552 + 256 + + + + + +
diff --git a/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl b/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl new file mode 100644 index 0000000..f686db8 --- /dev/null +++ b/map_v1/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl @@ -0,0 +1,184 @@ + + + + check_status_parallel_recruits_info_citizen + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 15:43:53.832 + - + 2025/06/16 15:43:53.832 + + + + + + Table input + Insert / update + Y + + + Set variables + Write to log + N + + + Insert / update + Set variables + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1088 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'job_citizen', + 'job_recruits_info' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'job_citizen', + 'job_recruits_info' + ) + ) = 2 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_parallel_recruits_info_citizen' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 720 + 288 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1328 + 288 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1584 + 160 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/branching_child.hpl b/map_v1/info_recruits/citizen_tables/child/branching_child.hpl new file mode 100644 index 0000000..d25a7a0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/branching_child.hpl @@ -0,0 +1,124 @@ + + + + branching_child + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_child' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl b/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl new file mode 100644 index 0000000..382688b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/branching_child_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_child_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_child_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_child_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_child_delta' + ) +) t + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl new file mode 100644 index 0000000..7678021 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_child_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl new file mode 100644 index 0000000..4339f92 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_child_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl new file mode 100644 index 0000000..9f51e25 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_child_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl new file mode 100644 index 0000000..ab2f474 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_child_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl new file mode 100644 index 0000000..23987c6 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_child_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl new file mode 100644 index 0000000..5732590 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_child_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl new file mode 100644 index 0000000..95b5598 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_child_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl new file mode 100644 index 0000000..8878838 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_child_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl new file mode 100644 index 0000000..cd555b8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_child_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl new file mode 100644 index 0000000..83181a2 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_child_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl new file mode 100644 index 0000000..782c038 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_child_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl new file mode 100644 index 0000000..7a7dc06 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_child_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl new file mode 100644 index 0000000..a420549 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_child_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl new file mode 100644 index 0000000..0c50fd3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_child_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl new file mode 100644 index 0000000..16a7007 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_child_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl new file mode 100644 index 0000000..96e5db8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_child_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl new file mode 100644 index 0000000..c39e38f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_child_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl new file mode 100644 index 0000000..381c4fc --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_child_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl new file mode 100644 index 0000000..460b876 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_child_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl new file mode 100644 index 0000000..8035bc7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_child_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_child_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..3b69421 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_child' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..64b8f84 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_child' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_delta_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_delta_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_delta_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_delta_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'child_delta_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl new file mode 100644 index 0000000..a2bc69c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_child_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_child') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_child' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_child' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl new file mode 100644 index 0000000..0f593da --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_child_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_child_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl new file mode 100644 index 0000000..06568da --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_child + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'child_flow1', + 'child_flow2', + 'child_flow3', + 'child_flow4', + 'child_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'child_flow1', + 'child_flow2', + 'child_flow3', + 'child_flow4', + 'child_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_child' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl new file mode 100644 index 0000000..9097bd1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_child_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_child_flow1', + 'delta_child_flow2', + 'delta_child_flow3', + 'delta_child_flow4', + 'delta_child_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_child_flow1', + 'delta_child_flow2', + 'delta_child_flow3', + 'delta_child_flow4', + 'delta_child_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_child_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf new file mode 100644 index 0000000..b31ca9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf @@ -0,0 +1,235 @@ + + + job_create_files_child + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/child/job_child.hwf b/map_v1/info_recruits/citizen_tables/child/job_child.hwf new file mode 100644 index 0000000..9dd20b8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/job_child.hwf @@ -0,0 +1,2478 @@ + + + job_child + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_child.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_child.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + child_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + child_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + child_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + child_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + child_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new citizen + + SUCCESS + + N + 3728 + 432 + + + + branching_child.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/branching_child.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple child WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1696 + 1712 + + + + Simple child WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + child_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + child_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + child_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + child_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + child_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + delta_child_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 1776 + + + + check_if_job_child_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/check_if_job_child_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 544 + 400 + + + + Simple job_child_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 784 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 576 + + + + change_status_child_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_child_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_child_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_child_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_child_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_child_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_child_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_child_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_child_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_child_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_child.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + Success child after error + + SUCCESS + + N + 3728 + 1312 + + + + change_status_child_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_child_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_child_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_child_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_child_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_child_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_child_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_child_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_child_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_child_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_child_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_child.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + change_status_to_processing.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2416 + 1472 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2320 + 2304 + + + + change_status_delta_child_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1776 + + + + change_status_delta_child_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1856 + + + + recruitment_rows_five_flow_child.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2416 + 2096 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2256 + 2208 + + + + Simple delta_child WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2048 + 2096 + + + + delta_child success + + SUCCESS + + N + 2144 + 1904 + + + + branching_child_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/branching_child_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1792 + 2096 + + + + checkpoint_job_child_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/checkpoint_job_child_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 2096 + + + + child_delta success + + SUCCESS + + N + 3712 + 2096 + + + + delta_child_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1936 + + + + change_status_delta_child_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1936 + + + + change_status_delta_child_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2016 + + + + delta_child_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 2096 + + + + change_status_delta_child_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2096 + + + + change_status_delta_child_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2176 + + + + delta_child_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 2256 + + + + change_status_delta_child_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2256 + + + + change_status_delta_child_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2336 + + + + delta_child_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 2416 + + + + change_status_delta_child_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2416 + + + + change_status_delta_child_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/change_status_delta_child_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2496 + + + + + + recruitment_rows_five_flow_child.hpl + child_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + child_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + child_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + child_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + child_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + Abort workflow + Y + N + N + + + branching_child.hpl + Simple child WHERE ERROR + Y + N + Y + + + branching_child.hpl + Simple child WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + recruitment_rows_five_flow_if_error.hpl + child_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + child_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + child_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + child_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + child_flow5.hpl 2 + Y + Y + N + + + Start + check_if_job_child_exists.hpl + Y + Y + Y + + + check_if_job_child_exists.hpl + Simple job_child_exists check NEW + Y + Y + N + + + child_flow1.hpl + change_status_child_flow1_success.hpl + Y + Y + N + + + child_flow1.hpl + change_status_child_flow1_error.hpl + Y + N + N + + + child_flow2.hpl + change_status_child_flow2_success.hpl + Y + Y + N + + + child_flow2.hpl + change_status_child_flow2_error.hpl + Y + N + N + + + child_flow3.hpl + change_status_child_flow3_success.hpl + Y + Y + N + + + child_flow3.hpl + change_status_child_flow3_error.hpl + Y + N + N + + + child_flow4.hpl + change_status_child_flow4_success.hpl + Y + Y + N + + + child_flow4.hpl + change_status_child_flow4_error.hpl + Y + N + N + + + child_flow5.hpl + change_status_child_flow5_success.hpl + Y + Y + N + + + child_flow5.hpl + change_status_child_flow5_error.hpl + Y + N + N + + + change_status_child_flow5_error.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow5_success.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow4_error.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow4_success.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow3_error.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow3_success.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow2_error.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow2_success.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow1_error.hpl + checkpoint_job_child.hpl + Y + N + Y + + + change_status_child_flow1_success.hpl + checkpoint_job_child.hpl + Y + N + Y + + + checkpoint_job_child.hpl + Success new citizen + Y + Y + N + + + change_status_child_flow1_success.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow1_error.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow2_success.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow2_error.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow3_success.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow3_error.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow4_success.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow4_error.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow5_success.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + change_status_child_flow5_error.hpl 2 + checkpoint_job_child.hpl 2 + Y + N + Y + + + checkpoint_job_child.hpl 2 + Success child after error + Y + Y + N + + + child_flow1.hpl 2 + change_status_child_flow1_success.hpl 2 + Y + Y + N + + + child_flow1.hpl 2 + change_status_child_flow1_error.hpl 2 + Y + N + N + + + child_flow2.hpl 2 + change_status_child_flow2_success.hpl 2 + Y + Y + N + + + child_flow2.hpl 2 + change_status_child_flow2_error.hpl 2 + Y + N + N + + + child_flow3.hpl 2 + change_status_child_flow3_success.hpl 2 + Y + Y + N + + + child_flow3.hpl 2 + change_status_child_flow3_error.hpl 2 + Y + N + N + + + child_flow4.hpl 2 + change_status_child_flow4_success.hpl 2 + Y + Y + N + + + child_flow4.hpl 2 + change_status_child_flow4_error.hpl 2 + Y + N + N + + + child_flow5.hpl 2 + change_status_child_flow5_success.hpl 2 + Y + Y + N + + + child_flow5.hpl 2 + change_status_child_flow5_error.hpl 2 + Y + N + N + + + checkpoint_job_child.hpl (2) + branching_child.hpl + Y + N + Y + + + Simple job_child_exists check NEW + checkpoint_job_child.hpl (2) + Y + N + N + + + delta_child_flow1.hpl + change_status_delta_child_flow1_success.hpl + Y + Y + N + + + delta_child_flow1.hpl + change_status_delta_child_flow1_error.hpl + Y + N + N + + + Simple job_child_exists check NEW + recruitment_rows_five_flow_child.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl + change_status_to_processing.hpl + Y + Y + N + + + Simple child WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + delta_child_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + change_status_to_processing_delta.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + Abort workflow 2 2 + Y + Y + N + + + Simple delta_child WHERE ERROR + delta_child success + Y + N + N + + + Simple delta_child WHERE ERROR + recruitment_rows_five_flow_child.hpl 2 + Y + Y + Y + + + Simple child WHERE SUCCESS + branching_child_delta.hpl + Y + Y + N + + + branching_child_delta.hpl + Simple delta_child WHERE ERROR + Y + Y + Y + + + checkpoint_job_child_delta.hpl + child_delta success + Y + Y + N + + + change_status_delta_child_flow1_success.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow1_error.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + delta_child_flow2.hpl + change_status_delta_child_flow2_success.hpl + Y + Y + N + + + delta_child_flow2.hpl + change_status_delta_child_flow2_error.hpl + Y + N + N + + + delta_child_flow3.hpl + change_status_delta_child_flow3_success.hpl + Y + Y + N + + + delta_child_flow3.hpl + change_status_delta_child_flow3_error.hpl + Y + N + N + + + delta_child_flow4.hpl + change_status_delta_child_flow4_success.hpl + Y + Y + N + + + delta_child_flow4.hpl + change_status_delta_child_flow4_error.hpl + Y + N + N + + + delta_child_flow5.hpl + change_status_delta_child_flow5_success.hpl + Y + Y + N + + + delta_child_flow5.hpl + change_status_delta_child_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow_child.hpl 2 + delta_child_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + delta_child_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + delta_child_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_child.hpl 2 + delta_child_flow5.hpl + Y + Y + N + + + change_status_delta_child_flow2_success.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow3_success.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow2_error.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow3_error.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow4_success.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow4_error.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow5_success.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + change_status_delta_child_flow5_error.hpl + checkpoint_job_child_delta.hpl + Y + N + Y + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl new file mode 100644 index 0000000..527cc57 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow1.hpl @@ -0,0 +1,229 @@ + + + + child_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Get variables + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 944 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow2.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow2.hpl new file mode 100644 index 0000000..4ae2357 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow2.hpl @@ -0,0 +1,142 @@ + + + + child_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1088 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 560 + 288 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow3.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow3.hpl new file mode 100644 index 0000000..1ccf803 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow3.hpl @@ -0,0 +1,142 @@ + + + + child_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1216 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 672 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow4.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow4.hpl new file mode 100644 index 0000000..626f607 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow4.hpl @@ -0,0 +1,142 @@ + + + + child_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1072 + 320 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 528 + 320 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/child_flow5.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow5.hpl new file mode 100644 index 0000000..f76ea69 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/child_flow5.hpl @@ -0,0 +1,142 @@ + + + + child_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1040 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 560 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl new file mode 100644 index 0000000..8008a21 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow1.hpl @@ -0,0 +1,143 @@ + + + + delta_child_flow1 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1168 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl new file mode 100644 index 0000000..c108637 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow2.hpl @@ -0,0 +1,143 @@ + + + + delta_child_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1168 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl new file mode 100644 index 0000000..7908b8e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow3.hpl @@ -0,0 +1,143 @@ + + + + delta_child_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1168 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl new file mode 100644 index 0000000..32b4002 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow4.hpl @@ -0,0 +1,143 @@ + + + + delta_child_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1168 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl new file mode 100644 index 0000000..1a55d69 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/parallel/delta_child_flow5.hpl @@ -0,0 +1,143 @@ + + + + delta_child_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_child
+ + recruit_id + recruit_id + N + + + birth_az_number + birth_az_number + Y + + + birth_date + birth_date + Y + + + death_az_number + death_az_number + Y + + + death_date + death_date + Y + + + full_name + full_name + Y + + + kinship_type + kinship_type + Y + +
+ N + + + 1168 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +) +select + r.recruit_id::uuid recruit_id, + ch->>'naimRodstvSvyazReb' kinship_type, + concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo') full_name, + make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date, + make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date, + ch->'svedSmert'->>'nomerZapis' death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' birth_az_number +from ervu_dashboard.citizen r +join child on r.recruit_id = child.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..0a663c3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('child_flow1', 'child_flow2', 'child_flow3', 'child_flow4', 'child_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/branching_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/branching_citizen.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/branching_citizen.hpl rename to map_v1/info_recruits/citizen_tables/citizen/branching_citizen.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl rename to map_v1/info_recruits/citizen_tables/citizen/branching_citizen_delta.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow1_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow2_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow3_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow4_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_citizen_flow5_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow1_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow2_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow3_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow4_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_delta_citizen_flow5_success.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/change_status_to_processing_delta.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/check_if_job_citizen_exists.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_citizen_error.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/checkpoint_job_citizen_delta.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf b/map_v1/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf rename to map_v1/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf diff --git a/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl b/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl new file mode 100644 index 0000000..e5be261 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen/delta_citizen.hpl @@ -0,0 +1,318 @@ + + + + delta_citizen + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen
+ + recruit_id + recruit_id + N + + + system_pgs_status + system_pgs_status + Y + + + full_name + full_name + Y + + + last_name + last_name + Y + + + first_name + first_name + Y + + + middle_name + middle_name + Y + + + gender + gender + Y + + + birth_date + birth_date + Y + + + age + age + Y + + + birth_place + birth_place + Y + + + phone + phone + Y + + + email + email + Y + + + date_registration + date_registration + Y + + + date_deregistration + date_deregistration + Y + + + recruit_create_date + recruit_create_date + Y + + + update_date + update_date + Y + + + vu_current_info + vu_current_info + Y + + + recruitment_id + recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + deferment_liberation + deferment_liberation + Y + + + reason_registration + reason_registration + Y + + + residence + residence + Y + + + start_date_residence + start_date_residence + Y + + + end_date_residence + end_date_residence + Y + + + address_place_stay + address_place_stay + Y + + + start_date_place_stay + start_date_place_stay + Y + + + end_date_place_stay + end_date_place_stay + Y + + + type_place_stay + type_place_stay + Y + + + id_ern + id_ern + Y + +
+ N + + + 1104 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + with +adresses as ( -- по одному ли адресу тут должно быть?? +SELECT + r.id as recruit_id, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg +FROM + public.recruits AS r +LEFT JOIN + LATERAL jsonb_array_elements(r.addresses) AS addr ON true +WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp +GROUP BY + r.id +) +SELECT + r.system_pgs_status, + r.full_name, + r.last_name, + r.first_name, + r.middle_name, + r.gender, + --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils, + --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn, + r.birth_date, + EXTRACT(YEAR FROM AGE(r.birth_date)) AS age, + r.birth_place, + r.phone, + r.email, + r.id AS recruit_id, --ri.recruit_id, + --ri.info, + --r.vu_current_info, + r.military_registration_date AS date_registration, + r.vu_unset_date AS date_deregistration, + --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, + r.system_create_date AS recruit_create_date, + r.system_update_date AS update_date, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id, + r.target_recruitment_id, + CASE + WHEN ddd.hidden IS false then ddd.hidden + ELSE true + END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет + mrr.value AS reason_registration + adr.actualAddress as residence, -- адрес места жительства + adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства + adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства + adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания + adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания + adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания + case + when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица' + when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы' + else null + end as type_place_stay, -- тип регистрации + -- address_actual -- Адрес фактического проживания ***1 + -- source_info_actual -- Источник сведений о месте фактического проживания ***1 + -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1 + -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1 + system_id_ern AS id_ern -- id единого регистра населения +FROM public.recruits AS r +JOIN public.recruits_info AS ri ON ri.recruit_id = r.id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp +LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, + recruit_id, + hidden + FROM public.decision_deferment_dto + ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false +JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.recruits_history rh on rh.recruit_id=r.id +--WHERE r.system_update_date >= '${UP_D}' +join adresses adr ON r.recruit_id=adr.recruit_id + +-- ***1 - страница личные сведения есть поле, нет данных + Y + + + 624 + 352 + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen/job_citizen.hwf b/map_v1/info_recruits/citizen_tables/citizen/job_citizen.hwf similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/job_citizen.hwf rename to map_v1/info_recruits/citizen_tables/citizen/job_citizen.hwf diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow1.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow2.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow3.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow4.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/citizen_flow5.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow1.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow2.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow3.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow4.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl rename to map_v1/info_recruits/citizen_tables/citizen/parallel/delta_citizen_flow5.hpl diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl similarity index 100% rename from mappings/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl rename to map_v1/info_recruits/citizen_tables/citizen/recruitment_rows_five_flow_if_error.hpl diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl new file mode 100644 index 0000000..894af88 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl @@ -0,0 +1,124 @@ + + + + branching_citizen_appealing_violations_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_appealing_violations_fz53' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl new file mode 100644 index 0000000..35eb784 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_citizen_appealing_violations_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_appealing_violations_fz53_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_citizen_appealing_violations_fz53_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_appealing_violations_fz53_delta' + ) +) t + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl new file mode 100644 index 0000000..17b638f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_appealing_violations_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_appealing_violations_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl new file mode 100644 index 0000000..7cca14e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_appealing_violations_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_appealing_violations_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl new file mode 100644 index 0000000..20d3515 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_appealing_violations_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl new file mode 100644 index 0000000..4c86e09 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_appealing_violations_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl new file mode 100644 index 0000000..eff6309 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_appealing_violations_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl new file mode 100644 index 0000000..dde1f6c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_appealing_violations_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl new file mode 100644 index 0000000..b8ea516 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_appealing_violations_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl new file mode 100644 index 0000000..d615e08 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_appealing_violations_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl new file mode 100644 index 0000000..25d529e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_appealing_violations_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl new file mode 100644 index 0000000..64c33fa --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_appealing_violations_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_appealing_violations_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl new file mode 100644 index 0000000..57bec30 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl new file mode 100644 index 0000000..5a31b60 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl new file mode 100644 index 0000000..2bb7cb2 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl new file mode 100644 index 0000000..02f1d71 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl new file mode 100644 index 0000000..bad8452 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl new file mode 100644 index 0000000..c52e330 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl new file mode 100644 index 0000000..e5b0f66 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl new file mode 100644 index 0000000..ed8c6b6 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl new file mode 100644 index 0000000..b368dc1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl new file mode 100644 index 0000000..5f711e1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_appealing_violations_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..6e63a1c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_citizen_appealing_violations_fz53' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_appealing_violations_fz53_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_appealing_violations_fz53_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_appealing_violations_fz53_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_appealing_violations_fz53_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_appealing_violations_fz53_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..6ace1f9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_snils_inn' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl new file mode 100644 index 0000000..fc0f6b5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_citizen_appealing_violations_fz53_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_appealing_violations_fz53') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_appealing_violations_fz53' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_appealing_violations_fz53' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl new file mode 100644 index 0000000..c4c46a7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_citizen_appealing_violations_fz53_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl new file mode 100644 index 0000000..5483bad --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_appealing_violations_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_appealing_violations_fz53_flow1', + 'citizen_appealing_violations_fz53_flow2', + 'citizen_appealing_violations_fz53_flow3', + 'citizen_appealing_violations_fz53_flow4', + 'citizen_appealing_violations_fz53_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_appealing_violations_fz53_flow1', + 'citizen_appealing_violations_fz53_flow2', + 'citizen_appealing_violations_fz53_flow3', + 'citizen_appealing_violations_fz53_flow4', + 'citizen_appealing_violations_fz53_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_appealing_violations_fz53' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl new file mode 100644 index 0000000..6c9fc6a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_appealing_violations_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_snils_inn_flow1', + 'delta_snils_inn_flow2', + 'delta_snils_inn_flow3', + 'delta_snils_inn_flow4', + 'delta_snils_inn_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_snils_inn_flow1', + 'delta_snils_inn_flow2', + 'delta_snils_inn_flow3', + 'delta_snils_inn_flow4', + 'delta_snils_inn_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_snils_inn_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf new file mode 100644 index 0000000..7151cc4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf @@ -0,0 +1,2478 @@ + + + job_citizen_appealing_violations_fz53 + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 272 + 400 + + + + checkpoint_job_citizen_appealing_violations_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2832 + 400 + + + + citizen_appealing_violations_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 3344 + 80 + + + + citizen_appealing_violations_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 3344 + 240 + + + + citizen_appealing_violations_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 3344 + 400 + + + + citizen_appealing_violations_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 3344 + 560 + + + + citizen_appealing_violations_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 3344 + 720 + + + + Abort workflow + + ABORT + + N + N + 2816 + 208 + + + + Success new citizen_appealing_violations_fz53 + + SUCCESS + + N + 4720 + 432 + + + + branching_citizen_appealing_violations_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple citizen_appealing_violations_fz53 WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1696 + 1680 + + + + Simple citizen_appealing_violations_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2048 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2864 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2768 + 1040 + + + + delta_citizen_appealing_violations_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 3344 + 1792 + + + + check_if_job_citizen_appealing_violations_fz53_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 528 + 400 + + + + Simple job_citizen_appealing_violations_fz53_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 992 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2848 + 560 + + + + change_status_citizen_appealing_violations_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 80 + + + + change_status_citizen_appealing_violations_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 160 + + + + change_status_citizen_appealing_violations_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 240 + + + + change_status_citizen_appealing_violations_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 320 + + + + change_status_citizen_appealing_violations_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 400 + + + + change_status_citizen_appealing_violations_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 480 + + + + change_status_citizen_appealing_violations_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 560 + + + + change_status_citizen_appealing_violations_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 640 + + + + change_status_citizen_appealing_violations_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 720 + + + + change_status_citizen_appealing_violations_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 800 + + + + checkpoint_job_citizen_appealing_violations_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 4320 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2848 + 1424 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2864 + 2304 + + + + change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1792 + + + + change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1872 + + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2832 + 2112 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2816 + 1952 + + + + delta_citizen_appealing_violations_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 3344 + 1952 + + + + change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1952 + + + + change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2032 + + + + delta_citizen_appealing_violations_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 3344 + 2112 + + + + change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2112 + + + + change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2192 + + + + delta_citizen_appealing_violations_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 3344 + 2272 + + + + change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2272 + + + + change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2352 + + + + delta_citizen_appealing_violations_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 3344 + 2432 + + + + change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2432 + + + + change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 2512 + + + + branching_citizen_appealing_violations_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1824 + 2112 + + + + Simple delta_citizen_appealing_violations_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2256 + 2112 + + + + delta_citizen_appealing_violations_fz53 success + + SUCCESS + + N + 2368 + 1904 + + + + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 4384 + 2112 + + + + Success delta_citizen_appealing_violations_fz53 + + SUCCESS + + N + 4784 + 2112 + + + + citizen_appealing_violations_fz53_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 3344 + 960 + + + + citizen_appealing_violations_fz53_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 3344 + 1120 + + + + citizen_appealing_violations_fz53_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 3344 + 1280 + + + + citizen_appealing_violations_fz53_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 3344 + 1440 + + + + citizen_appealing_violations_fz53_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 3344 + 1600 + + + + Success citizen_appealing_violations_fz53 after error + + SUCCESS + + N + 4720 + 1312 + + + + change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 960 + + + + change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1040 + + + + change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1120 + + + + change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1200 + + + + change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1280 + + + + change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1360 + + + + change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1440 + + + + change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1520 + + + + change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1600 + + + + change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3856 + 1680 + + + + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 4320 + 1312 + + + + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + citizen_appealing_violations_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + citizen_appealing_violations_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + citizen_appealing_violations_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + citizen_appealing_violations_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + citizen_appealing_violations_fz53_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + Abort workflow + Y + N + N + + + branching_citizen_appealing_violations_fz53.hpl + Simple citizen_appealing_violations_fz53 WHERE ERROR + Y + N + Y + + + branching_citizen_appealing_violations_fz53.hpl + Simple citizen_appealing_violations_fz53 WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_citizen_appealing_violations_fz53_exists.hpl + Y + Y + Y + + + check_if_job_citizen_appealing_violations_fz53_exists.hpl + Simple job_citizen_appealing_violations_fz53_exists check NEW + Y + Y + N + + + citizen_appealing_violations_fz53_flow1.hpl + change_status_citizen_appealing_violations_fz53_flow1_success.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_flow1.hpl + change_status_citizen_appealing_violations_fz53_flow1_error.hpl + Y + N + N + + + citizen_appealing_violations_fz53_flow2.hpl + change_status_citizen_appealing_violations_fz53_flow2_success.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_flow2.hpl + change_status_citizen_appealing_violations_fz53_flow2_error.hpl + Y + N + N + + + citizen_appealing_violations_fz53_flow3.hpl + change_status_citizen_appealing_violations_fz53_flow3_success.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_flow3.hpl + change_status_citizen_appealing_violations_fz53_flow3_error.hpl + Y + N + N + + + citizen_appealing_violations_fz53_flow4.hpl + change_status_citizen_appealing_violations_fz53_flow4_success.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_flow4.hpl + change_status_citizen_appealing_violations_fz53_flow4_error.hpl + Y + N + N + + + citizen_appealing_violations_fz53_flow5.hpl + change_status_citizen_appealing_violations_fz53_flow5_success.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_flow5.hpl + change_status_citizen_appealing_violations_fz53_flow5_error.hpl + Y + N + N + + + change_status_citizen_appealing_violations_fz53_flow5_error.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow5_success.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow4_error.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow4_success.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow3_error.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow3_success.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow2_error.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow2_success.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow1_error.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow1_success.hpl + checkpoint_job_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + checkpoint_job_citizen_appealing_violations_fz53.hpl + Success new citizen_appealing_violations_fz53 + Y + Y + N + + + checkpoint_job_citizen_appealing_violations_fz53.hpl (2) + branching_citizen_appealing_violations_fz53.hpl + Y + N + Y + + + Simple job_citizen_appealing_violations_fz53_exists check NEW + checkpoint_job_citizen_appealing_violations_fz53.hpl (2) + Y + N + N + + + delta_citizen_appealing_violations_fz53_flow1.hpl + change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl + Y + Y + N + + + delta_citizen_appealing_violations_fz53_flow1.hpl + change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + change_status_to_processing.hpl + Y + Y + N + + + Simple job_citizen_appealing_violations_fz53_exists check NEW + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl (2) + Y + Y + N + + + Simple citizen_appealing_violations_fz53 WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + delta_citizen_appealing_violations_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + change_status_to_processing_delta.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + Abort workflow 2 2 + Y + N + N + + + delta_citizen_appealing_violations_fz53_flow2.hpl + change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl + Y + Y + N + + + delta_citizen_appealing_violations_fz53_flow2.hpl + change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl + Y + N + N + + + delta_citizen_appealing_violations_fz53_flow3.hpl + change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl + Y + Y + N + + + delta_citizen_appealing_violations_fz53_flow3.hpl + change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl + Y + N + N + + + delta_citizen_appealing_violations_fz53_flow4.hpl + change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl + Y + Y + N + + + delta_citizen_appealing_violations_fz53_flow4.hpl + change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl + Y + N + N + + + delta_citizen_appealing_violations_fz53_flow5.hpl + change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl + Y + Y + N + + + delta_citizen_appealing_violations_fz53_flow5.hpl + change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + delta_citizen_appealing_violations_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + delta_citizen_appealing_violations_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + delta_citizen_appealing_violations_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + delta_citizen_appealing_violations_fz53_flow5.hpl + Y + Y + N + + + Simple citizen_appealing_violations_fz53 WHERE SUCCESS + branching_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + Simple delta_citizen_appealing_violations_fz53 WHERE ERROR + delta_citizen_appealing_violations_fz53 success + Y + N + N + + + branching_citizen_appealing_violations_fz53_delta.hpl + Simple delta_citizen_appealing_violations_fz53 WHERE ERROR + Y + Y + N + + + Simple delta_citizen_appealing_violations_fz53 WHERE ERROR + recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Y + Y + N + + + checkpoint_job_citizen_appealing_violations_fz53_delta.hpl + Success delta_citizen_appealing_violations_fz53 + Y + Y + N + + + citizen_appealing_violations_fz53_flow1.hpl 2 + change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 + Y + Y + N + + + citizen_appealing_violations_fz53_flow1.hpl 2 + change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 + Y + N + N + + + citizen_appealing_violations_fz53_flow2.hpl 2 + change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 + Y + Y + N + + + citizen_appealing_violations_fz53_flow2.hpl 2 + change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 + Y + N + N + + + citizen_appealing_violations_fz53_flow3.hpl 2 + change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 + Y + Y + N + + + citizen_appealing_violations_fz53_flow3.hpl 2 + change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 + Y + N + N + + + citizen_appealing_violations_fz53_flow4.hpl 2 + change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 + Y + Y + N + + + citizen_appealing_violations_fz53_flow4.hpl 2 + change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 + Y + N + N + + + citizen_appealing_violations_fz53_flow5.hpl 2 + change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 + Y + Y + N + + + citizen_appealing_violations_fz53_flow5.hpl 2 + change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 + Y + N + N + + + change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Y + N + Y + + + checkpoint_job_citizen_appealing_violations_fz53.hpl 2 + Success citizen_appealing_violations_fz53 after error + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_appealing_violations_fz53_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_appealing_violations_fz53_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_appealing_violations_fz53_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_appealing_violations_fz53_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_appealing_violations_fz53_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl new file mode 100644 index 0000000..d1ca18f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl @@ -0,0 +1,161 @@ + + + + citizen_appealing_violations_fz53_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 448 + 288 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + = + create_date + create_date + + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 864 + 288 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl new file mode 100644 index 0000000..1b5d294 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl @@ -0,0 +1,158 @@ + + + + citizen_appealing_violations_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 928 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 512 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl new file mode 100644 index 0000000..8ce8203 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl @@ -0,0 +1,158 @@ + + + + citizen_appealing_violations_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 992 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 576 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl new file mode 100644 index 0000000..1446dc1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl @@ -0,0 +1,158 @@ + + + + citizen_appealing_violations_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 896 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 480 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl new file mode 100644 index 0000000..5614a92 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl @@ -0,0 +1,158 @@ + + + + citizen_appealing_violations_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 1104 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 688 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl new file mode 100644 index 0000000..d065de7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl @@ -0,0 +1,158 @@ + + + + delta_citizen_appealing_violations_fz53_flow1 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 976 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 560 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl new file mode 100644 index 0000000..1c9afd1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl @@ -0,0 +1,158 @@ + + + + delta_citizen_appealing_violations_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 1056 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 640 + 336 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl new file mode 100644 index 0000000..648df28 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl @@ -0,0 +1,158 @@ + + + + delta_citizen_appealing_violations_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 1120 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 704 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl new file mode 100644 index 0000000..7eef578 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl @@ -0,0 +1,158 @@ + + + + delta_citizen_appealing_violations_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 1056 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 640 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl new file mode 100644 index 0000000..950b9b0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl @@ -0,0 +1,158 @@ + + + + delta_citizen_appealing_violations_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 1008 + 320 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + Y + + + 592 + 320 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..4b469b9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('citizen_appealing_violations_fz53_flow1', 'citizen_appealing_violations_fz53_flow2', 'citizen_appealing_violations_fz53_flow3', 'citizen_appealing_violations_fz53_flow4', 'citizen_appealing_violations_fz53_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl new file mode 100644 index 0000000..e077078 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl @@ -0,0 +1,124 @@ + + + + branching_citizen_criminal_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_criminal_liability_fz53' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl new file mode 100644 index 0000000..4402413 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_citizen_criminal_liability_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_criminal_liability_fz53_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_citizen_criminal_liability_fz53_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_criminal_liability_fz53_delta' + ) +) t + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl new file mode 100644 index 0000000..4095df7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_criminal_liability_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_criminal_liability_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl new file mode 100644 index 0000000..3ef1f41 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_criminal_liability_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_criminal_liability_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl new file mode 100644 index 0000000..e729ca5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_criminal_liability_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl new file mode 100644 index 0000000..896e5f7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_criminal_liability_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl new file mode 100644 index 0000000..63d1db3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_criminal_liability_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl new file mode 100644 index 0000000..cdaf266 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_criminal_liability_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl new file mode 100644 index 0000000..0d74917 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_criminal_liability_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl new file mode 100644 index 0000000..1c4519b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_criminal_liability_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl new file mode 100644 index 0000000..bf0f099 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_criminal_liability_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl new file mode 100644 index 0000000..c7e8c88 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_criminal_liability_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_criminal_liability_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl new file mode 100644 index 0000000..748f1fd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl new file mode 100644 index 0000000..3985742 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl new file mode 100644 index 0000000..d3a3687 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl new file mode 100644 index 0000000..c729385 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl new file mode 100644 index 0000000..0baf42b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl new file mode 100644 index 0000000..0cfddb3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl new file mode 100644 index 0000000..edaee70 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl new file mode 100644 index 0000000..c3ad66d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl new file mode 100644 index 0000000..db5a6de --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl new file mode 100644 index 0000000..e773802 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_criminal_liability_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_criminal_liability_fz53_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..e422b79 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_citizen_criminal_liability_fz53' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_criminal_liability_fz53_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_criminal_liability_fz53_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_criminal_liability_fz53_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_criminal_liability_fz53_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_criminal_liability_fz53_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..9aea55f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_citizen_criminal_liability_fz53' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl new file mode 100644 index 0000000..c8d9198 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_citizen_criminal_liability_fz53_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_criminal_liability_fz53') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_criminal_liability_fz53' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_criminal_liability_fz53' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl new file mode 100644 index 0000000..6dec012 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_citizen_criminal_liability_fz53_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl new file mode 100644 index 0000000..dd178f2 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_criminal_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_criminal_liability_fz53_flow1', + 'citizen_criminal_liability_fz53_flow2', + 'citizen_criminal_liability_fz53_flow3', + 'citizen_criminal_liability_fz53_flow4', + 'citizen_criminal_liability_fz53_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_criminal_liability_fz53_flow1', + 'citizen_criminal_liability_fz53_flow2', + 'citizen_criminal_liability_fz53_flow3', + 'citizen_criminal_liability_fz53_flow4', + 'citizen_criminal_liability_fz53_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_criminal_liability_fz53' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl new file mode 100644 index 0000000..658a967 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_criminal_liability_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_citizen_criminal_liability_fz53_flow1', + 'delta_citizen_criminal_liability_fz53_flow2', + 'delta_citizen_criminal_liability_fz53_flow3', + 'delta_citizen_criminal_liability_fz53_flow4', + 'delta_citizen_criminal_liability_fz53_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_citizen_criminal_liability_fz53_flow1', + 'delta_citizen_criminal_liability_fz53_flow2', + 'delta_citizen_criminal_liability_fz53_flow3', + 'delta_citizen_criminal_liability_fz53_flow4', + 'delta_citizen_criminal_liability_fz53_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_criminal_liability_fz53_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf new file mode 100644 index 0000000..05ee576 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf @@ -0,0 +1,2482 @@ + + + job_citizen_criminal_liability_fz53 + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 96 + 400 + + + + checkpoint_job_citizen_criminal_liability_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + citizen_criminal_liability_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2736 + 80 + + + + citizen_criminal_liability_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2736 + 240 + + + + citizen_criminal_liability_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2736 + 400 + + + + citizen_criminal_liability_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2736 + 560 + + + + citizen_criminal_liability_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2736 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new citizen_criminal_liability_fz53 + + SUCCESS + + N + 3920 + 432 + + + + branching_citizen_criminal_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple citizen_criminal_liability_fz53 WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1632 + 1680 + + + + Simple citizen_criminal_liability_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1984 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_citizen_criminal_liability_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + + Y + + Y + local + N + N + Y + N + 2912 + 1792 + + + + check_if_job_citizen_criminal_liability_fz53_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 448 + 400 + + + + Simple job_citizen_criminal_liability_fz53_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 560 + + + + change_status_citizen_criminal_liability_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 80 + + + + change_status_citizen_criminal_liability_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 160 + + + + change_status_citizen_criminal_liability_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 240 + + + + change_status_citizen_criminal_liability_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 320 + + + + change_status_citizen_criminal_liability_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 400 + + + + change_status_citizen_criminal_liability_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 480 + + + + change_status_citizen_criminal_liability_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 560 + + + + change_status_citizen_criminal_liability_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 640 + + + + change_status_citizen_criminal_liability_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 720 + + + + change_status_citizen_criminal_liability_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 800 + + + + checkpoint_job_citizen_criminal_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 3600 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2304 + 1440 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2480 + 2304 + + + + change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 1792 + + + + change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 1872 + + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2480 + 2112 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2432 + 1952 + + + + delta_citizen_criminal_liability_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2912 + 1952 + + + + change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 1952 + + + + change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2032 + + + + delta_citizen_criminal_liability_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2912 + 2112 + + + + change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2112 + + + + change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2192 + + + + delta_citizen_criminal_liability_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2912 + 2272 + + + + change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2272 + + + + change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2352 + + + + delta_citizen_criminal_liability_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2912 + 2432 + + + + change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2432 + + + + change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3344 + 2512 + + + + branching_citizen_criminal_liability_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1632 + 2112 + + + + Simple delta_citizen_criminal_liability_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2032 + 2112 + + + + delta_citizen_criminal_liability_fz53 success + + SUCCESS + + N + 2160 + 1952 + + + + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 3792 + 2112 + + + + Success delta_citizen_criminal_liability_fz53 + + SUCCESS + + N + 4208 + 2112 + + + + citizen_criminal_liability_fz53_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2736 + 960 + + + + citizen_criminal_liability_fz53_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2736 + 1120 + + + + citizen_criminal_liability_fz53_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2736 + 1280 + + + + citizen_criminal_liability_fz53_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2736 + 1440 + + + + citizen_criminal_liability_fz53_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2736 + 1600 + + + + Success citizen_criminal_liability_fz53 after error + + SUCCESS + + N + 3968 + 1312 + + + + change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 960 + + + + change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1040 + + + + change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1120 + + + + change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1200 + + + + change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1280 + + + + change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1360 + + + + change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1440 + + + + change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1520 + + + + change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1600 + + + + change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3136 + 1680 + + + + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 3600 + 1312 + + + + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + citizen_criminal_liability_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + citizen_criminal_liability_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + citizen_criminal_liability_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + citizen_criminal_liability_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + citizen_criminal_liability_fz53_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + Abort workflow + Y + N + N + + + branching_citizen_criminal_liability_fz53.hpl + Simple citizen_criminal_liability_fz53 WHERE ERROR + Y + N + Y + + + branching_citizen_criminal_liability_fz53.hpl + Simple citizen_criminal_liability_fz53 WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_citizen_criminal_liability_fz53_exists.hpl + Y + Y + Y + + + check_if_job_citizen_criminal_liability_fz53_exists.hpl + Simple job_citizen_criminal_liability_fz53_exists check NEW + Y + Y + N + + + citizen_criminal_liability_fz53_flow1.hpl + change_status_citizen_criminal_liability_fz53_flow1_success.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_flow1.hpl + change_status_citizen_criminal_liability_fz53_flow1_error.hpl + Y + N + N + + + citizen_criminal_liability_fz53_flow2.hpl + change_status_citizen_criminal_liability_fz53_flow2_success.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_flow2.hpl + change_status_citizen_criminal_liability_fz53_flow2_error.hpl + Y + N + N + + + citizen_criminal_liability_fz53_flow3.hpl + change_status_citizen_criminal_liability_fz53_flow3_success.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_flow3.hpl + change_status_citizen_criminal_liability_fz53_flow3_error.hpl + Y + N + N + + + citizen_criminal_liability_fz53_flow4.hpl + change_status_citizen_criminal_liability_fz53_flow4_success.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_flow4.hpl + change_status_citizen_criminal_liability_fz53_flow4_error.hpl + Y + N + N + + + citizen_criminal_liability_fz53_flow5.hpl + change_status_citizen_criminal_liability_fz53_flow5_success.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_flow5.hpl + change_status_citizen_criminal_liability_fz53_flow5_error.hpl + Y + N + N + + + change_status_citizen_criminal_liability_fz53_flow5_error.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow5_success.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow4_error.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow4_success.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow3_error.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow3_success.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow2_error.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow2_success.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow1_error.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow1_success.hpl + checkpoint_job_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + checkpoint_job_citizen_criminal_liability_fz53.hpl + Success new citizen_criminal_liability_fz53 + Y + Y + N + + + checkpoint_job_citizen_criminal_liability_fz53.hpl (2) + branching_citizen_criminal_liability_fz53.hpl + Y + N + Y + + + Simple job_citizen_criminal_liability_fz53_exists check NEW + checkpoint_job_citizen_criminal_liability_fz53.hpl (2) + Y + N + N + + + delta_citizen_criminal_liability_fz53_flow1.hpl + change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl + Y + Y + N + + + delta_citizen_criminal_liability_fz53_flow1.hpl + change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + change_status_to_processing.hpl + Y + Y + N + + + Simple job_citizen_criminal_liability_fz53_exists check NEW + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl (2) + Y + Y + N + + + Simple citizen_criminal_liability_fz53 WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + delta_citizen_criminal_liability_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + change_status_to_processing_delta.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + Abort workflow 2 2 + Y + N + N + + + delta_citizen_criminal_liability_fz53_flow2.hpl + change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl + Y + Y + N + + + delta_citizen_criminal_liability_fz53_flow2.hpl + change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl + Y + N + N + + + delta_citizen_criminal_liability_fz53_flow3.hpl + change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl + Y + Y + N + + + delta_citizen_criminal_liability_fz53_flow3.hpl + change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl + Y + N + N + + + delta_citizen_criminal_liability_fz53_flow4.hpl + change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl + Y + Y + N + + + delta_citizen_criminal_liability_fz53_flow4.hpl + change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl + Y + N + N + + + delta_citizen_criminal_liability_fz53_flow5.hpl + change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl + Y + Y + N + + + delta_citizen_criminal_liability_fz53_flow5.hpl + change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + delta_citizen_criminal_liability_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + delta_citizen_criminal_liability_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + delta_citizen_criminal_liability_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + delta_citizen_criminal_liability_fz53_flow5.hpl + Y + Y + N + + + Simple citizen_criminal_liability_fz53 WHERE SUCCESS + branching_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + Simple delta_citizen_criminal_liability_fz53 WHERE ERROR + delta_citizen_criminal_liability_fz53 success + Y + N + N + + + branching_citizen_criminal_liability_fz53_delta.hpl + Simple delta_citizen_criminal_liability_fz53 WHERE ERROR + Y + Y + N + + + Simple delta_citizen_criminal_liability_fz53 WHERE ERROR + recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Y + Y + N + + + checkpoint_job_citizen_criminal_liability_fz53_delta.hpl + Success delta_citizen_criminal_liability_fz53 + Y + Y + N + + + citizen_criminal_liability_fz53_flow1.hpl 2 + change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 + Y + Y + N + + + citizen_criminal_liability_fz53_flow1.hpl 2 + change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 + Y + N + N + + + citizen_criminal_liability_fz53_flow2.hpl 2 + change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 + Y + Y + N + + + citizen_criminal_liability_fz53_flow2.hpl 2 + change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 + Y + N + N + + + citizen_criminal_liability_fz53_flow3.hpl 2 + change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 + Y + Y + N + + + citizen_criminal_liability_fz53_flow3.hpl 2 + change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 + Y + N + N + + + citizen_criminal_liability_fz53_flow4.hpl 2 + change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 + Y + Y + N + + + citizen_criminal_liability_fz53_flow4.hpl 2 + change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 + Y + N + N + + + citizen_criminal_liability_fz53_flow5.hpl 2 + change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 + Y + Y + N + + + citizen_criminal_liability_fz53_flow5.hpl 2 + change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 + Y + N + N + + + change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Y + N + Y + + + checkpoint_job_citizen_criminal_liability_fz53.hpl 2 + Success citizen_criminal_liability_fz53 after error + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_criminal_liability_fz53_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_criminal_liability_fz53_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_criminal_liability_fz53_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_criminal_liability_fz53_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_criminal_liability_fz53_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl new file mode 100644 index 0000000..7593fb2 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl @@ -0,0 +1,183 @@ + + + + citizen_criminal_liability_fz53_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + = + created_at + created_at + + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 880 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 448 + 288 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl new file mode 100644 index 0000000..29c6100 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl @@ -0,0 +1,180 @@ + + + + citizen_criminal_liability_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 880 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 448 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl new file mode 100644 index 0000000..17ccb53 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl @@ -0,0 +1,180 @@ + + + + citizen_criminal_liability_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 1120 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 688 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl new file mode 100644 index 0000000..67ebd63 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl @@ -0,0 +1,180 @@ + + + + citizen_criminal_liability_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 1104 + 416 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 672 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl new file mode 100644 index 0000000..811495c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl @@ -0,0 +1,180 @@ + + + + citizen_criminal_liability_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 944 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 512 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl new file mode 100644 index 0000000..bd7d195 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl @@ -0,0 +1,180 @@ + + + + delta_citizen_criminal_liability_fz53_flow1 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 928 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 496 + 336 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl new file mode 100644 index 0000000..eb09efe --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl @@ -0,0 +1,180 @@ + + + + delta_citizen_criminal_liability_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 1040 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 608 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl new file mode 100644 index 0000000..1fa9fe1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl @@ -0,0 +1,180 @@ + + + + delta_citizen_criminal_liability_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 1056 + 224 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 624 + 224 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl new file mode 100644 index 0000000..f15f7f6 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl @@ -0,0 +1,180 @@ + + + + delta_citizen_criminal_liability_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 960 + 416 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 528 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl new file mode 100644 index 0000000..99a4d0a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl @@ -0,0 +1,180 @@ + + + + delta_citizen_criminal_liability_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + Y + +
+ N + + + 1184 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + Y + + + 752 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..b7e3e03 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('citizen_criminal_liability_fz53_flow1', 'citizen_criminal_liability_fz53_flow2', 'citizen_criminal_liability_fz53_flow3', 'citizen_criminal_liability_fz53_flow4', 'citizen_criminal_liability_fz53_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl new file mode 100644 index 0000000..06f8364 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl @@ -0,0 +1,124 @@ + + + + branching_citizen_guardianship + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1040 + 416 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_guardianship' + N + + + 800 + 416 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1264 + 416 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl new file mode 100644 index 0000000..e6a5f14 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_guardianship_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_guardianship_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl new file mode 100644 index 0000000..571a7cf --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_guardianship_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_guardianship_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl new file mode 100644 index 0000000..7b836c5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_guardianship_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl new file mode 100644 index 0000000..5ce643b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_guardianship_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl new file mode 100644 index 0000000..4046d93 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_guardianship_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl new file mode 100644 index 0000000..ba9817b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_guardianship_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl new file mode 100644 index 0000000..09bc827 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_guardianship_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl new file mode 100644 index 0000000..4d21654 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_guardianship_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl new file mode 100644 index 0000000..88fd368 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_guardianship_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl new file mode 100644 index 0000000..0807eed --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_guardianship_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_guardianship_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl new file mode 100644 index 0000000..62e0d8a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_citizen_guardianship_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_guardianship' as job_name, + 'ERROR' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_citizen_guardianship' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl new file mode 100644 index 0000000..5628f74 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_citizen_guardianship_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_guardianship' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_citizen_guardianship' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..68d82dc --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_citizen_guardianship' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_guardianship_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_guardianship_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_guardianship_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_guardianship_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_guardianship_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..8be76b7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_child' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl new file mode 100644 index 0000000..64a9b1d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_citizen_guardianship_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_guardianship') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_guardianship' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_guardianship' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl new file mode 100644 index 0000000..a1db818 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_citizen_guardianship_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_citizen_guardianship_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl new file mode 100644 index 0000000..0413a04 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_guardianship + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + Table input + Insert / update + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 336 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1312 + 272 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_guardianship_flow1', + 'citizen_guardianship_flow2', + 'citizen_guardianship_flow3', + 'citizen_guardianship_flow4', + 'citizen_guardianship_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_guardianship_flow1', + 'citizen_guardianship_flow2', + 'citizen_guardianship_flow3', + 'citizen_guardianship_flow4', + 'citizen_guardianship_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_guardianship' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 944 + 272 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf new file mode 100644 index 0000000..1a90995 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/checkpoints/job_create_files_citizen_guardianship.hwf @@ -0,0 +1,235 @@ + + + job_create_files_citizen_guardianship + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl new file mode 100644 index 0000000..d8ed97e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl @@ -0,0 +1,122 @@ + + + + delta_citizen_guardianship + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 1072 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf b/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf new file mode 100644 index 0000000..3e49ea5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf @@ -0,0 +1,1811 @@ + + + job_citizen_guardianship + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 416 + 400 + + + + recruitment_rows_five_flow_citizen_guardianship.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 400 + + + + citizen_guardianship_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2704 + 80 + + + + citizen_guardianship_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2704 + 240 + + + + citizen_guardianship_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2704 + 400 + + + + citizen_guardianship_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2704 + 560 + + + + citizen_guardianship_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2704 + 720 + + + + Abort workflow + + ABORT + + N + N + 2368 + 208 + + + + checkpoint_job_citizen_guardianship.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl + Basic + + Y + + N + local + N + N + Y + N + 3424 + 416 + + + + Success new citizen + + SUCCESS + + N + 3872 + 416 + + + + branching_citizen_guardianship.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/branching_citizen_guardianship.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple child WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1888 + 1792 + + + + Simple child WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_citizen_guardianship.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/delta_citizen_guardianship.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2704 + 1792 + + + + Success delta_citizen + + SUCCESS + + N + 3328 + 1792 + + + + error delta_citizen + + SUCCESS + + N + 3328 + 1872 + + + + check_if_job_citizen_guardianship_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_job_citizen_guardianship_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 656 + 400 + + + + Simple job_citizen_guardianship_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 1008 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 1424 + 400 + + + + change_status_citizen_guardianship_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 80 + + + + change_status_citizen_guardianship_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 160 + + + + change_status_citizen_guardianship_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 240 + + + + change_status_citizen_guardianship_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 320 + + + + change_status_citizen_guardianship_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 400 + + + + change_status_citizen_guardianship_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 480 + + + + change_status_citizen_guardianship_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 560 + + + + change_status_citizen_guardianship_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 640 + + + + change_status_citizen_guardianship_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 720 + + + + change_status_citizen_guardianship_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 800 + + + + checkpoint_job_citizen_guardianship.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl + Basic + + Y + + N + local + N + N + Y + N + 1296 + 1280 + + + + citizen_guardianship_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2704 + 960 + + + + citizen_guardianship_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2704 + 1120 + + + + citizen_guardianship_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2704 + 1280 + + + + citizen_guardianship_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2704 + 1440 + + + + citizen_guardianship_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2704 + 1600 + + + + checkpoint_job_citizen_guardianship.hpl 3 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/checkpoint_job_citizen_guardianship.hpl + Basic + + Y + + N + local + N + N + Y + N + 3424 + 1296 + + + + Success new citizen 2 + + SUCCESS + + N + 3728 + 1296 + + + + change_status_citizen_guardianship_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 960 + + + + change_status_citizen_guardianship_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1040 + + + + change_status_citizen_guardianship_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1120 + + + + change_status_citizen_guardianship_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1200 + + + + change_status_citizen_guardianship_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1280 + + + + change_status_citizen_guardianship_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1360 + + + + change_status_citizen_guardianship_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1440 + + + + change_status_citizen_guardianship_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1520 + + + + change_status_citizen_guardianship_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1600 + + + + change_status_citizen_guardianship_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_citizen_guardianship_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1680 + + + + change_status_to_processing.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2096 + 1280 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2160 + 1792 + + + + change_status_delta_citizen_guardianship_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1792 + + + + change_status_delta_citizen_guardianship_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/change_status_delta_citizen_guardianship_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3024 + 1872 + + + + + + recruitment_rows_five_flow_citizen_guardianship.hpl + citizen_guardianship_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_guardianship.hpl + citizen_guardianship_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_guardianship.hpl + citizen_guardianship_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_guardianship.hpl + citizen_guardianship_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_guardianship.hpl + citizen_guardianship_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_guardianship.hpl + Abort workflow + Y + N + N + + + branching_citizen_guardianship.hpl + Simple child WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + check_if_job_citizen_guardianship_exists.hpl + Simple job_citizen_guardianship_exists check NEW + Y + Y + N + + + Simple job_citizen_guardianship_exists check NEW + change_status_to_processing.hpl + Y + Y + N + + + change_status_to_processing.hpl + recruitment_rows_five_flow_citizen_guardianship.hpl + Y + Y + N + + + citizen_guardianship_flow1.hpl + change_status_citizen_guardianship_flow1_success.hpl + Y + Y + N + + + citizen_guardianship_flow1.hpl + change_status_citizen_guardianship_flow1_error.hpl + Y + N + N + + + citizen_guardianship_flow2.hpl + change_status_citizen_guardianship_flow2_success.hpl + Y + Y + N + + + citizen_guardianship_flow2.hpl + change_status_citizen_guardianship_flow2_error.hpl + Y + N + N + + + citizen_guardianship_flow3.hpl + change_status_citizen_guardianship_flow3_success.hpl + Y + Y + N + + + citizen_guardianship_flow3.hpl + change_status_citizen_guardianship_flow3_error.hpl + Y + N + N + + + citizen_guardianship_flow4.hpl + change_status_citizen_guardianship_flow4_success.hpl + Y + Y + N + + + citizen_guardianship_flow4.hpl + change_status_citizen_guardianship_flow4_error.hpl + Y + N + N + + + citizen_guardianship_flow5.hpl + change_status_citizen_guardianship_flow5_success.hpl + Y + Y + N + + + citizen_guardianship_flow5.hpl + change_status_citizen_guardianship_flow5_error.hpl + Y + N + N + + + change_status_citizen_guardianship_flow1_success.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow1_error.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow2_success.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow2_error.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow3_success.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow3_error.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow4_success.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow4_error.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow5_success.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + change_status_citizen_guardianship_flow5_error.hpl + checkpoint_job_citizen_guardianship.hpl + Y + N + Y + + + checkpoint_job_citizen_guardianship.hpl + Success new citizen + Y + Y + N + + + Simple job_citizen_guardianship_exists check NEW + checkpoint_job_citizen_guardianship.hpl 2 + Y + N + N + + + checkpoint_job_citizen_guardianship.hpl 2 + branching_citizen_guardianship.hpl + Y + Y + N + + + citizen_guardianship_flow1.hpl 2 + change_status_citizen_guardianship_flow1_success.hpl 2 + Y + Y + N + + + citizen_guardianship_flow1.hpl 2 + change_status_citizen_guardianship_flow1_error.hpl 2 + Y + N + N + + + citizen_guardianship_flow2.hpl 2 + change_status_citizen_guardianship_flow2_success.hpl 2 + Y + Y + N + + + citizen_guardianship_flow2.hpl 2 + change_status_citizen_guardianship_flow2_error.hpl 2 + Y + N + N + + + citizen_guardianship_flow3.hpl 2 + change_status_citizen_guardianship_flow3_success.hpl 2 + Y + Y + N + + + citizen_guardianship_flow3.hpl 2 + change_status_citizen_guardianship_flow3_error.hpl 2 + Y + N + N + + + citizen_guardianship_flow4.hpl 2 + change_status_citizen_guardianship_flow4_success.hpl 2 + Y + Y + N + + + citizen_guardianship_flow4.hpl 2 + change_status_citizen_guardianship_flow4_error.hpl 2 + Y + N + N + + + citizen_guardianship_flow5.hpl 2 + change_status_citizen_guardianship_flow5_success.hpl 2 + Y + Y + N + + + citizen_guardianship_flow5.hpl 2 + change_status_citizen_guardianship_flow5_error.hpl 2 + Y + N + N + + + checkpoint_job_citizen_guardianship.hpl 3 + Success new citizen 2 + Y + Y + N + + + change_status_citizen_guardianship_flow1_success.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow1_error.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow2_success.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow2_error.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow3_success.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow3_error.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow4_success.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow4_error.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow5_success.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + change_status_citizen_guardianship_flow5_error.hpl 2 + checkpoint_job_citizen_guardianship.hpl 3 + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + citizen_guardianship_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_guardianship_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_guardianship_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_guardianship_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_guardianship_flow5.hpl 2 + Y + Y + N + + + change_status_to_processing.hpl 2 + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + Simple child WHERE ERROR + change_status_to_processing.hpl 2 + Y + Y + N + + + branching_citizen_guardianship.hpl + Simple child WHERE ERROR + Y + N + Y + + + Simple child WHERE SUCCESS + change_status_to_processing_delta.hpl + Y + Y + N + + + delta_citizen_guardianship.hpl + change_status_delta_citizen_guardianship_success.hpl + Y + Y + N + + + change_status_delta_citizen_guardianship_success.hpl + Success delta_citizen + Y + Y + N + + + change_status_delta_citizen_guardianship_error.hpl + error delta_citizen + Y + Y + N + + + change_status_to_processing_delta.hpl + delta_citizen_guardianship.hpl + Y + Y + N + + + delta_citizen_guardianship.hpl + change_status_delta_citizen_guardianship_error.hpl + Y + N + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl new file mode 100644 index 0000000..5db084f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow1.hpl @@ -0,0 +1,228 @@ + + + + citizen_guardianship_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 560 + 208 + сведения о лице опекаемом или находящемся на попечении + 349 + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Get variables + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 960 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl new file mode 100644 index 0000000..ecb257f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow2.hpl @@ -0,0 +1,141 @@ + + + + citizen_guardianship_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 656 + 208 + сведения о лице опекаемом или находящемся на попечении + 349 + + + + + Table input + Insert / update 2 + Y + + + + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 1056 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 560 + 288 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl new file mode 100644 index 0000000..7e5f328 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow3.hpl @@ -0,0 +1,141 @@ + + + + citizen_guardianship_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 800 + 256 + сведения о лице опекаемом или находящемся на попечении + 349 + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 1216 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 672 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl new file mode 100644 index 0000000..9c52b48 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow4.hpl @@ -0,0 +1,141 @@ + + + + citizen_guardianship_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 640 + 240 + сведения о лице опекаемом или находящемся на попечении + 349 + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 1088 + 320 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 528 + 320 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl new file mode 100644 index 0000000..a26e744 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/parallel/citizen_guardianship_flow5.hpl @@ -0,0 +1,141 @@ + + + + citizen_guardianship_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 704 + 256 + сведения о лице опекаемом или находящемся на попечении + 349 + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + full_name + full_name + Y + + + snils + snils + Y + +
+ N + + + 1024 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from ervu_dashboard.recruits_info ri +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array') +select + r.recruit_id AS recruit_id, + concat_ws(' ', ch->'fioOpek'->>'familiya', + ch->'fioOpek'->>'imya', + ch->'fioOpek'->>'otchestvo') full_name, + make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + ch->>'snils' snils +from ervu_dashboard.citizen r +join person on r.recruit_id = person.recruit_id + Y + + + 560 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..e5f247b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_guardianship/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,261 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id + +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +remains as ( + select + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at + ELSE null + END as cr_flow1, + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id + ELSE null + END as idm_flow1, + + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at + ELSE null + END as cr_flow2, + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id + ELSE null + END as idm_flow2, + + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at + ELSE null + END as cr_flow3, + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id + ELSE null + END as idm_flow3, + + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at + ELSE null + END as cr_flow4, + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id + ELSE null + END as idm_flow4, + + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at + ELSE null + END as cr_flow5, + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id + ELSE null + END as idm_flow5 + from splitted +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl new file mode 100644 index 0000000..8ad6911 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl @@ -0,0 +1,124 @@ + + + + branching_citizen_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_liability_fz53' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl new file mode 100644 index 0000000..45f831f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_citizen_liability_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_liability_fz53_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_citizen_liability_fz53_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_liability_fz53_delta' + ) +) t + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl new file mode 100644 index 0000000..51525dd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_liability_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_liability_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl new file mode 100644 index 0000000..516b012 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_liability_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_liability_fz53_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl new file mode 100644 index 0000000..5765a9e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_liability_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl new file mode 100644 index 0000000..f68afc4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_liability_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl new file mode 100644 index 0000000..4436574 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_liability_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl new file mode 100644 index 0000000..8988f0c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_liability_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl new file mode 100644 index 0000000..3f3c5b7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_liability_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl new file mode 100644 index 0000000..8e16f42 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_liability_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl new file mode 100644 index 0000000..8b54d7e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_liability_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl new file mode 100644 index 0000000..ba11212 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_liability_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_liability_fz53_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl new file mode 100644 index 0000000..84f72b4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl new file mode 100644 index 0000000..81381cb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl new file mode 100644 index 0000000..543c8ef --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_citizen_liability_fz53_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl new file mode 100644 index 0000000..24c35d7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl new file mode 100644 index 0000000..4fd1742 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl new file mode 100644 index 0000000..463529d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl new file mode 100644 index 0000000..2c43fdf --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl new file mode 100644 index 0000000..4e3ac61 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl new file mode 100644 index 0000000..87c2807 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl new file mode 100644 index 0000000..befcfd5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_citizen_liability_fz53_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_liability_fz53_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..688659d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_citizen_liability_fz53' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_liability_fz53_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_liability_fz53_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_liability_fz53_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_liability_fz53_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_liability_fz53_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..46b50cc --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_citizen_liability_fz53' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl new file mode 100644 index 0000000..e27b362 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_citizen_liability_fz53_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_liability_fz53') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_liability_fz53' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_liability_fz53' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl new file mode 100644 index 0000000..0d9cb80 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_snils_inn_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl new file mode 100644 index 0000000..a261d64 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_liability_fz53_flow1', + 'citizen_liability_fz53_flow2', + 'citizen_liability_fz53_flow3', + 'citizen_liability_fz53_flow4', + 'citizen_liability_fz53_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_liability_fz53_flow1', + 'citizen_liability_fz53_flow2', + 'citizen_liability_fz53_flow3', + 'citizen_liability_fz53_flow4', + 'citizen_liability_fz53_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_liability_fz53' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl new file mode 100644 index 0000000..e5f3aa0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_liability_fz53_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_citizen_liability_fz53_flow1', + 'delta_citizen_liability_fz53_flow2', + 'delta_citizen_liability_fz53_flow3', + 'delta_citizen_liability_fz53_flow4', + 'delta_citizen_liability_fz53_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_citizen_liability_fz53_flow1', + 'delta_citizen_liability_fz53_flow2', + 'delta_citizen_liability_fz53_flow3', + 'delta_citizen_liability_fz53_flow4', + 'delta_citizen_liability_fz53_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_liability_fz53_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf new file mode 100644 index 0000000..b6fe762 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf @@ -0,0 +1,2480 @@ + + + job_citizen_liability_fz53 + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_citizen_liability_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + citizen_liability_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + citizen_liability_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + citizen_liability_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + citizen_liability_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + citizen_liability_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new citizen_liability_fz53 + + SUCCESS + + N + 3728 + 432 + + + + branching_citizen_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 1536 + 1280 + + + + Simple citizen_liability_fz53 WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1584 + 1680 + + + + Simple citizen_liability_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2320 + 1040 + + + + delta_citizen_liability_fz53_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2640 + 1792 + + + + check_if_job_citizen_liability_fz53_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 576 + 400 + + + + Simple job_citizen_liability_fz53_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 560 + + + + change_status_citizen_liability_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_citizen_liability_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_citizen_liability_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_citizen_liability_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_citizen_liability_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_citizen_liability_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_citizen_liability_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_citizen_liability_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_citizen_liability_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_citizen_liability_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_citizen_liability_fz53.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2288 + 1424 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2384 + 2304 + + + + change_status_delta_citizen_liability_fz53_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_citizen_liability_fz53_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2320 + 2112 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2336 + 1952 + + + + delta_citizen_liability_fz53_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2640 + 1952 + + + + change_status_delta_citizen_liability_fz53_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1952 + + + + change_status_delta_citizen_liability_fz53_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2032 + + + + delta_citizen_liability_fz53_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2640 + 2112 + + + + change_status_delta_citizen_liability_fz53_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2112 + + + + change_status_delta_citizen_liability_fz53_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2192 + + + + delta_citizen_liability_fz53_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2640 + 2272 + + + + change_status_delta_citizen_liability_fz53_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2272 + + + + change_status_delta_citizen_liability_fz53_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2352 + + + + delta_citizen_liability_fz53_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2640 + 2432 + + + + change_status_delta_citizen_liability_fz53_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2432 + + + + change_status_delta_citizen_liability_fz53_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2512 + + + + branching_citizen_liability_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1616 + 2112 + + + + Simple delta_citizen_liability_fz53 WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1936 + 2112 + + + + delta_citizen_liability_fz53 success + + SUCCESS + + N + 2160 + 1952 + + + + checkpoint_job_citizen_liability_fz53_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 3440 + 2112 + + + + Success delta_citizen_liability_fz53 + + SUCCESS + + N + 3728 + 2112 + + + + citizen_liability_fz53_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + citizen_liability_fz53_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + citizen_liability_fz53_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + citizen_liability_fz53_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + citizen_liability_fz53_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success citizen_liability_fz53 after error + + SUCCESS + + N + 3728 + 1312 + + + + change_status_citizen_liability_fz53_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_citizen_liability_fz53_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_citizen_liability_fz53_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_citizen_liability_fz53_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_citizen_liability_fz53_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_citizen_liability_fz53_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_citizen_liability_fz53_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_citizen_liability_fz53_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_citizen_liability_fz53_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_citizen_liability_fz53_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_citizen_liability_fz53.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + citizen_liability_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + citizen_liability_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + citizen_liability_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + citizen_liability_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + citizen_liability_fz53_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + Abort workflow + Y + N + N + + + branching_citizen_liability_fz53.hpl + Simple citizen_liability_fz53 WHERE ERROR + Y + N + Y + + + branching_citizen_liability_fz53.hpl + Simple citizen_liability_fz53 WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_citizen_liability_fz53_exists.hpl + Y + Y + Y + + + check_if_job_citizen_liability_fz53_exists.hpl + Simple job_citizen_liability_fz53_exists check NEW + Y + Y + N + + + citizen_liability_fz53_flow1.hpl + change_status_citizen_liability_fz53_flow1_success.hpl + Y + Y + N + + + citizen_liability_fz53_flow1.hpl + change_status_citizen_liability_fz53_flow1_error.hpl + Y + N + N + + + citizen_liability_fz53_flow2.hpl + change_status_citizen_liability_fz53_flow2_success.hpl + Y + Y + N + + + citizen_liability_fz53_flow2.hpl + change_status_citizen_liability_fz53_flow2_error.hpl + Y + N + N + + + citizen_liability_fz53_flow3.hpl + change_status_citizen_liability_fz53_flow3_success.hpl + Y + Y + N + + + citizen_liability_fz53_flow3.hpl + change_status_citizen_liability_fz53_flow3_error.hpl + Y + N + N + + + citizen_liability_fz53_flow4.hpl + change_status_citizen_liability_fz53_flow4_success.hpl + Y + Y + N + + + citizen_liability_fz53_flow4.hpl + change_status_citizen_liability_fz53_flow4_error.hpl + Y + N + N + + + citizen_liability_fz53_flow5.hpl + change_status_citizen_liability_fz53_flow5_success.hpl + Y + Y + N + + + citizen_liability_fz53_flow5.hpl + change_status_citizen_liability_fz53_flow5_error.hpl + Y + N + N + + + change_status_citizen_liability_fz53_flow5_error.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow5_success.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow4_error.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow4_success.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow3_error.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow3_success.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow2_error.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow2_success.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow1_error.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + change_status_citizen_liability_fz53_flow1_success.hpl + checkpoint_job_citizen_liability_fz53.hpl + Y + N + Y + + + checkpoint_job_citizen_liability_fz53.hpl + Success new citizen_liability_fz53 + Y + Y + N + + + checkpoint_job_citizen_liability_fz53.hpl (2) + branching_citizen_liability_fz53.hpl + Y + N + Y + + + Simple job_citizen_liability_fz53_exists check NEW + checkpoint_job_citizen_liability_fz53.hpl (2) + Y + N + N + + + delta_citizen_liability_fz53_flow1.hpl + change_status_delta_citizen_liability_fz53_flow1_success.hpl + Y + Y + N + + + delta_citizen_liability_fz53_flow1.hpl + change_status_delta_citizen_liability_fz53_flow1_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl + change_status_to_processing.hpl + Y + Y + N + + + Simple job_citizen_liability_fz53_exists check NEW + recruitment_rows_five_flow_citizen_liability_fz53.hpl + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl (2) + Y + Y + N + + + Simple citizen_liability_fz53 WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + delta_citizen_liability_fz53_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + change_status_to_processing_delta.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + Abort workflow 2 2 + Y + N + N + + + delta_citizen_liability_fz53_flow2.hpl + change_status_delta_citizen_liability_fz53_flow2_success.hpl + Y + Y + N + + + delta_citizen_liability_fz53_flow2.hpl + change_status_delta_citizen_liability_fz53_flow2_error.hpl + Y + N + N + + + delta_citizen_liability_fz53_flow3.hpl + change_status_delta_citizen_liability_fz53_flow3_success.hpl + Y + Y + N + + + delta_citizen_liability_fz53_flow3.hpl + change_status_delta_citizen_liability_fz53_flow3_error.hpl + Y + N + N + + + delta_citizen_liability_fz53_flow4.hpl + change_status_delta_citizen_liability_fz53_flow4_success.hpl + Y + Y + N + + + delta_citizen_liability_fz53_flow4.hpl + change_status_delta_citizen_liability_fz53_flow4_error.hpl + Y + N + N + + + delta_citizen_liability_fz53_flow5.hpl + change_status_delta_citizen_liability_fz53_flow5_success.hpl + Y + Y + N + + + delta_citizen_liability_fz53_flow5.hpl + change_status_delta_citizen_liability_fz53_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + delta_citizen_liability_fz53_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + delta_citizen_liability_fz53_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + delta_citizen_liability_fz53_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + delta_citizen_liability_fz53_flow5.hpl + Y + Y + N + + + Simple citizen_liability_fz53 WHERE SUCCESS + branching_citizen_liability_fz53_delta.hpl + Y + Y + N + + + Simple delta_citizen_liability_fz53 WHERE ERROR + delta_citizen_liability_fz53 success + Y + N + N + + + branching_citizen_liability_fz53_delta.hpl + Simple delta_citizen_liability_fz53 WHERE ERROR + Y + Y + N + + + Simple delta_citizen_liability_fz53 WHERE ERROR + recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow1_success.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow3_success.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow2_error.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow2_success.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow1_error.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow3_error.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow4_success.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow4_error.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow5_success.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + change_status_delta_citizen_liability_fz53_flow5_error.hpl + checkpoint_job_citizen_liability_fz53_delta.hpl + Y + Y + N + + + checkpoint_job_citizen_liability_fz53_delta.hpl + Success delta_citizen_liability_fz53 + Y + Y + N + + + citizen_liability_fz53_flow1.hpl 2 + change_status_citizen_liability_fz53_flow1_success.hpl 2 + Y + Y + N + + + citizen_liability_fz53_flow1.hpl 2 + change_status_citizen_liability_fz53_flow1_error.hpl 2 + Y + N + N + + + citizen_liability_fz53_flow2.hpl 2 + change_status_citizen_liability_fz53_flow2_success.hpl 2 + Y + Y + N + + + citizen_liability_fz53_flow2.hpl 2 + change_status_citizen_liability_fz53_flow2_error.hpl 2 + Y + N + N + + + citizen_liability_fz53_flow3.hpl 2 + change_status_citizen_liability_fz53_flow3_success.hpl 2 + Y + Y + N + + + citizen_liability_fz53_flow3.hpl 2 + change_status_citizen_liability_fz53_flow3_error.hpl 2 + Y + N + N + + + citizen_liability_fz53_flow4.hpl 2 + change_status_citizen_liability_fz53_flow4_success.hpl 2 + Y + Y + N + + + citizen_liability_fz53_flow4.hpl 2 + change_status_citizen_liability_fz53_flow4_error.hpl 2 + Y + N + N + + + citizen_liability_fz53_flow5.hpl 2 + change_status_citizen_liability_fz53_flow5_success.hpl 2 + Y + Y + N + + + citizen_liability_fz53_flow5.hpl 2 + change_status_citizen_liability_fz53_flow5_error.hpl 2 + Y + N + N + + + change_status_citizen_liability_fz53_flow1_success.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow1_error.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow2_success.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow2_error.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow3_success.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow3_error.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow4_success.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow4_error.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow5_success.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + change_status_citizen_liability_fz53_flow5_error.hpl 2 + checkpoint_job_citizen_liability_fz53.hpl 2 + Y + N + Y + + + checkpoint_job_citizen_liability_fz53.hpl 2 + Success citizen_liability_fz53 after error + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_liability_fz53_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_liability_fz53_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_liability_fz53_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_liability_fz53_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_liability_fz53_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl new file mode 100644 index 0000000..61d564c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl @@ -0,0 +1,205 @@ + + + + citizen_liability_fz53_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + = + created_at + created_at + + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 880 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 448 + 288 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl new file mode 100644 index 0000000..1950156 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl @@ -0,0 +1,202 @@ + + + + citizen_liability_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 960 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 528 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl new file mode 100644 index 0000000..cb454d6 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl @@ -0,0 +1,202 @@ + + + + citizen_liability_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1056 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 624 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl new file mode 100644 index 0000000..49a4f14 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl @@ -0,0 +1,202 @@ + + + + citizen_liability_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1008 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 576 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl new file mode 100644 index 0000000..88a3711 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl @@ -0,0 +1,202 @@ + + + + citizen_liability_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1072 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 640 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl new file mode 100644 index 0000000..d336de5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl @@ -0,0 +1,202 @@ + + + + delta_citizen_liability_fz53_flow1 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1168 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 736 + 336 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl new file mode 100644 index 0000000..15704f1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl @@ -0,0 +1,202 @@ + + + + delta_citizen_liability_fz53_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1056 + 240 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 624 + 240 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl new file mode 100644 index 0000000..e1fe0b5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl @@ -0,0 +1,202 @@ + + + + delta_citizen_liability_fz53_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1152 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 720 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl new file mode 100644 index 0000000..19d16e5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl @@ -0,0 +1,202 @@ + + + + delta_citizen_liability_fz53_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1104 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 672 + 336 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl new file mode 100644 index 0000000..f18a7f4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl @@ -0,0 +1,202 @@ + + + + delta_citizen_liability_fz53_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + has_liability_fz53 + has_liability_fz53 + Y + +
+ N + + + 1184 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.hidden is false THEN true + ELSE false + END AS has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + Y + + + 752 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..92f9426 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('citizen_liability_fz53_flow1', 'citizen_liability_fz53_flow2', 'citizen_liability_fz53_flow3', 'citizen_liability_fz53_flow4', 'citizen_liability_fz53_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl new file mode 100644 index 0000000..a4251dd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl @@ -0,0 +1,124 @@ + + + + branching_citizen_spouse + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_spouse' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl new file mode 100644 index 0000000..dc19556 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_spouse_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_spouse_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl new file mode 100644 index 0000000..645816b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_citizen_spouse_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'citizen_spouse_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl new file mode 100644 index 0000000..8380623 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_spouse_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl new file mode 100644 index 0000000..baa3bbb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_citizen_spouse_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl new file mode 100644 index 0000000..495f0f1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_spouse_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl new file mode 100644 index 0000000..e399fd1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_citizen_spouse_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl new file mode 100644 index 0000000..5deb8d0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_spouse_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl new file mode 100644 index 0000000..f8024a0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_spouse_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl new file mode 100644 index 0000000..32fcfb9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_spouse_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl new file mode 100644 index 0000000..1bf12a5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_citizen_spouse_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'citizen_spouse_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl new file mode 100644 index 0000000..dcc34fb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_citizen_spouse_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_spouse' as job_name, + 'ERROR' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_citizen_spouse' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl new file mode 100644 index 0000000..d704ea8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_citizen_spouse_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_citizen_spouse' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_citizen_spouse' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..3ad2861 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_citizen_spouse' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_spouse_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_spouse_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_spouse_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_spouse_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'citizen_spouse_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..3619918 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_citizen_spouse' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl new file mode 100644 index 0000000..d1c2864 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_citizen_spouse_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_citizen_spouse') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_spouse' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_citizen_spouse' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl new file mode 100644 index 0000000..11ad83c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_citizen_spouse_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_citizen_spouse_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl new file mode 100644 index 0000000..ed32b9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_citizen_spouse + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_spouse_flow1', + 'citizen_spouse_flow2', + 'citizen_spouse_flow3', + 'citizen_spouse_flow4', + 'citizen_spouse_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_spouse_flow1', + 'citizen_spouse_flow2', + 'citizen_spouse_flow3', + 'citizen_spouse_flow4', + 'citizen_spouse_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_citizen_spouse' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf new file mode 100644 index 0000000..b31ca9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/checkpoints/xxjob_create_files_child.hwf @@ -0,0 +1,235 @@ + + + job_create_files_child + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl new file mode 100644 index 0000000..ee470cb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl @@ -0,0 +1,181 @@ + + + + delta_citizen_spouse + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 624 + 352 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 1024 + 352 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf b/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf new file mode 100644 index 0000000..c3c8681 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf @@ -0,0 +1,1841 @@ + + + job_citizen_spouse + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_citizen_spouse.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_citizen_spouse.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + citizen_spouse_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + citizen_spouse_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + citizen_spouse_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + citizen_spouse_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + citizen_spouse_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new citizen + + SUCCESS + + N + 3728 + 432 + + + + branching_citizen_spouse.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple citizen_spouse WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1792 + + + + Simple citizen_spouse WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_citizen_spouse.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/delta_citizen_spouse.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2640 + 1792 + + + + Success delta_citizen + + SUCCESS + + N + 3280 + 1792 + + + + error delta_citizen + + SUCCESS + + N + 3280 + 1872 + + + + check_if_job_citizen_spouse_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/check_if_job_citizen_spouse_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 576 + 400 + + + + Simple job_citizen_spouse_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 1264 + 400 + + + + change_status_citizen_spouse_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_citizen_spouse_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_citizen_spouse_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_citizen_spouse_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_citizen_spouse_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_citizen_spouse_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_citizen_spouse_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_citizen_spouse_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_citizen_spouse_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_citizen_spouse_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_citizen_spouse.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2112 + 1280 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2144 + 1792 + + + + change_status_delta_citizen_spouse_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_citizen_spouse_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_delta_citizen_spouse_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + citizen_spouse_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + citizen_spouse_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + citizen_spouse_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + citizen_spouse_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + citizen_spouse_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success new citizen 2 + + SUCCESS + + N + 3728 + 1312 + + + + change_status_citizen_spouse_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_citizen_spouse_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_citizen_spouse_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_citizen_spouse_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_citizen_spouse_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_citizen_spouse_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_citizen_spouse_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_citizen_spouse_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_citizen_spouse_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_citizen_spouse_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/change_status_citizen_spouse_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_citizen_spouse.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/checkpoints/checkpoint_job_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + + + recruitment_rows_five_flow_citizen_spouse.hpl + citizen_spouse_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_spouse.hpl + citizen_spouse_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_spouse.hpl + citizen_spouse_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_spouse.hpl + citizen_spouse_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_spouse.hpl + citizen_spouse_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_citizen_spouse.hpl + Abort workflow + Y + N + N + + + branching_citizen_spouse.hpl + Simple citizen_spouse WHERE ERROR + Y + N + Y + + + branching_citizen_spouse.hpl + Simple citizen_spouse WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_citizen_spouse_exists.hpl + Y + Y + Y + + + check_if_job_citizen_spouse_exists.hpl + Simple job_citizen_spouse_exists check NEW + Y + Y + N + + + Simple job_citizen_spouse_exists check NEW + change_status_to_processing.hpl + Y + Y + N + + + change_status_to_processing.hpl + recruitment_rows_five_flow_citizen_spouse.hpl + Y + Y + N + + + citizen_spouse_flow1.hpl + change_status_citizen_spouse_flow1_success.hpl + Y + Y + N + + + citizen_spouse_flow1.hpl + change_status_citizen_spouse_flow1_error.hpl + Y + N + N + + + citizen_spouse_flow2.hpl + change_status_citizen_spouse_flow2_success.hpl + Y + Y + N + + + citizen_spouse_flow2.hpl + change_status_citizen_spouse_flow2_error.hpl + Y + N + N + + + citizen_spouse_flow3.hpl + change_status_citizen_spouse_flow3_success.hpl + Y + Y + N + + + citizen_spouse_flow3.hpl + change_status_citizen_spouse_flow3_error.hpl + Y + N + N + + + citizen_spouse_flow4.hpl + change_status_citizen_spouse_flow4_success.hpl + Y + Y + N + + + citizen_spouse_flow4.hpl + change_status_citizen_spouse_flow4_error.hpl + Y + N + N + + + citizen_spouse_flow5.hpl + change_status_citizen_spouse_flow5_success.hpl + Y + Y + N + + + citizen_spouse_flow5.hpl + change_status_citizen_spouse_flow5_error.hpl + Y + N + N + + + change_status_citizen_spouse_flow5_error.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow5_success.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow4_error.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow4_success.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow3_error.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow3_success.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow2_error.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow2_success.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow1_error.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + change_status_citizen_spouse_flow1_success.hpl + checkpoint_job_citizen_spouse.hpl + Y + N + Y + + + checkpoint_job_citizen_spouse.hpl + Success new citizen + Y + Y + N + + + checkpoint_job_citizen_spouse.hpl (2) + branching_citizen_spouse.hpl + Y + N + Y + + + Simple job_citizen_spouse_exists check NEW + checkpoint_job_citizen_spouse.hpl (2) + Y + N + N + + + Simple citizen_spouse WHERE ERROR + change_status_to_processing.hpl (2) + Y + Y + N + + + change_status_to_processing.hpl (2) + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + Simple citizen_spouse WHERE SUCCESS + change_status_to_processing_delta.hpl + Y + Y + N + + + delta_citizen_spouse.hpl + change_status_delta_citizen_spouse_success.hpl + Y + Y + N + + + change_status_delta_citizen_spouse_success.hpl + Success delta_citizen + Y + Y + N + + + delta_citizen_spouse.hpl + change_status_delta_citizen_spouse_error.hpl + Y + N + N + + + change_status_delta_citizen_spouse_error.hpl + error delta_citizen + Y + Y + N + + + change_status_to_processing_delta.hpl + delta_citizen_spouse.hpl + Y + Y + N + + + citizen_spouse_flow1.hpl 2 + change_status_citizen_spouse_flow1_success.hpl 2 + Y + Y + N + + + citizen_spouse_flow1.hpl 2 + change_status_citizen_spouse_flow1_error.hpl 2 + Y + N + N + + + citizen_spouse_flow2.hpl 2 + change_status_citizen_spouse_flow2_success.hpl 2 + Y + Y + N + + + citizen_spouse_flow2.hpl 2 + change_status_citizen_spouse_flow2_error.hpl 2 + Y + N + N + + + citizen_spouse_flow3.hpl 2 + change_status_citizen_spouse_flow3_success.hpl 2 + Y + Y + N + + + citizen_spouse_flow3.hpl 2 + change_status_citizen_spouse_flow3_error.hpl 2 + Y + N + N + + + citizen_spouse_flow4.hpl 2 + change_status_citizen_spouse_flow4_success.hpl 2 + Y + Y + N + + + citizen_spouse_flow4.hpl 2 + change_status_citizen_spouse_flow4_error.hpl 2 + Y + N + N + + + citizen_spouse_flow5.hpl 2 + change_status_citizen_spouse_flow5_success.hpl 2 + Y + Y + N + + + citizen_spouse_flow5.hpl 2 + change_status_citizen_spouse_flow5_error.hpl 2 + Y + N + N + + + change_status_citizen_spouse_flow1_success.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow1_error.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow2_success.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow2_error.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow3_success.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow3_error.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow4_success.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow4_error.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow5_success.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + change_status_citizen_spouse_flow5_error.hpl 2 + checkpoint_job_citizen_spouse.hpl 2 + Y + N + Y + + + checkpoint_job_citizen_spouse.hpl 2 + Success new citizen 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_spouse_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_spouse_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_spouse_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_spouse_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + citizen_spouse_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl new file mode 100644 index 0000000..39782d4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow1.hpl @@ -0,0 +1,268 @@ + + + + citizen_spouse_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Get variables + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 944 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl new file mode 100644 index 0000000..712f5ee --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow2.hpl @@ -0,0 +1,180 @@ + + + + citizen_spouse_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 1280 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 784 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl new file mode 100644 index 0000000..bcb2772 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow3.hpl @@ -0,0 +1,180 @@ + + + + citizen_spouse_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 1152 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 656 + 336 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl new file mode 100644 index 0000000..31e629e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow4.hpl @@ -0,0 +1,180 @@ + + + + citizen_spouse_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 1184 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 688 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl new file mode 100644 index 0000000..18f686f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/parallel/citizen_spouse_flow5.hpl @@ -0,0 +1,180 @@ + + + + citizen_spouse_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + kinship_type + kinship_type + Y + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + death_date + death_date + Y + + + death_az_number + death_az_number + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + information_excluded + information_excluded + Y + +
+ N + + + 1152 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.recruit_id AS recruit_id, + supr->>'rodstvSvyazSuprugNaim' AS kinship_type, + CONCAT_WS(' ', + supr->'svedFLBS'->'fio'->>'familiya', + supr->'svedFLBS'->'fio'->>'imya', + supr->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + MAKE_DATE( + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int, + NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int + ) AS birth_date, + (supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date::date, + divorce_az_number, + divorce_date::date, + information_excluded +FROM ervu_dashboard.citizen r +JOIN suprug ON r.recruit_id = suprug.recruit_id + Y + + + 656 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..95a193c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/citizen_spouse/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,261 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_spouse ch on ch.recruit_id = cit.recruit_id + +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +remains as ( + select + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at + ELSE null + END as cr_flow1, + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id + ELSE null + END as idm_flow1, + + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at + ELSE null + END as cr_flow2, + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id + ELSE null + END as idm_flow2, + + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at + ELSE null + END as cr_flow3, + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id + ELSE null + END as idm_flow3, + + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at + ELSE null + END as cr_flow4, + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id + ELSE null + END as idm_flow4, + + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at + ELSE null + END as cr_flow5, + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id + ELSE null + END as idm_flow5 + from splitted +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl new file mode 100644 index 0000000..7828ef8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/branching_passport.hpl @@ -0,0 +1,124 @@ + + + + branching_passport + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_passport' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl new file mode 100644 index 0000000..eb035c0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_passport_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_passport' as job_name, + 'ERROR' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_passport' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl new file mode 100644 index 0000000..bed6c3f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_passport_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_passport' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_passport' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl new file mode 100644 index 0000000..11a8f7c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_passport_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'passport_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl new file mode 100644 index 0000000..3615a2d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_passport_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'passport_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl new file mode 100644 index 0000000..37d5e94 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_passport_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl new file mode 100644 index 0000000..1248307 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_passport_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl new file mode 100644 index 0000000..8d7d458 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_passport_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl new file mode 100644 index 0000000..be0921a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_passport_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl new file mode 100644 index 0000000..3065833 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_passport_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl new file mode 100644 index 0000000..3df9671 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_passport_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl new file mode 100644 index 0000000..5728a91 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_passport_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl new file mode 100644 index 0000000..e6e205c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_passport_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'passport_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..fa312e9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_passport' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'passport_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'passport_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'passport_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'passport_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'passport_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..451d2a8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_passport' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl new file mode 100644 index 0000000..4f21ffb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_passport_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_passport') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_passport' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_passport' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl new file mode 100644 index 0000000..4e652f1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_passport + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'passport_flow1', + 'passport_flow2', + 'passport_flow3', + 'passport_flow4', + 'passport_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'passport_flow1', + 'passport_flow2', + 'passport_flow3', + 'passport_flow4', + 'passport_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_passport' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl new file mode 100644 index 0000000..afde931 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/checkpoint_passport_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_passport_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf new file mode 100644 index 0000000..b31ca9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/checkpoints/xxjob_create_files_child.hwf @@ -0,0 +1,235 @@ + + + job_create_files_child + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl b/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl new file mode 100644 index 0000000..9eb2ddd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/delta_passport.hpl @@ -0,0 +1,141 @@ + + + + delta_passport + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 624 + 352 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + type_dul + type_dul + Y + + + unit_code + unit_code + Y + +
+ N + + + 1088 + 352 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf b/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf new file mode 100644 index 0000000..cd6680c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/job_passport.hwf @@ -0,0 +1,1845 @@ + + + job_passport + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_passport.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_passport.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + passport_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + passport_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + passport_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + passport_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + passport_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new citizen + + SUCCESS + + N + 3728 + 432 + + + + branching_passport.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/branching_passport.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple passport WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1792 + + + + Simple passport WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_passport.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/delta_passport.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2640 + 1792 + + + + Success delta_citizen + + SUCCESS + + N + 3216 + 1792 + + + + error delta_citizen + + SUCCESS + + N + 3216 + 1872 + + + + check_if_job_passport_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/check_if_job_passport_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 544 + 400 + + + + Simple job_passport_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 784 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 400 + + + + change_status_passport_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_passport_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_passport_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_passport_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_passport_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_passport_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_passport_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_passport_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_passport_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_passport_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_passport.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2112 + 1280 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2144 + 1792 + + + + change_status_delta_passport_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_passport_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_delta_passport_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + passport_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + passport_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + passport_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + passport_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + passport_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success new citizen 2 + + SUCCESS + + N + 3728 + 1312 + + + + change_status_passport_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_passport_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_passport_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_passport_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_passport_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_passport_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_passport_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_passport_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_passport_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_passport_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/change_status_passport_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_passport.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/checkpoints/checkpoint_job_passport.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + + + recruitment_rows_five_flow_passport.hpl + passport_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_passport.hpl + passport_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_passport.hpl + passport_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_passport.hpl + passport_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_passport.hpl + passport_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_passport.hpl + Abort workflow + Y + N + N + + + branching_passport.hpl + Simple passport WHERE ERROR + Y + N + Y + + + branching_passport.hpl + Simple passport WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_passport_exists.hpl + Y + Y + Y + + + check_if_job_passport_exists.hpl + Simple job_passport_exists check NEW + Y + Y + N + + + Simple job_passport_exists check NEW + change_status_to_processing.hpl + Y + Y + N + + + change_status_to_processing.hpl + recruitment_rows_five_flow_passport.hpl + Y + Y + N + + + passport_flow1.hpl + change_status_passport_flow1_success.hpl + Y + Y + N + + + passport_flow1.hpl + change_status_passport_flow1_error.hpl + Y + N + N + + + passport_flow2.hpl + change_status_passport_flow2_success.hpl + Y + Y + N + + + passport_flow2.hpl + change_status_passport_flow2_error.hpl + Y + N + N + + + passport_flow3.hpl + change_status_passport_flow3_success.hpl + Y + Y + N + + + passport_flow3.hpl + change_status_passport_flow3_error.hpl + Y + N + N + + + passport_flow4.hpl + change_status_passport_flow4_success.hpl + Y + Y + N + + + passport_flow4.hpl + change_status_passport_flow4_error.hpl + Y + N + N + + + passport_flow5.hpl + change_status_passport_flow5_success.hpl + Y + Y + N + + + passport_flow5.hpl + change_status_passport_flow5_error.hpl + Y + N + N + + + change_status_passport_flow5_error.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow5_success.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow4_error.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow4_success.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow3_error.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow3_success.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow2_error.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow2_success.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow1_error.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + change_status_passport_flow1_success.hpl + checkpoint_job_passport.hpl + Y + N + Y + + + checkpoint_job_passport.hpl + Success new citizen + Y + Y + N + + + checkpoint_job_passport.hpl (2) + branching_passport.hpl + Y + N + Y + + + Simple job_passport_exists check NEW + checkpoint_job_passport.hpl (2) + Y + N + N + + + Simple passport WHERE ERROR + change_status_to_processing.hpl (2) + Y + Y + N + + + change_status_to_processing.hpl (2) + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + Simple passport WHERE SUCCESS + change_status_to_processing_delta.hpl + Y + Y + N + + + delta_passport.hpl + change_status_delta_passport_success.hpl + Y + Y + N + + + change_status_delta_passport_success.hpl + Success delta_citizen + Y + Y + N + + + delta_passport.hpl + change_status_delta_passport_error.hpl + Y + N + N + + + change_status_delta_passport_error.hpl + error delta_citizen + Y + Y + N + + + passport_flow1.hpl 2 + change_status_passport_flow1_success.hpl 2 + Y + Y + N + + + passport_flow1.hpl 2 + change_status_passport_flow1_error.hpl 2 + Y + N + N + + + passport_flow2.hpl 2 + change_status_passport_flow2_success.hpl 2 + Y + Y + N + + + passport_flow2.hpl 2 + change_status_passport_flow2_error.hpl 2 + Y + N + N + + + passport_flow3.hpl 2 + change_status_passport_flow3_success.hpl 2 + Y + Y + N + + + passport_flow3.hpl 2 + change_status_passport_flow3_error.hpl 2 + Y + N + N + + + passport_flow4.hpl 2 + change_status_passport_flow4_success.hpl 2 + Y + Y + N + + + passport_flow4.hpl 2 + change_status_passport_flow4_error.hpl 2 + Y + N + N + + + passport_flow5.hpl 2 + change_status_passport_flow5_success.hpl 2 + Y + Y + N + + + passport_flow5.hpl 2 + change_status_passport_flow5_error.hpl 2 + Y + N + N + + + change_status_passport_flow1_success.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow1_error.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow2_success.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow2_error.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow3_success.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow3_error.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow4_success.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow4_error.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow5_success.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + change_status_passport_flow5_error.hpl 2 + checkpoint_job_passport.hpl 2 + Y + N + Y + + + checkpoint_job_passport.hpl 2 + Success new citizen 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + passport_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + passport_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + passport_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + passport_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + passport_flow5.hpl 2 + Y + Y + N + + + change_status_to_processing_delta.hpl + delta_passport.hpl + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl new file mode 100644 index 0000000..8e5bde8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow1.hpl @@ -0,0 +1,224 @@ + + + + passport_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Get variables + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + unit_code + unit_code + Y + +
+ N + + + 944 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl new file mode 100644 index 0000000..884e7b9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow2.hpl @@ -0,0 +1,137 @@ + + + + passport_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + unit_code + unit_code + Y + +
+ N + + + 1216 + 416 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 720 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl new file mode 100644 index 0000000..9597d30 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow3.hpl @@ -0,0 +1,137 @@ + + + + passport_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + unit_code + unit_code + Y + +
+ N + + + 1280 + 432 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 784 + 432 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl new file mode 100644 index 0000000..6d005a8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow4.hpl @@ -0,0 +1,137 @@ + + + + passport_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + unit_code + unit_code + Y + +
+ N + + + 1280 + 448 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 784 + 448 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl new file mode 100644 index 0000000..c1d7b20 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/parallel/passport_flow5.hpl @@ -0,0 +1,137 @@ + + + + passport_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + passport
+ + recruit_id + recruit_id + N + + + actual + actual + Y + + + issue_date + issue_date + Y + + + organization_name + organization_name + Y + + + passport_number + passport_number + Y + + + passport_series + passport_series + Y + + + unit_code + unit_code + Y + +
+ N + + + 1296 + 496 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.recruit_id AS recruit_id, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name, + ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code, + TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date, + CASE + WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1' + THEN TRUE ELSE FALSE + END AS actual +FROM ervu_dashboard.recruits_info ri +--join public.recruits r on r.id = ri.recruit_id +join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4 +AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6 + Y + + + 800 + 496 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..c45bc33 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/passport/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,261 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.passport ch on ch.recruit_id = cit.recruit_id + +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +remains as ( + select + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at + ELSE null + END as cr_flow1, + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id + ELSE null + END as idm_flow1, + + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at + ELSE null + END as cr_flow2, + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id + ELSE null + END as idm_flow2, + + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at + ELSE null + END as cr_flow3, + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id + ELSE null + END as idm_flow3, + + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at + ELSE null + END as cr_flow4, + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id + ELSE null + END as idm_flow4, + + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at + ELSE null + END as cr_flow5, + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id + ELSE null + END as idm_flow5 + from splitted +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl new file mode 100644 index 0000000..9d0672e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl @@ -0,0 +1,124 @@ + + + + branching_prosecution + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_prosecution' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl new file mode 100644 index 0000000..c48e595 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_prosecution_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_prosecution' as job_name, + 'ERROR' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_prosecution' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl new file mode 100644 index 0000000..cce1fed --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_prosecution_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_prosecution' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_prosecution' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl new file mode 100644 index 0000000..0169754 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_prosecution_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'prosecution_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl new file mode 100644 index 0000000..b7da38b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_prosecution_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'prosecution_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl new file mode 100644 index 0000000..7e19275 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_prosecution_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl new file mode 100644 index 0000000..31210c2 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_prosecution_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl new file mode 100644 index 0000000..fadd007 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_prosecution_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl new file mode 100644 index 0000000..b359b96 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_prosecution_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl new file mode 100644 index 0000000..999578d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_prosecution_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl new file mode 100644 index 0000000..a171b65 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_prosecution_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl new file mode 100644 index 0000000..3ddd2e7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_prosecution_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl new file mode 100644 index 0000000..bebb11a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_prosecution_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'prosecution_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..86aba83 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_prosecution' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'prosecution_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'prosecution_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'prosecution_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'prosecution_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'prosecution_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..5be41e9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_prosecution' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl new file mode 100644 index 0000000..3a00226 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_prosecution_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_prosecution') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_prosecution' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_prosecution' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl new file mode 100644 index 0000000..b56b2e5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_prosecution + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'prosecution_flow1', + 'prosecution_flow2', + 'prosecution_flow3', + 'prosecution_flow4', + 'prosecution_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'prosecution_flow1', + 'prosecution_flow2', + 'prosecution_flow3', + 'prosecution_flow4', + 'prosecution_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_prosecution' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl new file mode 100644 index 0000000..06ffe21 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_prosecution_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_prosecution_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf new file mode 100644 index 0000000..b31ca9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/checkpoints/xxjob_create_files_child.hwf @@ -0,0 +1,235 @@ + + + job_create_files_child + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl b/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl new file mode 100644 index 0000000..bc20c7a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl @@ -0,0 +1,180 @@ + + + + delta_prosecution + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 624 + 352 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 1040 + 352 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf b/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf new file mode 100644 index 0000000..4ec227f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/job_prosecution.hwf @@ -0,0 +1,1843 @@ + + + job_prosecution + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_prosecution.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_prosecution.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + prosecution_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + prosecution_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + prosecution_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + prosecution_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + prosecution_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new prosecution + + SUCCESS + + N + 3728 + 432 + + + + branching_prosecution.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/branching_prosecution.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple prosecution WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1792 + + + + Simple prosecution WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_prosecution.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/delta_prosecution.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2640 + 1792 + + + + Success delta_prosecution + + SUCCESS + + N + 3280 + 1792 + + + + error delta_prosecution + + SUCCESS + + N + 3280 + 1872 + + + + check_if_job_prosecution_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/check_if_job_prosecution_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 576 + 400 + + + + Simple job_prosecution_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 1264 + 400 + + + + change_status_prosecution_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_prosecution_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_prosecution_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_prosecution_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_prosecution_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_prosecution_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_prosecution_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_prosecution_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_prosecution_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_prosecution_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_prosecution.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2112 + 1280 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_to_processing_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2144 + 1792 + + + + change_status_delta_prosecution_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_prosecution_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_delta_prosecution_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + prosecution_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + prosecution_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + prosecution_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + prosecution_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + prosecution_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success new prosecution 2 + + SUCCESS + + N + 3728 + 1312 + + + + change_status_prosecution_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_prosecution_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_prosecution_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_prosecution_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_prosecution_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_prosecution_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_prosecution_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_prosecution_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_prosecution_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_prosecution_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/change_status_prosecution_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_prosecution.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/checkpoints/checkpoint_job_prosecution.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + + + recruitment_rows_five_flow_prosecution.hpl + prosecution_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_prosecution.hpl + prosecution_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_prosecution.hpl + prosecution_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_prosecution.hpl + prosecution_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_prosecution.hpl + prosecution_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_prosecution.hpl + Abort workflow + Y + N + N + + + branching_prosecution.hpl + Simple prosecution WHERE ERROR + Y + N + Y + + + branching_prosecution.hpl + Simple prosecution WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_prosecution_exists.hpl + Y + Y + Y + + + check_if_job_prosecution_exists.hpl + Simple job_prosecution_exists check NEW + Y + Y + N + + + Simple job_prosecution_exists check NEW + change_status_to_processing.hpl + Y + Y + N + + + change_status_to_processing.hpl + recruitment_rows_five_flow_prosecution.hpl + Y + Y + N + + + prosecution_flow1.hpl + change_status_prosecution_flow1_success.hpl + Y + Y + N + + + prosecution_flow1.hpl + change_status_prosecution_flow1_error.hpl + Y + N + N + + + prosecution_flow2.hpl + change_status_prosecution_flow2_success.hpl + Y + Y + N + + + prosecution_flow2.hpl + change_status_prosecution_flow2_error.hpl + Y + N + N + + + prosecution_flow3.hpl + change_status_prosecution_flow3_success.hpl + Y + Y + N + + + prosecution_flow3.hpl + change_status_prosecution_flow3_error.hpl + Y + N + N + + + prosecution_flow4.hpl + change_status_prosecution_flow4_success.hpl + Y + Y + N + + + prosecution_flow4.hpl + change_status_prosecution_flow4_error.hpl + Y + N + N + + + prosecution_flow5.hpl + change_status_prosecution_flow5_success.hpl + Y + Y + N + + + prosecution_flow5.hpl + change_status_prosecution_flow5_error.hpl + Y + N + N + + + change_status_prosecution_flow5_error.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow5_success.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow4_error.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow4_success.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow3_error.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow3_success.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow2_error.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow2_success.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow1_error.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + change_status_prosecution_flow1_success.hpl + checkpoint_job_prosecution.hpl + Y + N + Y + + + checkpoint_job_prosecution.hpl + Success new prosecution + Y + Y + N + + + checkpoint_job_prosecution.hpl (2) + branching_prosecution.hpl + Y + N + Y + + + Simple job_prosecution_exists check NEW + checkpoint_job_prosecution.hpl (2) + Y + N + N + + + Simple prosecution WHERE ERROR + change_status_to_processing.hpl (2) + Y + Y + N + + + change_status_to_processing.hpl (2) + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + Simple prosecution WHERE SUCCESS + change_status_to_processing_delta.hpl + Y + Y + N + + + delta_prosecution.hpl + change_status_delta_prosecution_success.hpl + Y + Y + N + + + change_status_delta_prosecution_success.hpl + Success delta_prosecution + Y + Y + N + + + delta_prosecution.hpl + change_status_delta_prosecution_error.hpl + Y + N + N + + + change_status_delta_prosecution_error.hpl + error delta_prosecution + Y + Y + N + + + change_status_to_processing_delta.hpl + delta_prosecution.hpl + Y + Y + N + + + prosecution_flow1.hpl 2 + change_status_prosecution_flow1_success.hpl 2 + Y + Y + N + + + prosecution_flow1.hpl 2 + change_status_prosecution_flow1_error.hpl 2 + Y + N + N + + + prosecution_flow2.hpl 2 + change_status_prosecution_flow2_success.hpl 2 + Y + Y + N + + + prosecution_flow2.hpl 2 + change_status_prosecution_flow2_error.hpl 2 + Y + N + N + + + prosecution_flow3.hpl 2 + change_status_prosecution_flow3_success.hpl 2 + Y + Y + N + + + prosecution_flow3.hpl 2 + change_status_prosecution_flow3_error.hpl 2 + Y + N + N + + + prosecution_flow4.hpl 2 + change_status_prosecution_flow4_success.hpl 2 + Y + Y + N + + + prosecution_flow4.hpl 2 + change_status_prosecution_flow4_error.hpl 2 + Y + N + N + + + prosecution_flow5.hpl 2 + change_status_prosecution_flow5_success.hpl 2 + Y + Y + N + + + prosecution_flow5.hpl 2 + change_status_prosecution_flow5_error.hpl 2 + Y + N + N + + + change_status_prosecution_flow1_success.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow1_error.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow2_success.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow2_error.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow3_success.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow3_error.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow4_success.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow4_error.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow5_success.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + change_status_prosecution_flow5_error.hpl 2 + checkpoint_job_prosecution.hpl 2 + Y + N + Y + + + checkpoint_job_prosecution.hpl 2 + Success new prosecution 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + prosecution_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + prosecution_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + prosecution_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + prosecution_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + prosecution_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl new file mode 100644 index 0000000..4443790 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow1.hpl @@ -0,0 +1,266 @@ + + + + prosecution_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Get variables + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 960 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl new file mode 100644 index 0000000..2ae10e8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow2.hpl @@ -0,0 +1,179 @@ + + + + prosecution_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 1232 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 736 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl new file mode 100644 index 0000000..edc58d3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow3.hpl @@ -0,0 +1,179 @@ + + + + prosecution_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 1216 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 720 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl new file mode 100644 index 0000000..165c016 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow4.hpl @@ -0,0 +1,179 @@ + + + + prosecution_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 1184 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl new file mode 100644 index 0000000..b74189b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/parallel/prosecution_flow5.hpl @@ -0,0 +1,179 @@ + + + + prosecution_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + case_number + case_number + Y + + + case_number_court + case_number_court + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + reclassification + reclassification + Y + + + termination_basis + termination_basis + Y + + + transfer_to_court + transfer_to_court + Y + +
+ N + + + 1216 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ugolov_presl AS ( + SELECT + jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up, + ri.recruit_id + --'prOtsSvedUgolovPresl' + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' +) +SELECT + r.recruit_id AS recruit_id, + --up->'sledSud'->>'uk', -- уголовный кодекс? + up->'sledSud'->'extend'->>'nomerUDPredv' AS case_number, -- номер уголовного дела (предварительный) + up->'sledSud'->'extend'->>'svedPerekvalif' AS reclassification, -- сведения о переквалификации деяния + --up->'sledSud'->'extend'->>'kodVidUgolovPresl', -- + up->'sledSud'->'extend'->>'naimVidUgolovPresl' AS kind, -- наименование вида уголовного преследования + CASE + WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true -- передано в суд + ELSE false -- нет или нет инфы + END AS transfer_to_court, -- признак передачи в суд уголовного дела в отношении гражданина? + + --up->'sledSud'->>'naimSud', -- Наименование суда??? + up->'sledSud'->>'nomerUD' AS case_number_court, -- номер уголовного дела??? номер уголовного дела (судебный) + STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point, -- статьи уголовного кодекса + up->'sledSud'->>'naimOrgan' AS authority_name, -- наименование органа принявшего решение + --up->'sledSud'->'svedSnyat'->>'osnSnyatSud', -- основание прекращения уголовного преследования??? + --up->'sledSud'->'svedSnyat'->>'dataSnyatSud', -- дата прекращения уголовного преследования + --up->'sledSud'->'svedSnyat'->>'dataOsuzhd', -- дата осуждения??? = + up->'sledSud'->'svedSnyat'->>'dataVozbUD' AS create_date, -- дата возбуждения уголовного дела + up->'sledSud'->'svedSnyat'->>'osnPrekrUD' AS termination_basis, -- основания прекращения уголовного дела = основания прекращения уголовного преследования? + --up->'sledSud'->'svedSnyat'->>'statusNaim' , -- ???? + up->'sledSud'->'svedSnyat'->>'dataPrekrUD' AS close_date--, -- дата прекращения уголовного дела + --up->>'sledSudTekst', -- ??? + --up->>'sledSudPriznak' -- ??? + --'UG_PRESL' AS info_type +FROM ervu_dashboard.citizen r +JOIN ugolov_presl up ON r.recruit_id = up.recruit_id +LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true +GROUP BY r.recruit_id, up + Y + + + 720 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..2b2626f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/prosecution/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,261 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.prosecution ch on ch.recruit_id = cit.recruit_id + +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +remains as ( + select + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at + ELSE null + END as cr_flow1, + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id + ELSE null + END as idm_flow1, + + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at + ELSE null + END as cr_flow2, + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id + ELSE null + END as idm_flow2, + + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at + ELSE null + END as cr_flow3, + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id + ELSE null + END as idm_flow3, + + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at + ELSE null + END as cr_flow4, + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id + ELSE null + END as idm_flow4, + + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at + ELSE null + END as cr_flow5, + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id + ELSE null + END as idm_flow5 + from splitted +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl new file mode 100644 index 0000000..74f2576 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/branching_punishment.hpl @@ -0,0 +1,124 @@ + + + + branching_punishment + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_citizen_spouse' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl new file mode 100644 index 0000000..adf6c94 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_punishment_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_punishment' as job_name, + 'ERROR' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_punishment' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl new file mode 100644 index 0000000..54bcb5c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl @@ -0,0 +1,110 @@ + + + + change_status_delta_punishment_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_punishment' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + +union all + + SELECT + 'job_punishment' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl new file mode 100644 index 0000000..91e4623 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_punishment_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'punishment_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl new file mode 100644 index 0000000..0ff574d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_punishment_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'punishment_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl new file mode 100644 index 0000000..5e28ac4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_punishment_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl new file mode 100644 index 0000000..25899f0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_punishment_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl new file mode 100644 index 0000000..3691584 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_punishment_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl new file mode 100644 index 0000000..74aef8f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_punishment_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl new file mode 100644 index 0000000..c7f7cf6 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_punishment_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl new file mode 100644 index 0000000..752e93e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_punishment_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl new file mode 100644 index 0000000..86d3ef7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_punishment_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl new file mode 100644 index 0000000..7d1092e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_punishment_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'punishment_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..82712b4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_punishment' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'punishment_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'punishment_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'punishment_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'punishment_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'punishment_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..4408027 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_punishment' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl new file mode 100644 index 0000000..6333e4e --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_punishment_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_punishment') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_punishment' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_punishment' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl new file mode 100644 index 0000000..7a9995f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_punishment + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'punishment_flow1', + 'punishment_flow2', + 'punishment_flow3', + 'punishment_flow4', + 'punishment_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'punishment_flow1', + 'punishment_flow2', + 'punishment_flow3', + 'punishment_flow4', + 'punishment_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_punishment' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl new file mode 100644 index 0000000..d8db141 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_punishment_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_punishment_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf new file mode 100644 index 0000000..b31ca9f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/checkpoints/xxjob_create_files_child.hwf @@ -0,0 +1,235 @@ + + + job_create_files_child + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_child_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + N + 848 + 416 + + + + state_child_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + N + 848 + 336 + + + + state_child_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + N + 848 + 496 + + + + state_child_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + N + 848 + 576 + + + + state_child_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "child_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_child + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 848 + 256 + + + + + + Start + state_child_flow3_new + Y + Y + Y + + + Start + state_child_flow2_new + Y + Y + Y + + + Start + state_child_flow1_new + Y + Y + Y + + + Start + state_child_flow4_new + Y + Y + Y + + + Start + state_child_flow5_new + Y + Y + Y + + + state_child_flow5_new + Success + Y + Y + N + + + state_child_flow4_new + Success + Y + Y + N + + + state_child_flow3_new + Success + Y + Y + N + + + state_child_flow2_new + Success + Y + Y + N + + + state_child_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_child + Y + Y + Y + + + Delete file state_job_child + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl b/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl new file mode 100644 index 0000000..0741988 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/delta_punishment.hpl @@ -0,0 +1,162 @@ + + + + delta_punishment + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 1264 + 416 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 768 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf b/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf new file mode 100644 index 0000000..04c4ac1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/job_punishment.hwf @@ -0,0 +1,1841 @@ + + + job_punishment + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_punishment.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_punishment.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + punishment_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + punishment_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + punishment_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + punishment_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + punishment_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success punishment + + SUCCESS + + N + 3728 + 432 + + + + branching_citizen_spouse.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/branching_citizen_spouse.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple punishment WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1792 + + + + Simple punishment WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_punishment.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/delta_punishment.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2640 + 1792 + + + + Success delta_punishment + + SUCCESS + + N + 3280 + 1792 + + + + error delta_punishment + + SUCCESS + + N + 3280 + 1872 + + + + check_if_job_punishment_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/check_if_job_punishment_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 576 + 400 + + + + Simple job_punishment_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 1264 + 400 + + + + change_status_punishment_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_punishment_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_punishment_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_punishment_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_punishment_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_punishment_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_punishment_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_punishment_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_punishment_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_punishment_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_punishment.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2112 + 1280 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2144 + 1792 + + + + change_status_delta_punishment_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_punishment_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_delta_punishment_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + punishment_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + punishment_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + punishment_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + punishment_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + punishment_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success new punishment 2 + + SUCCESS + + N + 3728 + 1312 + + + + change_status_punishment_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_punishment_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_punishment_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_punishment_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_punishment_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_punishment_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_punishment_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_punishment_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_punishment_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_punishment_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/change_status_punishment_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_punishment.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/checkpoints/checkpoint_job_punishment.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + + + recruitment_rows_five_flow_punishment.hpl + punishment_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_punishment.hpl + punishment_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_punishment.hpl + punishment_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_punishment.hpl + punishment_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_punishment.hpl + punishment_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_punishment.hpl + Abort workflow + Y + N + N + + + branching_citizen_spouse.hpl + Simple punishment WHERE ERROR + Y + N + Y + + + branching_citizen_spouse.hpl + Simple punishment WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_punishment_exists.hpl + Y + Y + Y + + + check_if_job_punishment_exists.hpl + Simple job_punishment_exists check NEW + Y + Y + N + + + Simple job_punishment_exists check NEW + change_status_to_processing.hpl + Y + Y + N + + + change_status_to_processing.hpl + recruitment_rows_five_flow_punishment.hpl + Y + Y + N + + + punishment_flow1.hpl + change_status_punishment_flow1_success.hpl + Y + Y + N + + + punishment_flow1.hpl + change_status_punishment_flow1_error.hpl + Y + N + N + + + punishment_flow2.hpl + change_status_punishment_flow2_success.hpl + Y + Y + N + + + punishment_flow2.hpl + change_status_punishment_flow2_error.hpl + Y + N + N + + + punishment_flow3.hpl + change_status_punishment_flow3_success.hpl + Y + Y + N + + + punishment_flow3.hpl + change_status_punishment_flow3_error.hpl + Y + N + N + + + punishment_flow4.hpl + change_status_punishment_flow4_success.hpl + Y + Y + N + + + punishment_flow4.hpl + change_status_punishment_flow4_error.hpl + Y + N + N + + + punishment_flow5.hpl + change_status_punishment_flow5_success.hpl + Y + Y + N + + + punishment_flow5.hpl + change_status_punishment_flow5_error.hpl + Y + N + N + + + change_status_punishment_flow5_error.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow5_success.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow4_error.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow4_success.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow3_error.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow3_success.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow2_error.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow2_success.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow1_error.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + change_status_punishment_flow1_success.hpl + checkpoint_job_punishment.hpl + Y + N + Y + + + checkpoint_job_punishment.hpl + Success punishment + Y + Y + N + + + checkpoint_job_punishment.hpl (2) + branching_citizen_spouse.hpl + Y + N + Y + + + Simple job_punishment_exists check NEW + checkpoint_job_punishment.hpl (2) + Y + N + N + + + Simple punishment WHERE ERROR + change_status_to_processing.hpl (2) + Y + Y + N + + + change_status_to_processing.hpl (2) + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + Simple punishment WHERE SUCCESS + change_status_to_processing_delta.hpl + Y + Y + N + + + delta_punishment.hpl + change_status_delta_punishment_success.hpl + Y + Y + N + + + change_status_delta_punishment_success.hpl + Success delta_punishment + Y + Y + N + + + delta_punishment.hpl + change_status_delta_punishment_error.hpl + Y + N + N + + + change_status_delta_punishment_error.hpl + error delta_punishment + Y + Y + N + + + change_status_to_processing_delta.hpl + delta_punishment.hpl + Y + Y + N + + + punishment_flow1.hpl 2 + change_status_punishment_flow1_success.hpl 2 + Y + Y + N + + + punishment_flow1.hpl 2 + change_status_punishment_flow1_error.hpl 2 + Y + N + N + + + punishment_flow2.hpl 2 + change_status_punishment_flow2_success.hpl 2 + Y + Y + N + + + punishment_flow2.hpl 2 + change_status_punishment_flow2_error.hpl 2 + Y + N + N + + + punishment_flow3.hpl 2 + change_status_punishment_flow3_success.hpl 2 + Y + Y + N + + + punishment_flow3.hpl 2 + change_status_punishment_flow3_error.hpl 2 + Y + N + N + + + punishment_flow4.hpl 2 + change_status_punishment_flow4_success.hpl 2 + Y + Y + N + + + punishment_flow4.hpl 2 + change_status_punishment_flow4_error.hpl 2 + Y + N + N + + + punishment_flow5.hpl 2 + change_status_punishment_flow5_success.hpl 2 + Y + Y + N + + + punishment_flow5.hpl 2 + change_status_punishment_flow5_error.hpl 2 + Y + N + N + + + change_status_punishment_flow1_success.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow1_error.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow2_success.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow2_error.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow3_success.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow3_error.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow4_success.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow4_error.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow5_success.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + change_status_punishment_flow5_error.hpl 2 + checkpoint_job_punishment.hpl 2 + Y + N + Y + + + checkpoint_job_punishment.hpl 2 + Success new punishment 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + punishment_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + punishment_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + punishment_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + punishment_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + punishment_flow5.hpl 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl new file mode 100644 index 0000000..a5f6f18 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow1.hpl @@ -0,0 +1,163 @@ + + + + punishment_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 944 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 448 + 288 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl new file mode 100644 index 0000000..1a606b8 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow2.hpl @@ -0,0 +1,162 @@ + + + + punishment_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 1184 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 688 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl new file mode 100644 index 0000000..3b0454f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow3.hpl @@ -0,0 +1,161 @@ + + + + punishment_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 1200 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 704 + 384 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl new file mode 100644 index 0000000..b3cb7c1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow4.hpl @@ -0,0 +1,161 @@ + + + + punishment_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 1152 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 656 + 368 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl new file mode 100644 index 0000000..d65536f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/parallel/punishment_flow5.hpl @@ -0,0 +1,161 @@ + + + + punishment_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + punishment
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + sentence + sentence + Y + + + sentence_place + sentence_place + Y + + + sentence_changed + sentence_changed + Y + + + punishment_type + punishment_type + Y + + + start_date + start_date + Y + + + release_date + release_date + Y + + + sentense_date + sentense_date + Y + + + law_point + law_point + Y + + + release_reason + release_reason + Y + +
+ N + + + 1344 + 416 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ugol AS ( + SELECT ri.recruit_id, + jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS nakaz + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null' +) +SELECT recruit_id, + nakaz ->> 'naimSud' AS authority_name, + nakaz ->> 'srokNakaz' AS sentence, + nakaz ->> 'adresOrg' AS sentence_place, +-- nakaz->>'vidNakaz' AS punishment_code, + nakaz ->> 'naimIzmSrokNakaz' AS sentence_changed, + nakaz ->> 'vidNakaz' AS punishment_type, + TO_DATE(nakaz ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, + TO_DATE(nakaz ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, + TO_DATE(nakaz ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, + string_agg(statiuk_elem, ', ') AS law_point, + nakaz ->> 'osnOsvob' AS release_reason +FROM ugol + LEFT JOIN LATERAL jsonb_array_elements_text(nakaz -> 'statiUK') AS statiuk_elem ON true +GROUP BY recruit_id, nakaz; + Y + + + 848 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..4e3598a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/punishment/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,261 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.punishment ch on ch.recruit_id = cit.recruit_id + +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +remains as ( + select + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN created_at + ELSE null + END as cr_flow1, + CASE + WHEN created_at >= (select cr_flow1 from result_max) and flow_num = 1 THEN idm_id + ELSE null + END as idm_flow1, + + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN created_at + ELSE null + END as cr_flow2, + CASE + WHEN created_at >= (select cr_flow2 from result_max) and flow_num = 2 THEN idm_id + ELSE null + END as idm_flow2, + + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN created_at + ELSE null + END as cr_flow3, + CASE + WHEN created_at >= (select cr_flow3 from result_max) and flow_num = 3 THEN idm_id + ELSE null + END as idm_flow3, + + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN created_at + ELSE null + END as cr_flow4, + CASE + WHEN created_at >= (select cr_flow4 from result_max) and flow_num = 4 THEN idm_id + ELSE null + END as idm_flow4, + + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN created_at + ELSE null + END as cr_flow5, + CASE + WHEN created_at >= (select cr_flow5 from result_max) and flow_num = 5 THEN idm_id + ELSE null + END as idm_flow5 + from splitted +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl new file mode 100644 index 0000000..aacbef5 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl @@ -0,0 +1,124 @@ + + + + branching_snils_inn + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_snils_inn' + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl new file mode 100644 index 0000000..0415b07 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_snils_inn_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 09:54:43.724 + - + 2025/06/09 09:54:43.724 + + + + + + Set variables 2 + Write to log 2 + N + + + Table input + Set variables 2 + Y + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1056 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_snils_inn_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_snils_inn_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_snils_inn_delta' + ) +) t + N + + + 816 + 256 + + + + Write to log 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 1280 + 256 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl new file mode 100644 index 0000000..272ccc9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl new file mode 100644 index 0000000..60a3e53 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl new file mode 100644 index 0000000..c2dbe25 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_snils_inn_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl new file mode 100644 index 0000000..549321d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl new file mode 100644 index 0000000..681da71 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl new file mode 100644 index 0000000..2f7cad3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl new file mode 100644 index 0000000..13ffe89 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl new file mode 100644 index 0000000..552dbf7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl new file mode 100644 index 0000000..93465e3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl new file mode 100644 index 0000000..c961ab0 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl @@ -0,0 +1,101 @@ + + + + change_status_delta_snils_inn_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_snils_inn_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl new file mode 100644 index 0000000..5bfe2fe --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl @@ -0,0 +1,250 @@ + + + + change_status_snils_inn_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'snils_inn_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl new file mode 100644 index 0000000..f6b19c4 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl @@ -0,0 +1,250 @@ + + + + change_status_snils_inn_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'snils_inn_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl new file mode 100644 index 0000000..1c08c6d --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_snils_inn_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl new file mode 100644 index 0000000..5a31299 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_snils_inn_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl new file mode 100644 index 0000000..8955f9a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_snils_inn_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl new file mode 100644 index 0000000..1784e80 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_snils_inn_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl new file mode 100644 index 0000000..164d123 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_snils_inn_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl new file mode 100644 index 0000000..d5f76cd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_snils_inn_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl new file mode 100644 index 0000000..9763f85 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl @@ -0,0 +1,256 @@ + + + + change_status_snils_inn_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl new file mode 100644 index 0000000..72af375 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl @@ -0,0 +1,256 @@ + + + + change_status_snils_inn_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'snils_inn_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..d0e503c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_snils_inn' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'snils_inn_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'snils_inn_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'snils_inn_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'snils_inn_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'snils_inn_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..6ace1f9 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,102 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_snils_inn' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl new file mode 100644 index 0000000..8d7a204 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_snils_inn_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_snils_inn') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_snils_inn' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_snils_inn' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl new file mode 100644 index 0000000..1403bee --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_snils_inn + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'snils_inn_flow1', + 'snils_inn_flow2', + 'snils_inn_flow3', + 'snils_inn_flow4', + 'snils_inn_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'snils_inn_flow1', + 'snils_inn_flow2', + 'snils_inn_flow3', + 'snils_inn_flow4', + 'snils_inn_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_snils_inn' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl new file mode 100644 index 0000000..100f8e1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl @@ -0,0 +1,869 @@ + + + + checkpoint_job_snils_inn_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 14:19:02.590 + - + 2025/06/03 14:19:02.590 + + + + + + Filter rows + Abort + N + + + JSON input state_child_flow1.json + Filter rows + N + + + JSON input state_child_flow2.json + Filter rows + N + + + JSON input state_child_flow3.json + Filter rows + N + + + JSON input state_child_flow4.json + Filter rows + N + + + JSON input state_child_flow5.json + Filter rows + N + + + Table input + Insert / update + Y + + + Dummy (do nothing) + JSON input state_child_flow1.json + N + + + Dummy (do nothing) + JSON input state_child_flow2.json + N + + + Dummy (do nothing) + JSON input state_child_flow3.json + N + + + Dummy (do nothing) + JSON input state_child_flow4.json + N + + + Dummy (do nothing) + JSON input state_child_flow5.json + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1264 + 592 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 352 + 592 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + child_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 944 + 592 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1264 + 208 + +
+ + JSON input state_child_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 432 + + + + JSON input state_child_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 512 + + + + JSON input state_child_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 592 + + + + JSON input state_child_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 672 + + + + JSON input state_child_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 640 + 752 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_snils_inn_flow1', + 'delta_snils_inn_flow2', + 'delta_snils_inn_flow3', + 'delta_snils_inn_flow4', + 'delta_snils_inn_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_snils_inn_flow1', + 'delta_snils_inn_flow2', + 'delta_snils_inn_flow3', + 'delta_snils_inn_flow4', + 'delta_snils_inn_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_snils_inn_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 896 + 208 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl new file mode 100644 index 0000000..0d9cb80 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl @@ -0,0 +1,273 @@ + + + + checkpoint_snils_inn_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/09 10:01:04.895 + - + 2025/06/09 10:01:04.895 + + + + + + Select values + Table output + N + + + Table input + Select values + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 608 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id + FROM ervu_dashboard.citizen cit + join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_child_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_child_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 736 + 448 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 1248 + 448 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf b/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf new file mode 100644 index 0000000..c94e531 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf @@ -0,0 +1,2516 @@ + + + job_snils_inn + Y + + + + 0 + - + 2025/06/05 14:27:15.055 + - + 2025/06/05 14:27:15.055 + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 400 + + + + checkpoint_job_snils_inn.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + N + 1136 + 1280 + + + + recruitment_rows_five_flow_snils_inn.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 400 + + + + snils_inn_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 80 + + + + snils_inn_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 240 + + + + snils_inn_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 400 + + + + snils_inn_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 560 + + + + snils_inn_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 720 + + + + Abort workflow + + ABORT + + N + N + 2336 + 208 + + + + Success new snils_inn + + SUCCESS + + N + 3728 + 432 + + + + branching_snils_inn.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + N + 1584 + 1280 + + + + Simple snils_inn WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1696 + 1680 + + + + Simple snils_inn WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1840 + 1280 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2384 + 1280 + + + + Abort workflow 2 + + ABORT + + N + N + 2288 + 1040 + + + + delta_snils_inn_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + + Y + + Y + local + N + N + Y + N + 2640 + 1792 + + + + check_if_job_snils_inn_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 576 + 400 + + + + Simple job_snils_inn_exists check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 896 + 400 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 560 + + + + change_status_snils_inn_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 80 + + + + change_status_snils_inn_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 160 + + + + change_status_snils_inn_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 240 + + + + change_status_snils_inn_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 320 + + + + change_status_snils_inn_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 400 + + + + change_status_snils_inn_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 480 + + + + change_status_snils_inn_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 560 + + + + change_status_snils_inn_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 640 + + + + change_status_snils_inn_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 720 + + + + change_status_snils_inn_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 800 + + + + checkpoint_job_snils_inn.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 432 + + + + change_status_to_processing.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 1424 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2384 + 2304 + + + + change_status_delta_snils_inn_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1792 + + + + change_status_delta_snils_inn_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1872 + + + + snils_inn_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2672 + 960 + + + + snils_inn_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2672 + 1120 + + + + snils_inn_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2672 + 1280 + + + + snils_inn_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2672 + 1440 + + + + snils_inn_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2672 + 1600 + + + + Success snils_inn after error + + SUCCESS + + N + 3728 + 1312 + + + + change_status_snils_inn_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 960 + + + + change_status_snils_inn_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1040 + + + + change_status_snils_inn_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1120 + + + + change_status_snils_inn_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1200 + + + + change_status_snils_inn_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1280 + + + + change_status_snils_inn_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1360 + + + + change_status_snils_inn_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1440 + + + + change_status_snils_inn_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1520 + + + + change_status_snils_inn_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1600 + + + + change_status_snils_inn_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1680 + + + + checkpoint_job_snils_inn.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + N + 3456 + 1312 + + + + recruitment_rows_five_flow_snils_inn.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2352 + 2112 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2336 + 1952 + + + + delta_snils_inn_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + + Y + + Y + local + N + N + Y + N + 2640 + 1952 + + + + change_status_delta_snils_inn_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 1952 + + + + change_status_delta_snils_inn_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2032 + + + + delta_snils_inn_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + + Y + + Y + local + N + N + Y + N + 2640 + 2112 + + + + change_status_delta_snils_inn_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2112 + + + + change_status_delta_snils_inn_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2192 + + + + delta_snils_inn_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + + Y + + Y + local + N + N + Y + N + 2640 + 2272 + + + + change_status_delta_snils_inn_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2272 + + + + change_status_delta_snils_inn_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2352 + + + + delta_snils_inn_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl + + + Basic + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + + Y + + Y + local + N + N + Y + N + 2640 + 2432 + + + + change_status_delta_snils_inn_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2432 + + + + change_status_delta_snils_inn_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 2992 + 2512 + + + + branching_snils_inn_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1824 + 2112 + + + + Simple delta_snils_inn WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2064 + 2112 + + + + delta_snils_inn success + + SUCCESS + + N + 2160 + 1952 + + + + checkpoint_job_snils_inn_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 3440 + 2112 + + + + Success delta_snils_inn + + SUCCESS + + N + 3728 + 2112 + + + + + + recruitment_rows_five_flow_snils_inn.hpl + snils_inn_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + snils_inn_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + snils_inn_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + snils_inn_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + snils_inn_flow5.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + Abort workflow + Y + N + N + + + branching_snils_inn.hpl + Simple snils_inn WHERE ERROR + Y + N + Y + + + branching_snils_inn.hpl + Simple snils_inn WHERE SUCCESS + Y + N + Y + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_snils_inn_exists.hpl + Y + Y + Y + + + check_if_job_snils_inn_exists.hpl + Simple job_snils_inn_exists check NEW + Y + Y + N + + + snils_inn_flow1.hpl + change_status_snils_inn_flow1_success.hpl + Y + Y + N + + + snils_inn_flow1.hpl + change_status_snils_inn_flow1_error.hpl + Y + N + N + + + snils_inn_flow2.hpl + change_status_snils_inn_flow2_success.hpl + Y + Y + N + + + snils_inn_flow2.hpl + change_status_snils_inn_flow2_error.hpl + Y + N + N + + + snils_inn_flow3.hpl + change_status_snils_inn_flow3_success.hpl + Y + Y + N + + + snils_inn_flow3.hpl + change_status_snils_inn_flow3_error.hpl + Y + N + N + + + snils_inn_flow4.hpl + change_status_snils_inn_flow4_success.hpl + Y + Y + N + + + snils_inn_flow4.hpl + change_status_snils_inn_flow4_error.hpl + Y + N + N + + + snils_inn_flow5.hpl + change_status_snils_inn_flow5_success.hpl + Y + Y + N + + + snils_inn_flow5.hpl + change_status_snils_inn_flow5_error.hpl + Y + N + N + + + change_status_snils_inn_flow5_error.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow5_success.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow4_error.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow4_success.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow3_error.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow3_success.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow2_error.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow2_success.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow1_error.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + change_status_snils_inn_flow1_success.hpl + checkpoint_job_snils_inn.hpl + Y + N + Y + + + checkpoint_job_snils_inn.hpl + Success new snils_inn + Y + Y + N + + + checkpoint_job_snils_inn.hpl (2) + branching_snils_inn.hpl + Y + N + Y + + + Simple job_snils_inn_exists check NEW + checkpoint_job_snils_inn.hpl (2) + Y + N + N + + + delta_snils_inn_flow1.hpl + change_status_delta_snils_inn_flow1_success.hpl + Y + Y + N + + + delta_snils_inn_flow1.hpl + change_status_delta_snils_inn_flow1_error.hpl + Y + N + N + + + snils_inn_flow1.hpl 2 + change_status_snils_inn_flow1_success.hpl 2 + Y + Y + N + + + snils_inn_flow1.hpl 2 + change_status_snils_inn_flow1_error.hpl 2 + Y + N + N + + + snils_inn_flow2.hpl 2 + change_status_snils_inn_flow2_success.hpl 2 + Y + Y + N + + + snils_inn_flow2.hpl 2 + change_status_snils_inn_flow2_error.hpl 2 + Y + N + N + + + snils_inn_flow3.hpl 2 + change_status_snils_inn_flow3_success.hpl 2 + Y + Y + N + + + snils_inn_flow3.hpl 2 + change_status_snils_inn_flow3_error.hpl 2 + Y + N + N + + + snils_inn_flow4.hpl 2 + change_status_snils_inn_flow4_success.hpl 2 + Y + Y + N + + + snils_inn_flow4.hpl 2 + change_status_snils_inn_flow4_error.hpl 2 + Y + N + N + + + snils_inn_flow5.hpl 2 + change_status_snils_inn_flow5_success.hpl 2 + Y + Y + N + + + snils_inn_flow5.hpl 2 + change_status_snils_inn_flow5_error.hpl 2 + Y + N + N + + + change_status_snils_inn_flow1_success.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow1_error.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow2_success.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow2_error.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow3_success.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow3_error.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow4_success.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow4_error.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow5_success.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + change_status_snils_inn_flow5_error.hpl 2 + checkpoint_job_snils_inn.hpl 2 + Y + N + Y + + + checkpoint_job_snils_inn.hpl 2 + Success snils_inn after error + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + snils_inn_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + snils_inn_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + snils_inn_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + snils_inn_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + snils_inn_flow5.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl + change_status_to_processing.hpl + Y + Y + N + + + Simple job_snils_inn_exists check NEW + recruitment_rows_five_flow_snils_inn.hpl + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl (2) + Y + Y + N + + + Simple snils_inn WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + delta_snils_inn_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + change_status_to_processing_delta.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + Abort workflow 2 2 + Y + N + N + + + delta_snils_inn_flow2.hpl + change_status_delta_snils_inn_flow2_success.hpl + Y + Y + N + + + delta_snils_inn_flow2.hpl + change_status_delta_snils_inn_flow2_error.hpl + Y + N + N + + + delta_snils_inn_flow3.hpl + change_status_delta_snils_inn_flow3_success.hpl + Y + Y + N + + + delta_snils_inn_flow3.hpl + change_status_delta_snils_inn_flow3_error.hpl + Y + N + N + + + delta_snils_inn_flow4.hpl + change_status_delta_snils_inn_flow4_success.hpl + Y + Y + N + + + delta_snils_inn_flow4.hpl + change_status_delta_snils_inn_flow4_error.hpl + Y + N + N + + + delta_snils_inn_flow5.hpl + change_status_delta_snils_inn_flow5_success.hpl + Y + Y + N + + + delta_snils_inn_flow5.hpl + change_status_delta_snils_inn_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + delta_snils_inn_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + delta_snils_inn_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + delta_snils_inn_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow_snils_inn.hpl 2 + delta_snils_inn_flow5.hpl + Y + Y + N + + + Simple snils_inn WHERE SUCCESS + branching_snils_inn_delta.hpl + Y + Y + N + + + Simple delta_snils_inn WHERE ERROR + delta_snils_inn success + Y + N + N + + + branching_snils_inn_delta.hpl + Simple delta_snils_inn WHERE ERROR + Y + Y + N + + + Simple delta_snils_inn WHERE ERROR + recruitment_rows_five_flow_snils_inn.hpl 2 + Y + Y + N + + + change_status_delta_snils_inn_flow1_success.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow3_success.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow2_error.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow2_success.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow1_error.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow3_error.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow4_success.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow4_error.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow5_success.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + change_status_delta_snils_inn_flow5_error.hpl + checkpoint_job_snils_inn_delta.hpl + Y + Y + N + + + checkpoint_job_snils_inn_delta.hpl + Success delta_snils_inn + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 1088 + 176 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl new file mode 100644 index 0000000..fc9877b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl @@ -0,0 +1,202 @@ + + + + delta_snils_inn_flow1 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1184 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1184 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 704 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl new file mode 100644 index 0000000..dc170be --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl @@ -0,0 +1,202 @@ + + + + delta_snils_inn_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1184 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1184 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 704 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl new file mode 100644 index 0000000..9042d44 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl @@ -0,0 +1,202 @@ + + + + delta_snils_inn_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1184 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1184 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 704 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl new file mode 100644 index 0000000..655073f --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl @@ -0,0 +1,202 @@ + + + + delta_snils_inn_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1184 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1184 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 704 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl new file mode 100644 index 0000000..f2ffc7a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl @@ -0,0 +1,202 @@ + + + + delta_snils_inn_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/03 16:10:48.509 + - + 2025/06/03 16:10:48.509 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1184 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1184 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 704 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl new file mode 100644 index 0000000..4515f7c --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl @@ -0,0 +1,208 @@ + + + + snils_inn_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + IS NOT NULL + inn + + + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 928 + 208 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 448 + 288 + + + + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + IS NOT NULL + snils + + + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 928 + 368 + +
+ + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl new file mode 100644 index 0000000..12d0170 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl @@ -0,0 +1,201 @@ + + + + snils_inn_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1152 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1152 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 672 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl new file mode 100644 index 0000000..d2fc08b --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl @@ -0,0 +1,201 @@ + + + + snils_inn_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1120 + 336 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1120 + 496 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 640 + 416 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl new file mode 100644 index 0000000..cbdc121 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl @@ -0,0 +1,201 @@ + + + + snils_inn_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1216 + 384 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1216 + 544 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 736 + 464 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl new file mode 100644 index 0000000..6f1cadb --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl @@ -0,0 +1,201 @@ + + + + snils_inn_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update inn + Y + + + Table input + Insert / update snils + Y + + + + Insert / update inn + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 1200 + 320 + +
+ + Insert / update snils + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1200 + 480 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + Y + + + 720 + 400 + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..a4a5b8a --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('snils_inn_flow1', 'snils_inn_flow2', 'snils_inn_flow3', 'snils_inn_flow4', 'snils_inn_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl b/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..dcb65d7 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'work_activity_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl b/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl new file mode 100644 index 0000000..70c1393 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_work_activity_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'work_activity_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl b/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl new file mode 100644 index 0000000..c42cfdd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl @@ -0,0 +1,27 @@ + + + + delta_work_activity + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:02.780 + - + 2025/08/05 12:54:02.780 + + + + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl new file mode 100644 index 0000000..1ade769 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl @@ -0,0 +1,384 @@ + + + + work_activity_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Table input + Table output + Y + + + Table output + Change job status on success + Y + + + Create job execution record + Table input + Y + + + Table output + Change job status on error + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 992 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 992 + 320 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 10 + WITH trud_info AS (SELECT ri.info, + ri.recruit_id::uuid, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 + END AS trud_deyat, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN + jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = + 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 + END AS parental_leave_info, + + COALESCE( + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' + ) AS employer, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' + THEN + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 + ELSE + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' + END AS reg_ip, + + COALESCE( + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' + ) AS self_employment + + FROM ervu_dashboard.recruits_info ri + +) +SELECT ti.recruit_id::uuid, + (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, + ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, + (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, + ti.trud_deyat ->> 'trudFunkcziya' AS position, + ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, + ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, + CASE + WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' + WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' + END AS employer_category, + COALESCE( + ti.employer -> 'svedYUL' ->> 'innyul', + ti.employer -> 'svedIP' ->> 'innyfl' + ) AS employer_inn, + ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, + COALESCE( + ti.employer -> 'svedIP' ->> 'ogrnip', + ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' + ) AS employer_ogrnip, + ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, + ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, + (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, + (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, + ( + (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND + ( + (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR + (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date + ) + ) AS parental_leave_active, + (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, + (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, + ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, + ti.reg_ip IS NOT NULL AS active_ip, + ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, + ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, + ti.self_employment IS NOT NULL AS active_self_employment +FROM trud_info ti; + + Y + + + 496 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_work_activity
+ N + Y + N + Y + + + 720 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl new file mode 100644 index 0000000..1a50b86 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl @@ -0,0 +1,396 @@ + + + + work_activity_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Table output + Y + + + Table output + Change job status on error + Y + + + Table output + Change job status on success + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + error_code + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ?, + error_code = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 416 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + + Y + + N + + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 224 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 10 + WITH trud_info AS (SELECT ri.info, + ri.recruit_id::uuid, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 + END AS trud_deyat, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN + jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = + 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 + END AS parental_leave_info, + + COALESCE( + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' + ) AS employer, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' + THEN + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 + ELSE + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' + END AS reg_ip, + + COALESCE( + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' + ) AS self_employment + + FROM ervu_dashboard.recruits_info ri + +) +SELECT ti.recruit_id::uuid, + (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, + ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, + (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, + ti.trud_deyat ->> 'trudFunkcziya' AS position, + ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, + ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, + CASE + WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' + WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' + END AS employer_category, + COALESCE( + ti.employer -> 'svedYUL' ->> 'innyul', + ti.employer -> 'svedIP' ->> 'innyfl' + ) AS employer_inn, + ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, + COALESCE( + ti.employer -> 'svedIP' ->> 'ogrnip', + ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' + ) AS employer_ogrnip, + ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, + ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, + (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, + (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, + ( + (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND + ( + (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR + (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date + ) + ) AS parental_leave_active, + (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, + (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, + ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, + ti.reg_ip IS NOT NULL AS active_ip, + ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, + ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, + ti.self_employment IS NOT NULL AS active_self_employment +FROM trud_info ti; + + Y + + + 544 + 224 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_work_activity
+ N + Y + N + Y + + + 768 + 224 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl new file mode 100644 index 0000000..6d5d9cd --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl @@ -0,0 +1,407 @@ + + + + work_activity_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Table output + Y + + + Table output + Change job status on error + Y + + + Table output + Change job status on success + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + error_code + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 976 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 976 + 208 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + error_code, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL; + + + 272 + 208 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 10 + WITH trud_info AS (SELECT ri.info, + ri.recruit_id::uuid, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 + END AS trud_deyat, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN + jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = + 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 + END AS parental_leave_info, + + COALESCE( + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' + ) AS employer, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' + THEN + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 + ELSE + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' + END AS reg_ip, + + COALESCE( + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' + ) AS self_employment + + FROM ervu_dashboard.recruits_info ri + +) +SELECT ti.recruit_id::uuid, + (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, + ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, + (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, + ti.trud_deyat ->> 'trudFunkcziya' AS position, + ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, + ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, + CASE + WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' + WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' + END AS employer_category, + COALESCE( + ti.employer -> 'svedYUL' ->> 'innyul', + ti.employer -> 'svedIP' ->> 'innyfl' + ) AS employer_inn, + ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, + COALESCE( + ti.employer -> 'svedIP' ->> 'ogrnip', + ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' + ) AS employer_ogrnip, + ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, + ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, + (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, + (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, + ( + (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND + ( + (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR + (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date + ) + ) AS parental_leave_active, + (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, + (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, + ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, + ti.reg_ip IS NOT NULL AS active_ip, + ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, + ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, + ti.self_employment IS NOT NULL AS active_self_employment +FROM trud_info ti; + + Y + + + 480 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_work_activity
+ N + Y + N + Y + + + 704 + 208 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..c8787e1 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + work_activity_flow_delta.hpl + Y + + + Table input + work_activity_flow_delta.hpl 2 + Y + + + Table input + work_activity_flow_delta.hpl 3 + Y + + + Table input + work_activity_flow_delta.hpl 4 + Y + + + Table input + work_activity_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'work_activity_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + work_activity_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 128 + + + + work_activity_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + work_activity_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 288 + + + + work_activity_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 368 + + + + work_activity_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 448 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..e1aeda3 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + work_activity_flow_repeat.hpl + Y + + + Table input + work_activity_flow_repeat.hpl 3 + Y + + + Table input + work_activity_flow_repeat.hpl 2 + Y + + + Table input + work_activity_flow_repeat.hpl 4 + Y + + + Table input + work_activity_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'work_activity_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + work_activity_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 208 + + + + work_activity_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 288 + + + + work_activity_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 368 + + + + work_activity_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 448 + + + + work_activity_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 528 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl b/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl new file mode 100644 index 0000000..b1c9b40 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + work_activity_flow.hpl + Y + + + Get all recruitments ordered by created_date + work_activity_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + work_activity_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + work_activity_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + work_activity_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 432 + 304 + + + + work_activity_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 144 + + + + work_activity_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 224 + + + + work_activity_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 304 + + + + work_activity_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 384 + + + + work_activity_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 464 + + + + + + diff --git a/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf b/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf new file mode 100644 index 0000000..e384c46 --- /dev/null +++ b/map_v1/info_recruits/citizen_tables/work_activity/work_activity_job.hwf @@ -0,0 +1,309 @@ + + + work_activity_job + Y + + + + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_ work_activity_job_was_executed.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + work_activity_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_ work_activity_job_was_executed.hpl + Y + Y + Y + + + check_if_ work_activity_job_was_executed.hpl + work_activity_job_exists_check + Y + Y + N + + + work_activity_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + work_activity_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + + diff --git a/map_v1/info_recruits/general_info_recruits_in_process.hpl b/map_v1/info_recruits/general_info_recruits_in_process.hpl new file mode 100644 index 0000000..9dfaa63 --- /dev/null +++ b/map_v1/info_recruits/general_info_recruits_in_process.hpl @@ -0,0 +1,116 @@ + + + + general_info_recruits_in_process + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 13:57:15.223 + - + 2025/06/11 13:57:15.223 + + + + + + Table input + Insert / update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_general_info_recruits') AS job_name, + COALESCE(status, 'SUCCESS') AS status, + current_timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_general_info_recruits' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_general_info_recruits' + ) +) t + N + + + 384 + 320 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + + public + etl_checkpoints
+ + job_name + job_name + N + + + status + status + Y + + + record_created + record_created + Y + +
+ N + + + 832 + 320 + +
+ + + +
diff --git a/map_v1/info_recruits/job_general_info_recruits.hwf b/map_v1/info_recruits/job_general_info_recruits.hwf new file mode 100644 index 0000000..6835eac --- /dev/null +++ b/map_v1/info_recruits/job_general_info_recruits.hwf @@ -0,0 +1,1312 @@ + + + job_general_info_recruits + Y + + + + 0 + - + 2025/05/21 13:22:33.264 + - + 2025/05/21 13:22:33.264 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 720 + 672 + + + + job_recruitment.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/recruitment/job_recruitment.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1552 + 672 + + + + job_recruits_info.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2112 + 352 + + + + job_citizen.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2080 + 464 + + + + job_recruit_create_date.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/job_recruit_create_date.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1792 + 672 + + + + branching_job_general_info_recruits.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/branching_job_general_info_recruits.hpl + Basic + + Y + + N + local + N + N + Y + N + 944 + 672 + + + + IF job_general_info_recruits SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1280 + 672 + + + + IF job_general_info_recruits ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1248 + 1552 + + + + job_recruitment.hwf 2 + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/recruitment/job_recruitment.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1488 + 1552 + + + + job_recruits_info.hwf 2 + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2000 + 1264 + + + + row_last_recruit_create_date.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 1712 + 1552 + + + + Write to log + + WRITE_TO_LOG + + Basic + ${M_R_CR_DATE} + + N + 1808 + 1360 + + + + job_citizen.hwf 2 + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2000 + 1408 + + + + job_parallel_recruits_info_citizen.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/job_parallel_recruits_info_citizen.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2048 + 672 + + + + job_parallel_recruits_info_citizen.hwf 2 + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/job_parallel_recruits_info_citizen.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 2000 + 1552 + + + + job_info_recruits_from_json.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2992 + 672 + + + + change_status_job_general_info_recruits_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 4000 + 672 + + + + check_status_parallel_recruits_info_citizen.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl + Basic + + Y + + N + local + N + N + Y + N + 2368 + 672 + + + + IF job_parallel_recruits_info_citizen ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2704 + 528 + + + + IF job_parallel_recruits_info_citizen SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 2704 + 672 + + + + Abort parallel_recruits_info_citizen + + ABORT + + N + N + 3360 + 528 + + + + check_status_job_info_recruits_from_json.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl + Basic + + Y + + N + local + N + N + Y + N + 3296 + 672 + + + + IF job_info_recruits_from_json ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 3632 + 528 + + + + IF job_info_recruits_from_json SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 3632 + 672 + + + + Abort job_info_recruits_from_json + + ABORT + + N + N + 4304 + 528 + + + + Success job_general_info_recruits + + SUCCESS + + N + 4320 + 672 + + + + change_status_job_general_info_recruits_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3984 + 528 + + + + change_status_job_general_info_recruits_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3040 + 528 + + + + check_status_parallel_recruits_info_citizen.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl + Basic + + Y + + N + local + N + N + Y + N + 2336 + 1552 + + + + IF job_parallel_recruits_info_citizen ERROR 2 + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 2656 + 1408 + + + + IF job_parallel_recruits_info_citizen SUCCESS 2 + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 2656 + 1552 + + + + job_info_recruits_from_json.hwf 2 + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf + + + Nothing + + + M_R_CR_DATE + + ${M_R_CR_DATE} + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 2992 + 1552 + + + + change_status_job_general_info_recruits_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 4000 + 1552 + + + + Abort parallel_recruits_info_citizen 2 + + ABORT + + N + N + 3360 + 1408 + + + + check_status_job_info_recruits_from_json.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/check_status_job_info_recruits_from_json.hpl + Basic + + Y + + N + local + N + N + Y + N + 3296 + 1552 + + + + IF job_info_recruits_from_json ERROR 2 + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 3632 + 1408 + + + + IF job_info_recruits_from_json SUCCESS 2 + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 3632 + 1552 + + + + Abort job_info_recruits_from_json 2 + + ABORT + + N + N + 4304 + 1408 + + + + Success job_general_info_recruits 2 + + SUCCESS + + N + 4320 + 1552 + + + + change_status_job_general_info_recruits_error.hpl 3 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3984 + 1408 + + + + change_status_job_general_info_recruits_error.hpl 2 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/checkpoints/change_status_job_general_info_recruits_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 3040 + 1408 + + + + + + job_recruitment.hwf + job_recruit_create_date.hwf + Y + Y + N + + + job_recruit_create_date.hwf + job_recruits_info.hwf + N + Y + Y + + + Start + branching_job_general_info_recruits.hpl + Y + Y + Y + + + branching_job_general_info_recruits.hpl + IF job_general_info_recruits SUCCESS + Y + N + Y + + + IF job_general_info_recruits SUCCESS + job_recruitment.hwf + Y + Y + N + + + branching_job_general_info_recruits.hpl + IF job_general_info_recruits ERROR + Y + N + Y + + + IF job_general_info_recruits ERROR + job_recruitment.hwf 2 + Y + Y + N + + + job_recruitment.hwf 2 + row_last_recruit_create_date.hpl + Y + Y + N + + + row_last_recruit_create_date.hpl + job_recruits_info.hwf 2 + N + N + Y + + + row_last_recruit_create_date.hpl + Write to log + N + Y + N + + + job_recruit_create_date.hwf + job_citizen.hwf + N + N + Y + + + row_last_recruit_create_date.hpl + job_citizen.hwf 2 + N + N + Y + + + job_recruit_create_date.hwf + job_parallel_recruits_info_citizen.hwf + Y + Y + N + + + row_last_recruit_create_date.hpl + job_parallel_recruits_info_citizen.hwf 2 + Y + Y + N + + + job_parallel_recruits_info_citizen.hwf + check_status_parallel_recruits_info_citizen.hpl + Y + Y + N + + + IF job_parallel_recruits_info_citizen SUCCESS + job_info_recruits_from_json.hwf + Y + Y + N + + + check_status_parallel_recruits_info_citizen.hpl + IF job_parallel_recruits_info_citizen ERROR + Y + N + Y + + + check_status_parallel_recruits_info_citizen.hpl + IF job_parallel_recruits_info_citizen SUCCESS + Y + N + Y + + + job_info_recruits_from_json.hwf + check_status_job_info_recruits_from_json.hpl + Y + Y + N + + + check_status_job_info_recruits_from_json.hpl + IF job_info_recruits_from_json SUCCESS + Y + N + Y + + + check_status_job_info_recruits_from_json.hpl + IF job_info_recruits_from_json ERROR + Y + N + Y + + + IF job_info_recruits_from_json SUCCESS + change_status_job_general_info_recruits_success.hpl + Y + Y + N + + + change_status_job_general_info_recruits_success.hpl + Success job_general_info_recruits + Y + Y + N + + + IF job_info_recruits_from_json ERROR + change_status_job_general_info_recruits_error.hpl + Y + Y + N + + + change_status_job_general_info_recruits_error.hpl + Abort job_info_recruits_from_json + Y + Y + Y + + + IF job_parallel_recruits_info_citizen ERROR + change_status_job_general_info_recruits_error.hpl 2 + Y + Y + N + + + change_status_job_general_info_recruits_error.hpl 2 + Abort parallel_recruits_info_citizen + Y + Y + Y + + + check_status_parallel_recruits_info_citizen.hpl 2 + IF job_parallel_recruits_info_citizen ERROR 2 + Y + N + Y + + + check_status_parallel_recruits_info_citizen.hpl 2 + IF job_parallel_recruits_info_citizen SUCCESS 2 + Y + N + Y + + + job_parallel_recruits_info_citizen.hwf 2 + check_status_parallel_recruits_info_citizen.hpl 2 + Y + Y + N + + + job_info_recruits_from_json.hwf 2 + check_status_job_info_recruits_from_json.hpl 2 + Y + Y + N + + + change_status_job_general_info_recruits_success.hpl 2 + Success job_general_info_recruits 2 + Y + Y + N + + + check_status_job_info_recruits_from_json.hpl 2 + IF job_info_recruits_from_json ERROR 2 + Y + N + Y + + + check_status_job_info_recruits_from_json.hpl 2 + IF job_info_recruits_from_json SUCCESS 2 + Y + N + Y + + + IF job_info_recruits_from_json ERROR 2 + change_status_job_general_info_recruits_error.hpl 3 + Y + Y + N + + + IF job_info_recruits_from_json SUCCESS 2 + change_status_job_general_info_recruits_success.hpl 2 + Y + Y + N + + + change_status_job_general_info_recruits_error.hpl 3 + Abort job_info_recruits_from_json 2 + Y + Y + Y + + + change_status_job_general_info_recruits_error.hpl 2 2 + Abort parallel_recruits_info_citizen 2 + Y + Y + Y + + + IF job_parallel_recruits_info_citizen ERROR 2 + change_status_job_general_info_recruits_error.hpl 2 2 + Y + Y + N + + + IF job_parallel_recruits_info_citizen SUCCESS 2 + job_info_recruits_from_json.hwf 2 + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 42 + 1584 + 608 + зачистка таблицы военкоматов +и загрузка ervu_dashboard.recruitment + 219 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 74 + 1280 + 432 + ОБЯЗАТЕЛЬНО ЗАФИКСИРОВАТЬ ПОСЛЕДНИЮЮ ДАТУ СОЗДАНИЯ РЕКРУТА(из бд ervu_person_registry) В БД ervu_dashboard, +ЗАТЕМ ИДТИ ЗА ЭТОЙ ДАТОЙ ПЕРЕД СЕЛЕКТОМ. +СЕЛЕКТЫ РЕКРУТОВ ПРОИЗВОДИТЬ НЕ БОЛЬШЕ ЭТОЙ ДАТЫ. +Для чего? - чтобы не терять рекрутов. + 714 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 42 + 1648 + 1488 + зачистка таблицы военкоматов +и загрузка ervu_dashboard.recruitment + 219 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 2880 + 624 + тут все джожбы которые парсят json + 212 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 2880 + 1504 + тут все джожбы которые парсят json + 212 + + + + diff --git a/map_v1/info_recruits/job_info_recruits_from_json.hwf b/map_v1/info_recruits/job_info_recruits_from_json.hwf new file mode 100644 index 0000000..c852794 --- /dev/null +++ b/map_v1/info_recruits/job_info_recruits_from_json.hwf @@ -0,0 +1,529 @@ + + + job_info_recruits_from_json + Y + + + + - + 2025/06/10 13:13:23.644 + - + 2025/06/10 13:13:23.644 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 496 + 400 + + + + job_child.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/job_child.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 80 + + + + job_citizen_guardianship.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/job_citizen_guardianship.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 160 + + + + job_passport.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/passport/job_passport.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 240 + + + + job_citizen_spouse.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_spouse/job_citizen_spouse.hwf + Nothing + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 800 + 320 + + + + job_prosecution.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/prosecution/job_prosecution.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 400 + + + + job_snils_inn.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf + Nothing + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 800 + 560 + + + + job_citizen_liability_fz53.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 640 + + + + job_citizen_criminal_liability_fz53.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 720 + + + + job_citizen_appealing_violations_fz53.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf + Nothing + + + M_R_CR_DATE + ${M_R_CR_DATE} + + + M_R_UP_DATE + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 800 + 800 + + + + Success + + SUCCESS + + N + 1168 + 400 + + + + job_punishment.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/punishment/job_punishment.hwf + Nothing + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + M_R_CR_DATE + ${M_R_CR_DATE} + + Y + + N + local + N + N + Y + N + 800 + 480 + + + + + + Start + job_child.hwf + Y + Y + Y + + + Start + job_citizen_guardianship.hwf + Y + Y + Y + + + Start + job_passport.hwf + Y + Y + Y + + + Start + job_citizen_spouse.hwf + Y + Y + Y + + + Start + job_prosecution.hwf + Y + Y + Y + + + Start + job_snils_inn.hwf + Y + Y + Y + + + Start + job_citizen_liability_fz53.hwf + Y + Y + Y + + + Start + job_citizen_criminal_liability_fz53.hwf + Y + Y + Y + + + Start + job_citizen_appealing_violations_fz53.hwf + Y + Y + Y + + + job_prosecution.hwf + Success + Y + Y + N + + + job_citizen_spouse.hwf + Success + Y + Y + N + + + job_passport.hwf + Success + Y + Y + N + + + job_citizen_guardianship.hwf + Success + Y + Y + N + + + job_child.hwf + Success + Y + Y + N + + + job_snils_inn.hwf + Success + Y + Y + N + + + job_citizen_liability_fz53.hwf + Success + Y + Y + N + + + job_citizen_criminal_liability_fz53.hwf + Success + Y + Y + N + + + job_citizen_appealing_violations_fz53.hwf + Success + Y + Y + N + + + Start + job_punishment.hwf + Y + Y + Y + + + job_punishment.hwf + Success + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 976 + 48 + в следующий пайплайн(check_status_job_info_recruits_from_json.hpl) родительского воркфлоу вписать новый созданный воркфлоу, который создан тут + 849 + + + + diff --git a/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf b/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf new file mode 100644 index 0000000..f0fd3b4 --- /dev/null +++ b/map_v1/info_recruits/job_parallel_recruits_info_citizen.hwf @@ -0,0 +1,190 @@ + + + job_parallel_recruits_info_citizen + Y + + + + - + 2025/06/04 13:12:14.544 + - + 2025/06/04 13:12:14.544 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 208 + 384 + + + + job_citizen.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf + + + Nothing + + + M_R_CR_DATE + + ${M_R_CR_DATE} + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 688 + 304 + + + + job_recruits_info.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf + + + Nothing + + + M_R_CR_DATE + + ${M_R_CR_DATE} + + + M_R_UP_DATE + + ${M_R_UP_DATE} + + Y + + N + local + N + N + Y + N + 688 + 480 + + + + Success job_citizen + + SUCCESS + + N + 944 + 304 + + + + Success job_recruits_info + + SUCCESS + + N + 944 + 480 + + + + job_recruit_last_update_date.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf + Nothing + + Y + + N + local + N + N + Y + Y + 384 + 384 + + + + + + job_citizen.hwf + Success job_citizen + Y + Y + N + + + job_recruits_info.hwf + Success job_recruits_info + Y + Y + N + + + Start + job_recruit_last_update_date.hwf + Y + Y + Y + + + job_recruit_last_update_date.hwf + job_citizen.hwf + Y + Y + Y + + + job_recruit_last_update_date.hwf + job_recruits_info.hwf + Y + N + Y + + + + + + diff --git a/map_v1/info_recruits/main_profile/main_profile.hpl b/map_v1/info_recruits/main_profile/main_profile.hpl new file mode 100644 index 0000000..5f98414 --- /dev/null +++ b/map_v1/info_recruits/main_profile/main_profile.hpl @@ -0,0 +1,265 @@ + + + + main_profile + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/17 10:17:01.438 + - + 2025/06/17 10:17:01.438 + + + + + + Table input main profile + Table output + N + + + Table input main profile + Value mapper main profile + Y + + + Value mapper main profile + Insert / update main profile + Y + + + + Insert / update main profile + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + appeals + main_profile
+ + age + avg_age + Y + + + child_min_18 + avg_children + Y + + + education + most_common_education_group + Y + + + employment + most_common_employment + Y + + + gender + most_common_gender + Y + + + recording_date + recording_date + Y + + + recruitment_id + recruitment_id + Y + + + schema + schema + Y + +
+ N + + + 800 + 256 + +
+ + Table input main profile + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + c.recruitment_id, + ROUND(AVG(DATE_PART('year', AGE(CURRENT_DATE, c.birth_date)))::numeric, 0) AS avg_age, + MODE() WITHIN GROUP (ORDER BY c.gender) AS most_common_gender, + MODE() WITHIN GROUP (ORDER BY c.employment) AS most_common_employment, + ROUND(AVG(COALESCE(child_counts.child_count, 0))::numeric, 0) AS avg_children, + MODE() WITHIN GROUP (ORDER BY education_groups.highest_group) AS most_common_education_group, + current_date recording_date, + 'Department' as schema +FROM citizen c +LEFT JOIN ( + SELECT + recruit_id, + COUNT(*) AS child_count + FROM citizen_child + WHERE death_date IS NULL + AND DATE_PART('year', AGE(CURRENT_DATE, birth_date)) < 18 + GROUP BY recruit_id +) child_counts ON c.recruit_id = child_counts.recruit_id +LEFT JOIN ( + SELECT + recruit_id, + MIN(CASE + WHEN education_level_code IN ('1', '2', '3', '4', '5') THEN 1 -- Высшее + WHEN education_level_code IN ('10', '11') THEN 2 -- Среднее проф. + WHEN education_level_code IN ('7', '9') THEN 3 -- Общее + ELSE 4 -- Прочее/неизвестное + END) AS highest_group + FROM citizen_foreign_education_diploma + GROUP BY recruit_id +) education_groups ON c.recruit_id = education_groups.recruit_id +join appeals.appeals_list al on c.system_esia_id = al.system_esia_id +GROUP BY c.recruitment_id +HAVING c.recruitment_id IS NOT NULL; + N + + + 304 + 256 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + gender + most_common_gender + + + age + avg_age + + + education + most_common_education_group + + + employment + most_common_employment + + + child_min_18 + avg_children + + + schema + schema + + + recruitment_id + recruitment_id + + + N + N + N + N + Y + N + appeals + Y + main_profile
+ N + Y + N + Y + + + 560 + 400 + +
+ + Value mapper main profile + ValueMapper + + Y + + 1 + + none + + + most_common_education_group + + + 1 + Высшее + + + 2 + Среднее проф. + + + 3 + Общее + + + + + 528 + 256 + + + + + +
diff --git a/map_v1/info_recruits/main_profile/main_profile.hwf b/map_v1/info_recruits/main_profile/main_profile.hwf new file mode 100644 index 0000000..45ddbd8 --- /dev/null +++ b/map_v1/info_recruits/main_profile/main_profile.hwf @@ -0,0 +1,126 @@ + + + main_profile + Y + + + + - + 2025/06/17 10:16:58.535 + - + 2025/06/17 10:16:58.535 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 192 + 368 + + + + main_profile.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/main_profile/main_profile.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 336 + 368 + + + + nlvl_main_profile.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/main_profile/nlvl_main_profile.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 496 + 368 + + + + Success + + SUCCESS + + N + 656 + 368 + + + + + + Start + main_profile.hpl + Y + Y + Y + + + main_profile.hpl + nlvl_main_profile.hpl + Y + Y + N + + + nlvl_main_profile.hpl + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl b/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl new file mode 100644 index 0000000..1be13c2 --- /dev/null +++ b/map_v1/info_recruits/main_profile/nlvl_main_profile.hpl @@ -0,0 +1,210 @@ + + + + nlvl_main_profile + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/17 10:49:22.576 + - + 2025/06/17 10:49:22.576 + + + + + + Table input nlvl main profile + Insert / update nlvl main profile + Y + + + + Table input nlvl main profile + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + --- next_level_org + +WITH latest_hierarchy AS ( + -- Берем только записи с максимальной версией для каждого idm_id + SELECT DISTINCT ON (idm_id) * + FROM ervu_dashboard.recruitment + ORDER BY idm_id +), +latest_date AS ( + -- Определяем последнюю дату загрузки + SELECT MAX(recording_date) AS max_date FROM appeals.main_profile +), +filtered_records AS ( + -- Фильтруем данные, оставляя только записи с последней датой загрузки + SELECT id_main_profile, gender, age, child_min_18, education, employment, recording_date, recruitment_id, "schema" FROM appeals.main_profile + WHERE recording_date = (SELECT max_date FROM latest_date) +), +hierarchy_cte AS ( + -- Строим связи между уровнями (Department → Organization → Region → Ministry) + SELECT + h.idm_id AS department_id, + h.parent_id AS organization_id, + h2.parent_id AS region_id, + h3.parent_id AS ministry_id + FROM latest_hierarchy h + LEFT JOIN latest_hierarchy h2 ON h.parent_id = h2.idm_id -- Organization + LEFT JOIN latest_hierarchy h3 ON h2.parent_id = h3.idm_id -- Region + WHERE h.schema = 'Department' -- Начинаем с Department +), +aggregated_counts AS ( + -- Агрегируем для Organization + SELECT + h.organization_id AS level_id, + ROUND(AVG(age)::numeric, 0) avg_age, + MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender, + MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment, + ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18, + MODE() WITHIN GROUP (ORDER BY education) AS most_common_education, + MAX(r.recording_date) as recording_date, + 'Organization' AS level + FROM filtered_records r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.organization_id IS NOT NULL + GROUP BY h.organization_id + + UNION ALL + + -- Агрегируем для Region + SELECT + h.region_id AS level_id, + ROUND(AVG(age)::numeric, 0) avg_age, + MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender, + MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment, + ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18, + MODE() WITHIN GROUP (ORDER BY education) AS most_common_education, + MAX(r.recording_date) as recording_date, + 'Region' AS level + FROM filtered_records r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.region_id IS NOT NULL + GROUP BY h.region_id + + UNION ALL + + -- Агрегируем для Ministry + SELECT + h.ministry_id AS level_id, + ROUND(AVG(age)::numeric, 0) avg_age, + MODE() WITHIN GROUP (ORDER BY gender) AS most_common_gender, + MODE() WITHIN GROUP (ORDER BY employment) AS most_common_employment, + ROUND(AVG(child_min_18)::numeric, 0) AS avg_child_min_18, + MODE() WITHIN GROUP (ORDER BY education) AS most_common_education, + MAX(r.recording_date) as recording_date, + 'Ministry' AS level + FROM filtered_records r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.ministry_id IS NOT NULL + GROUP BY h.ministry_id +) +SELECT * FROM aggregated_counts; + + N + + + 608 + 352 + + + + Insert / update nlvl main profile + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + level_id + + + + = + recording_date + recording_date + + + appeals + main_profile
+ + age + avg_age + Y + + + child_min_18 + avg_child_min_18 + Y + + + education + most_common_education + Y + + + employment + most_common_employment + Y + + + gender + most_common_gender + Y + + + recording_date + recording_date + Y + + + schema + level + Y + + + recruitment_id + level_id + Y + +
+ N + + + 784 + 368 + +
+ + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl new file mode 100644 index 0000000..99dbf12 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl @@ -0,0 +1,124 @@ + + + + branching_recruits_info + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/29 10:09:35.340 + - + 2025/05/29 10:09:35.340 + + + + + + Table input + Set variables 2 + Y + + + Set variables 2 + Write to log + N + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 736 + 192 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select + status as STATUS, + job_name AS PIPELINE +from public.etl_checkpoints +where job_name = 'job_recruits_info' + N + + + 496 + 192 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 944 + 336 + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl new file mode 100644 index 0000000..2f75a4a --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl @@ -0,0 +1,142 @@ + + + + branching_recruits_info_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/29 10:09:35.340 + - + 2025/05/29 10:09:35.340 + + + + + + Table input + Set variables 2 + Y + + + Set variables 2 + Write to log + N + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + pipeline + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 736 + 192 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_recruits_info_delta') AS PIPELINE, + COALESCE(status, 'ERROR') AS STATUS, + current_timestamp::timestamp as record_created +FROM ( + select + CASE + WHEN status = 'PROCESSING' THEN 'ERROR' + ELSE status + END AS status, + job_name + from public.etl_checkpoints + where job_name = 'job_recruits_info_delta' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_recruits_info_delta' + ) +) t + N + + + 496 + 192 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + pipeline + + + status + + + N + 0 + Basic + ${PIPE} +${STATUS} + + + 944 + 336 + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl new file mode 100644 index 0000000..9f0cf27 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_recruits_info_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow1' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl new file mode 100644 index 0000000..e19c801 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_recruits_info_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow1' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl new file mode 100644 index 0000000..b0b2801 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_recruits_info_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow2' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl new file mode 100644 index 0000000..eec52d6 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_recruits_info_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow2' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl new file mode 100644 index 0000000..e2befc8 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_recruits_info_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow3' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl new file mode 100644 index 0000000..f1f1510 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_recruits_info_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow3' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl new file mode 100644 index 0000000..4241b74 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_recruits_info_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow4' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl new file mode 100644 index 0000000..a174f35 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_recruits_info_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow4' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl new file mode 100644 index 0000000..8d4e2a8 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl @@ -0,0 +1,103 @@ + + + + change_status_delta_recruits_info_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow5' as job_name, + 'ERROR' as status, + current_timestamp as record_created + + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl new file mode 100644 index 0000000..a34c584 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl @@ -0,0 +1,102 @@ + + + + change_status_delta_recruits_info_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 12:20:06.191 + - + 2025/06/16 12:20:06.191 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1152 + 304 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'delta_recruits_info_flow5' as job_name, + 'SUCCESS' as status, + current_timestamp as record_created + + N + + + 784 + 304 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl new file mode 100644 index 0000000..51e87c5 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl @@ -0,0 +1,249 @@ + + + + change_status_recruits_info_flow1_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'recruits_info_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl new file mode 100644 index 0000000..f83ca3d --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl @@ -0,0 +1,249 @@ + + + + change_status_recruits_info_flow1_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, +/* + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, +/* + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( + SELECT + 'recruits_info_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl new file mode 100644 index 0000000..94c5e87 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl @@ -0,0 +1,253 @@ + + + + change_status_recruits_info_flow2_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl new file mode 100644 index 0000000..b98cc58 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl @@ -0,0 +1,253 @@ + + + + change_status_recruits_info_flow2_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, +/* + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, +*/ + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2--, +/* + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl new file mode 100644 index 0000000..39a6d13 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl @@ -0,0 +1,254 @@ + + + + change_status_recruits_info_flow3_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl new file mode 100644 index 0000000..717fd93 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl @@ -0,0 +1,254 @@ + + + + change_status_recruits_info_flow3_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, +*/ + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, +/* + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, +*/ + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3--, +/* + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl new file mode 100644 index 0000000..416fe0d --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_recruits_info_flow4_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl new file mode 100644 index 0000000..1400ff4 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_recruits_info_flow4_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, +*/ + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +/* + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 +*/ + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1--, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, +*/ + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4--, +/* + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 +*/ + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +/* + union all + + SELECT + 'job_citizen_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max +*/ +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl new file mode 100644 index 0000000..105a90e --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl @@ -0,0 +1,255 @@ + + + + change_status_recruits_info_flow5_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl new file mode 100644 index 0000000..440b7de --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl @@ -0,0 +1,255 @@ + + + + change_status_recruits_info_flow5_success + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 09:14:18.787 + - + 2025/06/16 09:14:18.787 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + last_recruitment_id + last_recruitment_id + Y + + + record_created + record_created + Y + + + recruitment_created_date + recruitment_created_date + Y + + + status + status + Y + +
+ N + + + 1056 + 400 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT +/* + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, +*/ + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + + FROM flow_data +), +result_max as ( --костыль + SELECT +/* + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, +*/ + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + + FROM result_ma +), +for_checkpoints as ( +/* + SELECT + 'job_citizen_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_citizen_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + + union all +*/ + SELECT + 'recruits_info_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'SUCCESS' as status, + current_timestamp as record_created + from result_max + +) +select * from for_checkpoints + N + + + 688 + 400 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl new file mode 100644 index 0000000..76e8db7 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl @@ -0,0 +1,143 @@ + + + + change_status_to_processing + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 16:14:31.162 + - + 2025/06/11 16:14:31.162 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 784 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'job_recruits_info' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + + N + + + 368 + 352 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl new file mode 100644 index 0000000..651ddd2 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl @@ -0,0 +1,142 @@ + + + + change_status_to_processing_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/16 13:42:26.494 + - + 2025/06/16 13:42:26.494 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 1248 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + 'PROCESSING' AS status, + 'delta_recruits_info' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_delta_flow1' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_delta_flow2' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_delta_flow3' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_delta_flow4' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + +UNION ALL + +SELECT + 'PROCESSING' AS status, + 'recruits_info_delta_flow5' AS job_name, + current_timestamp AS record_created +--FROM public.etl_checkpoints + N + + + 832 + 352 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl new file mode 100644 index 0000000..4f73a51 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl @@ -0,0 +1,130 @@ + + + + check_if_job_recruits_info_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/11 15:20:18.267 + - + 2025/06/11 15:20:18.267 + + + + + + Table input + Set variables + Y + + + Set variables + Write to log + N + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_name + PIPE + PARENT_WORKFLOW + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 688 + 352 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(job_name, 'job_recruits_info') AS job_name, + COALESCE(status, 'NEW') AS status, + current_timestamp::timestamp as record_created +FROM ( + SELECT job_name, status + FROM public.etl_checkpoints + WHERE job_name = 'job_recruits_info' + + UNION ALL + + SELECT NULL, NULL + WHERE NOT EXISTS ( + SELECT 1 + FROM public.etl_checkpoints + WHERE job_name = 'job_recruits_info' + ) +) t + N + + + 400 + 352 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 960 + 240 + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl new file mode 100644 index 0000000..6bdda91 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl @@ -0,0 +1,1004 @@ + + + + checkpoint_job_recruits_info + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/30 10:34:00.239 + - + 2025/05/30 10:34:00.239 + + + + + + JSON input state_recruits_info_flow3.json + Filter rows + N + + + JSON input state_recruits_info_flow4.json + Filter rows + N + + + JSON input state_recruits_info_flow5.json + Filter rows + N + + + JSON input state_recruits_info_flow2.json + Filter rows + N + + + JSON input state_recruits_info_flow1.json + Filter rows + N + + + Set variables + Write to log 3 + Y + + + Set variables 2 + Write to log 3 2 + Y + + + Dummy (do nothing) + Set variables 2 + N + + + Dummy (do nothing) + Set variables + N + + + Filter rows + Abort + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow1.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow2.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow3.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow4.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow5.json + N + + + Table input + Insert / update + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1072 + 784 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 1136 + 608 + + + + Dummy (do nothing) 2 + Dummy + + Y + + 1 + + none + + + + + 208 + 752 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 752 + 784 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 944 + 416 + +
+ + JSON input state_recruits_info_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 624 + + + + JSON input state_recruits_info_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 704 + + + + JSON input state_recruits_info_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 784 + + + + JSON input state_recruits_info_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 864 + + + + JSON input state_recruits_info_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 944 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1328 + 560 + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1328 + 640 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'recruits_info_flow1', + 'recruits_info_flow2', + 'recruits_info_flow3', + 'recruits_info_flow4', + 'recruits_info_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'recruits_info_flow1', + 'recruits_info_flow2', + 'recruits_info_flow3', + 'recruits_info_flow4', + 'recruits_info_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_recruits_info' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 576 + 416 + + + + Write to log 3 + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1520 + 560 + + + + Write to log 3 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1520 + 640 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl new file mode 100644 index 0000000..0d7b6fd --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl @@ -0,0 +1,1004 @@ + + + + checkpoint_job_recruits_info_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/30 10:34:00.239 + - + 2025/05/30 10:34:00.239 + + + + + + JSON input state_recruits_info_flow3.json + Filter rows + N + + + JSON input state_recruits_info_flow4.json + Filter rows + N + + + JSON input state_recruits_info_flow5.json + Filter rows + N + + + JSON input state_recruits_info_flow2.json + Filter rows + N + + + JSON input state_recruits_info_flow1.json + Filter rows + N + + + Set variables + Write to log 3 + Y + + + Set variables 2 + Write to log 3 2 + Y + + + Dummy (do nothing) + Set variables 2 + N + + + Dummy (do nothing) + Set variables + N + + + Filter rows + Abort + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow1.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow2.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow3.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow4.json + N + + + Dummy (do nothing) 2 + JSON input state_recruits_info_flow5.json + N + + + Table input + Insert / update + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1072 + 784 + + + + Dummy (do nothing) + Dummy + + Y + + 1 + + none + + + + + 1136 + 608 + + + + Dummy (do nothing) 2 + Dummy + + Y + + 1 + + none + + + + + 208 + 752 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow2 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow3 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow4 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow5 + String + + + + + + = + status + N + AND + + N + -1 + constant + -1 + ERROR + String + + + + = + pipeline + N + OR + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + = + pipeline + N + - + + N + -1 + constant + -1 + recruits_info_flow1 + String + + + + Abort + + + 752 + 784 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + job_name + job_name + + public + etl_checkpoints
+ + job_name + job_name + N + + + record_created + record_created + Y + + + status + status + Y + +
+ N + + + 944 + 416 + +
+ + JSON input state_recruits_info_flow1.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 624 + + + + JSON input state_recruits_info_flow2.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 704 + + + + JSON input state_recruits_info_flow3.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 784 + + + + JSON input state_recruits_info_flow4.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 864 + + + + JSON input state_recruits_info_flow5.json + JsonInput + + Y + + 1 + + none + + + N + + N + N + N + N + N + Y + Y + Y + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json + + + N + N + + + + pipeline + $.pipeline + String + + + + + -1 + -1 + none + N + + + status + $.status + String + + + + + -1 + -1 + none + N + + + 0 + N + N + + + + + + + + + + + + 448 + 944 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1328 + 560 + + + + Set variables 2 + SetVariable + + Y + + 1 + + none + + + + + status + STATUS + PARENT_WORKFLOW + + + Y + + + 1328 + 640 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'delta_recruits_info_flow1', + 'delta_recruits_info_flow2', + 'delta_recruits_info_flow3', + 'delta_recruits_info_flow4', + 'delta_recruits_info_flow5' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'delta_recruits_info_flow1', + 'delta_recruits_info_flow2', + 'delta_recruits_info_flow3', + 'delta_recruits_info_flow4', + 'delta_recruits_info_flow5' + ) + ) = 5 AS all_success + FROM public.etl_checkpoints +) +SELECT + 'job_recruits_info_delta' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 576 + 416 + + + + Write to log 3 + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1520 + 560 + + + + Write to log 3 2 + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 1520 + 640 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl new file mode 100644 index 0000000..07e1124 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl @@ -0,0 +1,284 @@ + + + + checkpoint_recruit_info_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/22 16:34:44.176 + - + 2025/05/22 16:34:44.176 + + + + + + Table input + Select values + N + + + Select values + Table output + N + + + Table input + Table output + Y + + + + Select values + SelectValues + + Y + + 1 + + none + + + + N + + idm_id + idm_id + String + -2 + -2 + + false + + + false + + + + + + + + + + 624 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num + FROM ordered +), +flow_ranges AS ( + SELECT + flow_num, + MIN(created_at) AS min_date, + MAX(created_at) AS max_date + FROM splitted + GROUP BY flow_num +), +recr_inf AS ( + SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id + FROM ervu_dashboard.recruits_info +), +flow_data AS ( + SELECT + fr.flow_num, + ri.idm_id, + (SELECT r.created_at FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + AND r.created_at BETWEEN fr.min_date AND fr.max_date + LIMIT 1) AS created_at + FROM recr_inf ri + CROSS JOIN flow_ranges fr + WHERE EXISTS ( + SELECT 1 FROM ervu_dashboard.recruitment r + WHERE r.idm_id = ri.idm_id + ) +), +result_ma as ( + SELECT + MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, + (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, + + MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, + (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, + + MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, + (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, + + MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, + (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, + + MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, + (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 + FROM flow_data +), +result_max as ( --костыль + SELECT + CASE + WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow1 + END AS cr_flow1, + idm_flow1, + CASE + WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow2 + END AS cr_flow2, + idm_flow2, + CASE + WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow3 + END AS cr_flow3, + idm_flow3, + CASE + WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow4 + END AS cr_flow4, + idm_flow4, + CASE + WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp + ELSE cr_flow5 + END AS cr_flow5, + idm_flow5 + FROM result_ma +), +for_checkpoints as ( + SELECT + 'job_recruits_info_flow1' as job_name, + idm_flow1 as last_recruitment_id, + cr_flow1 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_recruits_info_flow2' as job_name, + idm_flow2 as last_recruitment_id, + cr_flow2 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_recruits_info_flow3' as job_name, + idm_flow3 as last_recruitment_id, + cr_flow3 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_recruits_info_flow4' as job_name, + idm_flow4 as last_recruitment_id, + cr_flow4 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max + + union all + + SELECT + 'job_recruits_info_flow5' as job_name, + idm_flow5 as last_recruitment_id, + cr_flow5 as recruitment_created_date, + 'ERROR' as status, + current_timestamp as record_created + from result_max +) +select * from for_checkpoints + N + + + 352 + 240 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + etl_checkpoints
+ N + Y + N + Y + + + 864 + 240 + +
+ + + Select values + + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf new file mode 100644 index 0000000..517b401 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf @@ -0,0 +1,330 @@ + + + job_check_files_recruits_info + Y + + + + - + 2025/05/26 14:37:00.175 + - + 2025/05/26 14:37:00.175 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 400 + 512 + + + + state_recruits_info_flow1.json + + FILES_EXIST + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json + + + N + 688 + 224 + + + + state_recruits_info_flow2.json + + FILES_EXIST + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json + + + N + 688 + 368 + + + + state_recruits_info_flow3.json + + FILES_EXIST + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json + + + N + 688 + 512 + + + + state_recruits_info_flow4.json + + FILES_EXIST + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json + + + N + 688 + 656 + + + + state_recruits_info_flow5.json + + FILES_EXIST + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json + + + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json + + + N + 688 + 800 + + + + Success + + SUCCESS + + N + 880 + 224 + + + + Abort workflow + + ABORT + + N + N + 880 + 288 + + + + Success 2 + + SUCCESS + + N + 880 + 368 + + + + Abort workflow 2 + + ABORT + + N + N + 880 + 432 + + + + Success 3 + + SUCCESS + + N + 880 + 512 + + + + Abort workflow 3 + + ABORT + + N + N + 880 + 576 + + + + Success 4 + + SUCCESS + + N + 880 + 656 + + + + Abort workflow 4 + + ABORT + + N + N + 880 + 720 + + + + Success 5 + + SUCCESS + + N + 880 + 800 + + + + Abort workflow 5 + + ABORT + + N + + N + 880 + 864 + + + + + + Start + state_recruits_info_flow1.json + Y + Y + Y + + + Start + state_recruits_info_flow2.json + Y + Y + Y + + + Start + state_recruits_info_flow3.json + Y + Y + Y + + + Start + state_recruits_info_flow4.json + Y + Y + Y + + + Start + state_recruits_info_flow5.json + Y + Y + Y + + + state_recruits_info_flow1.json + Success + Y + Y + N + + + state_recruits_info_flow1.json + Abort workflow + Y + N + N + + + state_recruits_info_flow2.json + Success 2 + Y + Y + N + + + state_recruits_info_flow2.json + Abort workflow 2 + Y + N + N + + + state_recruits_info_flow3.json + Success 3 + Y + Y + N + + + state_recruits_info_flow3.json + Abort workflow 3 + Y + N + N + + + state_recruits_info_flow4.json + Success 4 + Y + Y + N + + + state_recruits_info_flow4.json + Abort workflow 4 + Y + N + N + + + state_recruits_info_flow5.json + Success 5 + Y + Y + N + + + state_recruits_info_flow5.json + Abort workflow 5 + Y + N + N + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf new file mode 100644 index 0000000..56e4aac --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf @@ -0,0 +1,91 @@ + + + job_checkpoints_recruits_info + Y + + + + - + 2025/05/26 15:38:10.437 + - + 2025/05/26 15:38:10.437 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 416 + + + + checkpoint_recruit_info_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 592 + 416 + + + + Success + + SUCCESS + + N + 784 + 416 + + + + + + Start + checkpoint_recruit_info_error.hpl + Y + Y + Y + + + checkpoint_recruit_info_error.hpl + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf new file mode 100644 index 0000000..9d9eea2 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf @@ -0,0 +1,235 @@ + + + job_create_files_recruits_info + Y + + + + - + 2025/05/26 16:48:00.210 + - + 2025/05/26 16:48:00.210 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 576 + 496 + + + + state_recruits_info_flow2_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "recruits_info_flow2" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json + N + 848 + 416 + + + + state_recruits_info_flow1_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "recruits_info_flow1" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json + N + 848 + 336 + + + + state_recruits_info_flow3_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "recruits_info_flow3" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json + N + 848 + 496 + + + + state_recruits_info_flow4_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "recruits_info_flow4" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json + N + 848 + 576 + + + + state_recruits_info_flow5_new + + WRITE_TO_FILE + + N + { + "status": "NEW", + "pipeline": "recruits_info_flow5" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json + N + 848 + 656 + + + + Success + + SUCCESS + + N + 1120 + 496 + + + + Delete file state_job_recruits_info + + DELETE_FILE + + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_job_recruits_info.json + N + 848 + 256 + + + + + + Start + state_recruits_info_flow3_new + Y + Y + Y + + + Start + state_recruits_info_flow2_new + Y + Y + Y + + + Start + state_recruits_info_flow1_new + Y + Y + Y + + + Start + state_recruits_info_flow4_new + Y + Y + Y + + + Start + state_recruits_info_flow5_new + Y + Y + Y + + + state_recruits_info_flow5_new + Success + Y + Y + N + + + state_recruits_info_flow4_new + Success + Y + Y + N + + + state_recruits_info_flow3_new + Success + Y + Y + N + + + state_recruits_info_flow2_new + Success + Y + Y + N + + + state_recruits_info_flow1_new + Success + Y + Y + N + + + Start + Delete file state_job_recruits_info + Y + Y + Y + + + Delete file state_job_recruits_info + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf b/map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf new file mode 100644 index 0000000..fe4c912 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf @@ -0,0 +1,124 @@ + + + job_recruit_last_update_date + Y + + + + - + 2025/06/02 14:48:05.666 + - + 2025/06/02 14:48:05.666 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 592 + 352 + + + + recruit_update_date_ervu_dashboard.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 784 + 352 + + + + row_last_recruit_update_date.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 1056 + 352 + + + + Success + + SUCCESS + + N + 1232 + 352 + + + + + + Start + recruit_update_date_ervu_dashboard.hpl + Y + Y + Y + + + recruit_update_date_ervu_dashboard.hpl + row_last_recruit_update_date.hpl + Y + Y + N + + + row_last_recruit_update_date.hpl + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf b/map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf new file mode 100644 index 0000000..c9b5aec --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/job_recruits_info.hwf @@ -0,0 +1,2776 @@ + + + job_recruits_info + Y + + + + 0 + - + 2025/05/21 13:39:54.614 + - + 2025/05/21 13:39:54.614 + + + CR_DATE + + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 208 + 1232 + + + + recruitment_rows_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl + Basic + + + CR_DATE + CREATE_DATE + + Y + + N + local + N + N + Y + Y + 2128 + 1216 + + + + recruits_info_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2592 + 880 + + + + recruits_info_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2592 + 1040 + + + + recruits_info_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2592 + 1216 + + + + recruits_info_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2592 + 1392 + + + + recruits_info_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2592 + 1568 + + + + recruits_info_param_create_date.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 1888 + 1296 + + + + recruits_info_param_create_date.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 2128 + 1616 + + + + recruitment_rows_five_flow_if_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl + Basic + + Y + + N + local + N + N + Y + Y + 2144 + 2064 + + + + job_check_files_recruits_info.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1584 + 1520 + + + + job_checkpoints_recruits_info.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1984 + 1728 + + + + Simple recruits_info WHERE SUCCESS + + SIMPLE_EVAL + + SUCCESS + string + true + equal + equal + N + variable + STATUS + N + 1392 + 2400 + + + + branching_recruits_info.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl + Basic + + Y + + N + local + N + N + Y + N + 1248 + 1728 + + + + Simple recruits_info WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1472 + 1728 + + + + Simple recruits_info WHERE DELTA + + SIMPLE_EVAL + + DELTA + string + true + equal + equal + N + variable + STATUS + N + 1520 + 3360 + + + + delta_recruits_info_flow1.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2544 + 2608 + + + + checkpoint_job_recruits_info.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl + Basic + + Y + + N + local + N + N + Y + N + 1008 + 1728 + + + + Abort workflow + + ABORT + + N + N + 2144 + 1008 + + + + Abort workflow 2 + + ABORT + + N + N + 1984 + 2176 + + + + Simple job_recruits_info check NEW + + SIMPLE_EVAL + + NEW + string + true + equal + equal + N + variable + STATUS + N + 736 + 1232 + + + + check_if_job_recruits_info_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 464 + 1232 + + + + change_status_to_processing.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2288 + 1488 + + + + change_status_recruits_info_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 880 + + + + change_status_recruits_info_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 960 + + + + change_status_recruits_info_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1040 + + + + change_status_recruits_info_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1120 + + + + change_status_recruits_info_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1216 + + + + change_status_recruits_info_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1296 + + + + change_status_recruits_info_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1392 + + + + change_status_recruits_info_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1472 + + + + change_status_recruits_info_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1568 + + + + change_status_recruits_info_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1648 + + + + checkpoint_job_recruits_info.hpl (2) + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl + Basic + + Y + + N + local + N + N + Y + N + 3312 + 1248 + + + + Success new citizen + + SUCCESS + + N + 3552 + 1248 + + + + recruits_info_flow1.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl + Basic + + + ID_F1 + IDM_FLOW1 + + Y + + Y + local + N + N + Y + N + 2592 + 1728 + + + + recruits_info_flow2.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl + Basic + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2592 + 1888 + + + + recruits_info_flow3.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl + Basic + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2592 + 2064 + + + + recruits_info_flow4.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl + Basic + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2592 + 2240 + + + + recruits_info_flow5.hpl 2 + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl + Basic + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2592 + 2416 + + + + change_status_recruits_info_flow1_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1728 + + + + change_status_recruits_info_flow1_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1808 + + + + change_status_recruits_info_flow2_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1888 + + + + change_status_recruits_info_flow2_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 1968 + + + + change_status_recruits_info_flow3_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2064 + + + + change_status_recruits_info_flow3_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2144 + + + + change_status_recruits_info_flow4_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2240 + + + + change_status_recruits_info_flow4_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2320 + + + + change_status_recruits_info_flow5_success.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2416 + + + + change_status_recruits_info_flow5_error.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2496 + + + + checkpoint_job_recruits_info.hpl (2) 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl + Basic + + Y + + N + local + N + N + Y + N + 3312 + 2096 + + + + recruits_info success after error + + SUCCESS + + N + 3552 + 2096 + + + + change_status_to_processing.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl + Basic + + Y + + N + local + N + N + Y + N + 2288 + 2320 + + + + change_status_to_processing_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 2256 + 3200 + + + + change_status_delta_recruits_info_flow1_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2608 + + + + change_status_delta_recruits_info_flow1_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2688 + + + + recruitment_rows_five_flow.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl + Basic + + + CR_DATE + CREATE_DATE + + Y + + N + local + N + N + Y + Y + 2128 + 2944 + + + + Abort workflow 2 2 + + ABORT + + N + N + 2096 + 3120 + + + + delta_recruits_info_flow2.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F2 + IDM_FLOW2 + + Y + + Y + local + N + N + Y + N + 2544 + 2768 + + + + change_status_delta_recruits_info_flow2_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2768 + + + + change_status_delta_recruits_info_flow2_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2848 + + + + delta_recruits_info_flow3.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F3 + IDM_FLOW3 + + Y + + Y + local + N + N + Y + N + 2544 + 2944 + + + + change_status_delta_recruits_info_flow3_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 2944 + + + + change_status_delta_recruits_info_flow3_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 3024 + + + + delta_recruits_info_flow4.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F4 + IDM_FLOW4 + + Y + + Y + local + N + N + Y + N + 2544 + 3104 + + + + change_status_delta_recruits_info_flow4_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 3104 + + + + change_status_delta_recruits_info_flow4_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 3184 + + + + delta_recruits_info_flow5.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl + Basic + + + M_R_UP_DATE + ${M_R_UP_DATE} + + + ID_F5 + IDM_FLOW5 + + Y + + Y + local + N + N + Y + N + 2544 + 3280 + + + + change_status_delta_recruits_info_flow5_success.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 3280 + + + + change_status_delta_recruits_info_flow5_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 2880 + 3360 + + + + checkpoint_job_recruits_info_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 3312 + 2944 + + + + recruits_info_delta success + + SUCCESS + + N + 3552 + 2944 + + + + branching_recruits_info_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 1552 + 2944 + + + + Simple delta_recruits_info WHERE ERROR + + SIMPLE_EVAL + + ERROR + string + true + equal + equal + N + variable + STATUS + N + 1824 + 2944 + + + + delta_recruits_info success + + SUCCESS + + N + 2000 + 2768 + + + + + + recruits_info_param_create_date.hpl + recruitment_rows_five_flow.hpl + N + Y + Y + + + recruitment_rows_five_flow.hpl + recruits_info_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl + recruits_info_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl + recruits_info_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl + recruits_info_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl + recruits_info_flow5.hpl + Y + Y + N + + + recruits_info_param_create_date.hpl (2) + recruitment_rows_five_flow_if_error.hpl + N + Y + N + + + job_check_files_recruits_info.hwf + recruits_info_param_create_date.hpl + N + Y + N + + + job_check_files_recruits_info.hwf + job_checkpoints_recruits_info.hwf + N + N + N + + + job_checkpoints_recruits_info.hwf + recruits_info_param_create_date.hpl (2) + N + Y + Y + + + job_checkpoints_recruits_info.hwf + recruitment_rows_five_flow_if_error.hpl + N + Y + N + + + job_check_files_recruits_info.hwf + recruitment_rows_five_flow.hpl + N + Y + N + + + branching_recruits_info.hpl + Simple recruits_info WHERE SUCCESS + Y + Y + Y + + + branching_recruits_info.hpl + Simple recruits_info WHERE ERROR + Y + N + Y + + + Start + job_check_files_recruits_info.hwf + N + Y + Y + + + recruitment_rows_five_flow.hpl + Abort workflow + Y + N + N + + + recruitment_rows_five_flow_if_error.hpl + Abort workflow 2 + Y + N + N + + + Start + check_if_job_recruits_info_exists.hpl + Y + Y + Y + + + check_if_job_recruits_info_exists.hpl + Simple job_recruits_info check NEW + Y + Y + N + + + recruits_info_flow1.hpl + change_status_recruits_info_flow1_success.hpl + Y + Y + N + + + recruits_info_flow1.hpl + change_status_recruits_info_flow1_error.hpl + Y + N + N + + + recruits_info_flow2.hpl + change_status_recruits_info_flow2_success.hpl + Y + Y + N + + + recruits_info_flow2.hpl + change_status_recruits_info_flow2_error.hpl + Y + N + N + + + recruits_info_flow3.hpl + change_status_recruits_info_flow3_success.hpl + Y + Y + N + + + recruits_info_flow3.hpl + change_status_recruits_info_flow3_error.hpl + Y + N + N + + + recruits_info_flow4.hpl + change_status_recruits_info_flow4_success.hpl + Y + Y + N + + + recruits_info_flow4.hpl + change_status_recruits_info_flow4_error.hpl + Y + N + N + + + recruits_info_flow5.hpl + change_status_recruits_info_flow5_success.hpl + Y + Y + N + + + recruits_info_flow5.hpl + change_status_recruits_info_flow5_error.hpl + Y + N + N + + + change_status_recruits_info_flow1_success.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow1_error.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow2_success.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow2_error.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + checkpoint_job_recruits_info.hpl (2) + Success new citizen + Y + Y + N + + + change_status_recruits_info_flow3_success.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow3_error.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow4_success.hpl + checkpoint_job_recruits_info.hpl (2) + Y + Y + Y + + + change_status_recruits_info_flow4_error.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow5_success.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + change_status_recruits_info_flow5_error.hpl + checkpoint_job_recruits_info.hpl (2) + Y + N + Y + + + recruits_info_flow1.hpl 2 + change_status_recruits_info_flow1_success.hpl 2 + Y + Y + N + + + recruits_info_flow1.hpl 2 + change_status_recruits_info_flow1_error.hpl 2 + Y + N + N + + + recruits_info_flow2.hpl 2 + change_status_recruits_info_flow2_success.hpl 2 + Y + Y + N + + + recruits_info_flow2.hpl 2 + change_status_recruits_info_flow2_error.hpl 2 + Y + N + N + + + recruits_info_flow3.hpl 2 + change_status_recruits_info_flow3_success.hpl 2 + Y + Y + N + + + recruits_info_flow3.hpl 2 + change_status_recruits_info_flow3_error.hpl 2 + Y + N + N + + + recruits_info_flow4.hpl 2 + change_status_recruits_info_flow4_success.hpl 2 + Y + Y + N + + + recruits_info_flow4.hpl 2 + change_status_recruits_info_flow4_error.hpl 2 + Y + N + N + + + recruits_info_flow5.hpl 2 + change_status_recruits_info_flow5_success.hpl 2 + Y + Y + N + + + recruits_info_flow5.hpl 2 + change_status_recruits_info_flow5_error.hpl 2 + Y + N + N + + + change_status_recruits_info_flow1_success.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow1_error.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow2_success.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow2_error.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow3_success.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow3_error.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow4_success.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + Y + Y + + + change_status_recruits_info_flow4_error.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow5_success.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + change_status_recruits_info_flow5_error.hpl 2 + checkpoint_job_recruits_info.hpl (2) 2 + Y + N + Y + + + checkpoint_job_recruits_info.hpl (2) 2 + recruits_info success after error + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + recruits_info_flow3.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + recruits_info_flow2.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + recruits_info_flow1.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + recruits_info_flow4.hpl 2 + Y + Y + N + + + recruitment_rows_five_flow_if_error.hpl + recruits_info_flow5.hpl 2 + Y + Y + N + + + Simple job_recruits_info check NEW + checkpoint_job_recruits_info.hpl + Y + N + N + + + checkpoint_job_recruits_info.hpl + branching_recruits_info.hpl + Y + N + Y + + + delta_recruits_info_flow1.hpl + change_status_delta_recruits_info_flow1_success.hpl + Y + Y + N + + + delta_recruits_info_flow1.hpl + change_status_delta_recruits_info_flow1_error.hpl + Y + N + N + + + Simple recruits_info WHERE ERROR + job_checkpoints_recruits_info.hwf + N + Y + N + + + recruitment_rows_five_flow_if_error.hpl + change_status_to_processing.hpl 2 + Y + Y + N + + + Simple job_recruits_info check NEW + recruitment_rows_five_flow.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl + change_status_to_processing.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl 2 + delta_recruits_info_flow1.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl 2 + change_status_to_processing_delta.hpl + Y + N + Y + + + recruitment_rows_five_flow.hpl 2 + Abort workflow 2 2 + Y + N + N + + + delta_recruits_info_flow2.hpl + change_status_delta_recruits_info_flow2_success.hpl + Y + Y + N + + + delta_recruits_info_flow2.hpl + change_status_delta_recruits_info_flow2_error.hpl + Y + N + N + + + delta_recruits_info_flow3.hpl + change_status_delta_recruits_info_flow3_success.hpl + Y + Y + N + + + delta_recruits_info_flow3.hpl + change_status_delta_recruits_info_flow3_error.hpl + Y + N + N + + + delta_recruits_info_flow4.hpl + change_status_delta_recruits_info_flow4_success.hpl + Y + Y + N + + + delta_recruits_info_flow4.hpl + change_status_delta_recruits_info_flow4_error.hpl + Y + N + N + + + delta_recruits_info_flow5.hpl + change_status_delta_recruits_info_flow5_success.hpl + Y + Y + N + + + delta_recruits_info_flow5.hpl + change_status_delta_recruits_info_flow5_error.hpl + Y + N + N + + + recruitment_rows_five_flow.hpl 2 + delta_recruits_info_flow2.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl 2 + delta_recruits_info_flow3.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl 2 + delta_recruits_info_flow4.hpl + Y + Y + N + + + recruitment_rows_five_flow.hpl 2 + delta_recruits_info_flow5.hpl + Y + Y + N + + + change_status_delta_recruits_info_flow1_success.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow1_error.hpl + checkpoint_job_recruits_info_delta.hpl + Y + Y + Y + + + change_status_delta_recruits_info_flow2_success.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow2_error.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow3_success.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow3_error.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow4_success.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow4_error.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow5_success.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + change_status_delta_recruits_info_flow5_error.hpl + checkpoint_job_recruits_info_delta.hpl + Y + N + Y + + + checkpoint_job_recruits_info_delta.hpl + recruits_info_delta success + Y + Y + N + + + Simple recruits_info WHERE SUCCESS + branching_recruits_info_delta.hpl + Y + Y + N + + + branching_recruits_info_delta.hpl + Simple delta_recruits_info WHERE ERROR + Y + Y + Y + + + Simple delta_recruits_info WHERE ERROR + recruitment_rows_five_flow.hpl 2 + Y + Y + N + + + Simple delta_recruits_info WHERE ERROR + delta_recruits_info success + Y + N + N + + + Simple recruits_info WHERE ERROR + recruitment_rows_five_flow_if_error.hpl + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 74 + 1744 + 1792 + тут ищем последний idm_id военкомата упавший +в любом из потоков и записываем в таблицу +public.etl_checkpoints в формате: +наименование пайплайна, id военкомата, текущая дата/время, статус, дата создания военкомата + 546 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 2016 + 1152 + лимиты + 54 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 2128 + 2128 + лимиты + 54 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 2160 + 384 + тут в json файы записываем DELTA + 200 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 42 + 384 + 1168 + если нет этого файла, значит данные еще не загружались +state_job_recruits_info.json + 331 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 72 + 800 + 928 + 0001-01-01 00:00:00 + +3001-01-01 00:00:00 + + 114 + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl new file mode 100644 index 0000000..18c37c6 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl @@ -0,0 +1,151 @@ + + + + delta_recruits_info_flow1 + Y + + + + Normal + 0 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + N + 1000 + 100 + - + 2025/05/29 17:05:14.836 + - + 2025/05/29 17:05:14.836 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + info + info + Y + +
+ N + + + 848 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + r.system_update_date >= '${M_R_UP_DATE}'::timestamp + '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F1}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl new file mode 100644 index 0000000..56fd955 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl @@ -0,0 +1,151 @@ + + + + delta_recruits_info_flow2 + Y + + + + Normal + 0 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + N + 1000 + 100 + - + 2025/05/29 17:05:14.836 + - + 2025/05/29 17:05:14.836 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + info + info + Y + +
+ N + + + 848 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + r.system_update_date >= '${M_R_UP_DATE}'::timestamp + '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F2}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl new file mode 100644 index 0000000..a9d4a9e --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl @@ -0,0 +1,151 @@ + + + + delta_recruits_info_flow3 + Y + + + + Normal + 0 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + N + 1000 + 100 + - + 2025/05/29 17:05:14.836 + - + 2025/05/29 17:05:14.836 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + info + info + Y + +
+ N + + + 848 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + r.system_update_date >= '${M_R_UP_DATE}'::timestamp + '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F3}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl new file mode 100644 index 0000000..39dc059 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl @@ -0,0 +1,151 @@ + + + + delta_recruits_info_flow4 + Y + + + + Normal + 0 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + N + 1000 + 100 + - + 2025/05/29 17:05:14.836 + - + 2025/05/29 17:05:14.836 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + info + info + Y + +
+ N + + + 848 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + r.system_update_date >= '${M_R_UP_DATE}'::timestamp + '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F4}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl new file mode 100644 index 0000000..3bfe18d --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl @@ -0,0 +1,151 @@ + + + + delta_recruits_info_flow5 + Y + + + + Normal + 0 + + + M_R_CR_DATE + + + + + M_R_UP_DATE + + + + + N + 1000 + 100 + - + 2025/05/29 17:05:14.836 + - + 2025/05/29 17:05:14.836 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + info + info + Y + +
+ N + + + 848 + 368 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + r.system_update_date >= '${M_R_UP_DATE}'::timestamp + '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F5}' + AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 432 + 368 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl new file mode 100644 index 0000000..71a7b98 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl @@ -0,0 +1,232 @@ + + + + recruits_info_flow1 + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Select values 4 2 + N + + + Select values 4 2 + Insert / update + N + + + Table input + Insert / update + Y + + + Select values 4 2 + Get variables + N + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + recruitment_id + -1 + none + String + ID_F1 + + + + + 976 + 400 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + +
+ N + + + 992 + 288 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + ID_F1 + ID_F1 + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 400 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F1}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + Y + + + 448 + 288 + + + + + Select values 4 2 + Get variables + Y + + + + + + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl new file mode 100644 index 0000000..068d2c1 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl @@ -0,0 +1,141 @@ + + + + recruits_info_flow2 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + +
+ N + + + 896 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name--, + --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${ID_F2}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F2}' + AND '${M_R_CR_DATE}' >= r.system_create_date +--AND '${CR_DATE}' < ri.created_at +--order by ri.created_at asc + Y + + + 352 + 288 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl new file mode 100644 index 0000000..78ca857 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl @@ -0,0 +1,141 @@ + + + + recruits_info_flow3 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + +
+ N + + + 896 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name--, + --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${ID_F3}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F3}' + AND '${M_R_CR_DATE}' >= r.system_create_date +--AND '${CR_DATE}' < ri.created_at +--order by ri.created_at asc + Y + + + 352 + 288 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl new file mode 100644 index 0000000..1201625 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl @@ -0,0 +1,141 @@ + + + + recruits_info_flow4 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + +
+ N + + + 896 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name--, + --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${ID_F4}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F4}' + AND '${M_R_CR_DATE}' >= r.system_create_date +--AND '${CR_DATE}' < ri.created_at +--order by ri.created_at asc + Y + + + 352 + 288 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl new file mode 100644 index 0000000..332bc6e --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl @@ -0,0 +1,141 @@ + + + + recruits_info_flow5 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 14:05:02.260 + - + 2025/05/21 14:05:02.260 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + +
+ N + + + 896 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name--, + --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${ID_F5}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F5}' + AND '${M_R_CR_DATE}' >= r.system_create_date +--AND '${CR_DATE}' < ri.created_at +--order by ri.created_at asc + Y + + + 352 + 288 + + + + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl new file mode 100644 index 0000000..f0b4186 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl @@ -0,0 +1,95 @@ + + + + recruit_update_date_ervu_dashboard + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/02 14:50:31.833 + - + 2025/06/02 14:50:31.833 + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + created_at AS system_create_date, + updated_at AS system_update_date, + current_timestamp AS record_created, + 'job_recruits_info' AS workflow +FROM ervu_dashboard.recruits_info +WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.recruits_info) +limit 1 + N + + + 896 + 304 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + recruit_create
+ N + Y + N + Y + + + 1216 + 304 + +
+ + + +
diff --git a/map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl new file mode 100644 index 0000000..4501519 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl @@ -0,0 +1,185 @@ + + + + recruitment_rows_five_flow_if_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/23 14:28:22.572 + - + 2025/05/23 14:28:22.572 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 880 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +fr_check AS ( + SELECT + last_recruitment_id AS recruitment_id, + recruitment_created_date, + status, + job_name + FROM public.etl_checkpoints + WHERE status = 'ERROR' AND job_name IN ('recruits_info_flow1', 'recruits_info_flow2', 'recruits_info_flow3', 'recruits_info_flow4', 'recruits_info_flow5') +), +ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + FROM ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow1') THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow1') THEN idm_id::text END) AS idm_flow1, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow2') THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow2') THEN idm_id::text END) AS idm_flow2, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow3') THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow3') THEN idm_id::text END) AS idm_flow3, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow4') THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow4') THEN idm_id::text END) AS idm_flow4, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow5') THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow5') THEN idm_id::text END) AS idm_flow5 + FROM splitted + GROUP BY position +), +remains as ( + SELECT + position, + cr_flow1, + idm_flow1::uuid, + cr_flow2, + idm_flow2::uuid, + cr_flow3, + idm_flow3::uuid, + cr_flow4, + idm_flow4::uuid, + cr_flow5, + idm_flow5::uuid + FROM pivoted + WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) + OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) + OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) + OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) + OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) + order by position +), +idm1 as ( + select + cr_flow1, + idm_flow1 + from remains + where cr_flow1 is not null and idm_flow1 is not null +), +idm2 as ( + select + cr_flow2, + idm_flow2 + from remains + where cr_flow2 is not null and idm_flow2 is not null +), +idm3 as ( + select + cr_flow3, + idm_flow3 + from remains + where cr_flow3 is not null and idm_flow3 is not null +), +idm4 as ( + select + cr_flow4, + idm_flow4 + from remains + where cr_flow4 is not null and idm_flow4 is not null +), +idm5 as ( + select + cr_flow5, + idm_flow5 + from remains + where cr_flow5 is not null and idm_flow5 is not null +) +select + i1.*, + i2.*, + i3.*, + i4.*, + i5.* +FROM + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn +FULL OUTER JOIN + (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn +ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) +limit 2 + N + + + 512 + 288 + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl b/map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl new file mode 100644 index 0000000..ec0d770 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl @@ -0,0 +1,111 @@ + + + + recruits_info_param_create_date + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2025/05/22 14:04:44.129 + - + 2025/05/22 14:04:44.129 + + + + + + Table input + Copy rows to result + Y + + + Copy rows to result + Set variables + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 848 + 288 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + + create_date + CR_DATE + PARENT_WORKFLOW + + + Y + + + 1088 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +/* + CASE + WHEN count(*)>0 THEN max(created_at)::timestamp + ELSE '0001-01-01 00:00:00'::timestamp + END AS CREATE_DATE +*/ +'0001-01-01 00:00:00'::timestamp AS CREATE_DATE +FROM ervu_person_registry_raw.recruits_info + N + + + 576 + 288 + + + + + + diff --git a/map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl b/map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl new file mode 100644 index 0000000..47ce152 --- /dev/null +++ b/map_v1/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl @@ -0,0 +1,108 @@ + + + + row_last_recruit_update_date + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/06/02 14:51:59.611 + - + 2025/06/02 14:51:59.611 + + + + + + Copy rows to result + Set variables + Y + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 992 + 320 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + MAX_RECRUIT_UPDATE_DATE + M_R_UP_DATE + GP_WORKFLOW + + + Y + + + 1232 + 320 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + system_update_date AS MAX_RECRUIT_UPDATE_DATE--, +--record_created +FROM public.recruit_create +WHERE system_update_date = (select max(system_update_date) from public.recruit_create) +and workflow = 'job_recruits_info' +order by record_created desc +limit 1 + N + + + 688 + 320 + + + + + + diff --git a/map_v1/info_recruits/recruitment/job_recruitment.hwf b/map_v1/info_recruits/recruitment/job_recruitment.hwf new file mode 100644 index 0000000..2c7cb84 --- /dev/null +++ b/map_v1/info_recruits/recruitment/job_recruitment.hwf @@ -0,0 +1,144 @@ + + + job_recruitment + Y + + + + - + 2024/08/16 15:32:20.489 + - + 2024/08/16 15:32:20.489 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 96 + 224 + + + + Success + + SUCCESS + + N + 768 + 224 + + + + recruitment.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/recruitment/recruitment.hpl + + + Basic + + + CR_DATE + CREATE_DATE + + + Y + + Y + local + N + N + Y + N + 592 + 224 + + + + recruitment_param_create_date.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/recruitment/recruitment_param_create_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 336 + 224 + + + + + + recruitment.hpl + Success + Y + Y + N + + + Start + recruitment_param_create_date.hpl + Y + Y + Y + + + recruitment_param_create_date.hpl + recruitment.hpl + Y + Y + N + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/info_recruits/recruitment/recruitment.hpl b/map_v1/info_recruits/recruitment/recruitment.hpl new file mode 100644 index 0000000..9a82266 --- /dev/null +++ b/map_v1/info_recruits/recruitment/recruitment.hpl @@ -0,0 +1,204 @@ + + + + recruitment + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + + + + + + Table input + Table output + N + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + idm_id + idm_id + + ervu_dashboard + recruitment
+ + id + id + Y + + + parent_id + parent_id + Y + + + schema + schema + Y + + + shortname + shortname + Y + + + updated_at + updated_at + Y + + + idm_id + idm_id + N + + + code + code + Y + + + created_at + created_at + Y + + + hidden + hidden + Y + + + enabled + enabled + Y + + + reports_enabled + reports_enabled + Y + +
+ N + + + 512 + 208 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + SELECT + rt.id, + rt.fullname as shortname, + rt.parent_id, + rt.idm_id, + rt.schema, + rt.military_code AS code, + rt.created_at, + rt.updated_at, + rt.hidden, + rt.enabled, + rt.reports_enabled--, + --ROW_NUMBER() OVER (ORDER BY rt.idm_id) AS rn_recruitment +FROM + public.recruitment rt +WHERE + rt.idm_id ~ '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' + AND '${CR_DATE}' < rt.created_at + AND (rt.schema = 'Ministry' OR (rt.schema IS NOT NULL AND rt.parent_id IS NOT NULL)) + AND rt.hidden IS NOT TRUE + AND ( + rt.fullname ILIKE '%военный%' + OR + rt.fullname ILIKE '%округ%' + OR + rt.fullname ILIKE '%министерство%' +) + AND rt.fullname NOT ILIKE '%тест%' + Y + + + 208 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + recruitment
+ N + Y + N + Y + + + 480 + 320 + +
+ + + +
diff --git a/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl b/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl new file mode 100644 index 0000000..45843bc --- /dev/null +++ b/map_v1/info_recruits/recruitment/recruitment_param_create_date.hpl @@ -0,0 +1,76 @@ + + + + recruitment_param_create_date + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/21 17:32:05.740 + - + 2025/05/21 17:32:05.740 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 768 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + CASE + WHEN count(*)>0 THEN max(created_at)::timestamp + ELSE '0001-01-01 00:00:00'::timestamp + END AS CREATE_DATE +FROM ervu_dashboard.recruitment + N + + + 496 + 336 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/job_create_files.hwf b/map_v1/info_recruits/supportive_jobs/job_create_files.hwf new file mode 100644 index 0000000..3e8f21c --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/job_create_files.hwf @@ -0,0 +1,215 @@ + + + job_create_files + Y + + + + - + 2025/05/26 16:45:11.777 + - + 2025/05/26 16:45:11.777 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 720 + 528 + + + + job_create_files_recruits_info.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf + Nothing + + Y + + N + local + N + N + Y + N + 944 + 528 + + + + Success job_create_files_recruits_info.hwf + + SUCCESS + + N + 1216 + 528 + + + + job_create_files_citizen.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/job_create_files_citizen.hwf + Nothing + + Y + + N + local + N + N + Y + N + 944 + 608 + + + + job_create_files_child.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/job_create_files_child.hwf + Nothing + + Y + + N + local + N + N + Y + N + 944 + 688 + + + + state_job_general_info_recruits_error 3 + + WRITE_TO_FILE + + N + { + "status": "SUCCESS", + "pipeline": "job_general_info_recruits" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/checkpoints/state_job_general_info_recruits.json + N + 944 + 768 + + + + + + Start + job_create_files_recruits_info.hwf + Y + Y + Y + + + job_create_files_recruits_info.hwf + Success job_create_files_recruits_info.hwf + Y + Y + N + + + Start + job_create_files_citizen.hwf + Y + Y + Y + + + job_create_files_citizen.hwf + Success job_create_files_recruits_info.hwf + Y + Y + N + + + Start + job_create_files_child.hwf + Y + Y + Y + + + job_create_files_child.hwf + Success job_create_files_recruits_info.hwf + Y + Y + N + + + Start + state_job_general_info_recruits_error 3 + Y + Y + Y + + + state_job_general_info_recruits_error 3 + Success job_create_files_recruits_info.hwf + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 832 + 480 + тут будут все workflow на создание файлов + 247 + + + + diff --git a/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf b/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf new file mode 100644 index 0000000..8367208 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/job_create_files_for_test.hwf @@ -0,0 +1,145 @@ + + + job_create_files_for_test + Y + + + + - + 2025/06/04 16:51:54.189 + - + 2025/06/04 16:51:54.189 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 544 + 368 + + + + state_job_citizen_success + + WRITE_TO_FILE + + N + { + "status": "SUCCESS", + "pipeline": "job_citizen" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/state_job_citizen.json + N + 752 + 368 + + + + state_job_recruits_info_success 2 + + WRITE_TO_FILE + + N + { + "status": "SUCCESS", + "pipeline": "job_recruits_info" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_job_recruits_info.json + N + 752 + 448 + + + + Success + + SUCCESS + + N + 1008 + 448 + + + + state_job_child_success + + WRITE_TO_FILE + + N + { + "status": "SUCCESS", + "pipeline": "job_child" +} + N + UTF-8 + ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_job_child.json + N + 752 + 288 + + + + + + Start + state_job_citizen_success + Y + Y + Y + + + Start + state_job_recruits_info_success 2 + Y + Y + Y + + + state_job_citizen_success + Success + Y + Y + N + + + state_job_recruits_info_success 2 + Success + Y + Y + N + + + Start + state_job_child_success + Y + Y + Y + + + state_job_child_success + Success + Y + Y + N + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf b/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf new file mode 100644 index 0000000..7e7b7bf --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/job_recruit_create_date.hwf @@ -0,0 +1,124 @@ + + + job_recruit_create_date + Y + + + + - + 2025/05/29 14:25:10.488 + - + 2025/05/29 14:25:10.488 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 416 + 352 + + + + recruit_create_date_person_registry.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl + Basic + + Y + + N + local + N + N + Y + N + 640 + 352 + + + + Success + + SUCCESS + + N + 1152 + 352 + + + + row_last_recruit_create_date.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 912 + 352 + + + + + + Start + recruit_create_date_person_registry.hpl + Y + Y + Y + + + recruit_create_date_person_registry.hpl + row_last_recruit_create_date.hpl + Y + Y + N + + + row_last_recruit_create_date.hpl + Success + Y + Y + Y + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl b/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl new file mode 100644 index 0000000..dcc73d6 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruit_create_date_person_registry.hpl @@ -0,0 +1,95 @@ + + + + recruit_create_date_person_registry + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/29 14:31:18.657 + - + 2025/05/29 14:31:18.657 + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + SELECT + system_create_date, + system_update_date, + current_timestamp AS record_created, + 'job_general_info_recruits' AS workflow +FROM public.recruits +WHERE system_create_date = (SELECT MAX(system_create_date) FROM public.recruits) +limit 1 + N + + + 432 + 352 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + public + N + recruit_create
+ N + Y + N + Y + + + 752 + 352 + +
+ + + +
diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows.hpl new file mode 100644 index 0000000..5706b5b --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows.hpl @@ -0,0 +1,76 @@ + + + + recruitment_rows + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS RECRUITMENT, +created_at AS CREATE_DATE +FROM ervu_dashboard.recruitment +order by created_at asc +limit 5 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl new file mode 100644 index 0000000..59d8be1 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 5 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl new file mode 100644 index 0000000..d51fed4 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_child.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_child + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen.hpl new file mode 100644 index 0000000..264def9 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 5 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl new file mode 100644 index 0000000..f40a0ca --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen_appealing_violations_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl new file mode 100644 index 0000000..6a8e5ea --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen_criminal_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl new file mode 100644 index 0000000..6a2f529 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_guardianship.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen_guardianship + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 5 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl new file mode 100644 index 0000000..711a8a9 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen_liability_fz53 + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl new file mode 100644 index 0000000..1cb9338 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_spouse.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_citizen_spouse + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl new file mode 100644 index 0000000..7f4eb24 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_passport.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_passport + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl new file mode 100644 index 0000000..2276d49 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_prosecution.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_prosecution + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl new file mode 100644 index 0000000..0c73a19 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_punishment.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_punishment + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl new file mode 100644 index 0000000..e05c8bb --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl @@ -0,0 +1,121 @@ + + + + recruitment_rows_five_flow_snils_inn + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 304 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ordered AS ( + SELECT + idm_id, + created_at, + ROW_NUMBER() OVER (ORDER BY created_at) AS rn, + COUNT(*) OVER () AS total_rows + from ervu_dashboard.recruitment +), +splitted AS ( + SELECT *, + CEIL(total_rows / 5.0) AS part_size, + FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, + ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position + FROM ordered +), +pivoted AS ( + SELECT + position, + + MAX(CASE WHEN flow_num = 1 THEN created_at END) AS cr_flow1, + MAX(CASE WHEN flow_num = 1 THEN idm_id::text END) AS idm_flow1, + + MAX(CASE WHEN flow_num = 2 THEN created_at END) AS cr_flow2, + MAX(CASE WHEN flow_num = 2 THEN idm_id::text END) AS idm_flow2, + + MAX(CASE WHEN flow_num = 3 THEN created_at END) AS cr_flow3, + MAX(CASE WHEN flow_num = 3 THEN idm_id::text END) AS idm_flow3, + + MAX(CASE WHEN flow_num = 4 THEN created_at END) AS cr_flow4, + MAX(CASE WHEN flow_num = 4 THEN idm_id::text END) AS idm_flow4, + + MAX(CASE WHEN flow_num = 5 THEN created_at END) AS cr_flow5, + MAX(CASE WHEN flow_num = 5 THEN idm_id::text END) AS idm_flow5 + + FROM splitted + GROUP BY position + ORDER BY position +) +SELECT + cr_flow1, + IDM_FLOW1::uuid, + cr_flow2, + IDM_FLOW2::uuid, + cr_flow3, + IDM_FLOW3::uuid, + cr_flow4, + IDM_FLOW4::uuid, + cr_flow5, + IDM_FLOW5::uuid +FROM pivoted +limit 3 + N + + + 464 + 304 + + + + + + diff --git a/map_v1/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl b/map_v1/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl new file mode 100644 index 0000000..583db88 --- /dev/null +++ b/map_v1/info_recruits/supportive_jobs/row_last_recruit_create_date.hpl @@ -0,0 +1,109 @@ + + + + row_last_recruit_create_date + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/05/29 15:45:10.478 + - + 2025/05/29 15:45:10.478 + + + + + + Table input + Copy rows to result + Y + + + Copy rows to result + Set variables + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 768 + 416 + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + + MAX_RECRUIT_CREATE_DATE + M_R_CR_DATE + GP_WORKFLOW + + + Y + + + 1008 + 416 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + system_create_date AS MAX_RECRUIT_CREATE_DATE--, +--record_created +FROM public.recruit_create +WHERE system_create_date = (select max(system_create_date) from public.recruit_create) +and workflow = 'job_general_info_recruits' +order by record_created desc +limit 1 + N + + + 464 + 416 + + + + + + diff --git a/map_v1/instruction.txt b/map_v1/instruction.txt new file mode 100644 index 0000000..7787b16 --- /dev/null +++ b/map_v1/instruction.txt @@ -0,0 +1,2 @@ +/jobs_once_a_day/job_info_recruits.kjb - запустить при старте 1 раз +/info_recruits/job_info_recruits.kjb - подождать час и запускать раз в 10 минут \ No newline at end of file diff --git a/map_v1/job_copy_deferment_punishment_fz53_info.hwf b/map_v1/job_copy_deferment_punishment_fz53_info.hwf new file mode 100644 index 0000000..42428bd --- /dev/null +++ b/map_v1/job_copy_deferment_punishment_fz53_info.hwf @@ -0,0 +1,119 @@ + + + job_copy_deferment_punishment_fz53_info + Y + + + + 0 + - + 2025/04/25 17:38:51.703 + - + 2025/04/25 17:38:51.703 + + + + + Start 2 + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 528 + 320 + + + + Success + + SUCCESS + + N + 1408 + 320 + + + + copy_punishment_and_deferment_once.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/jobs_once_a_day/copy_punishment_and_deferment_once.hwf + Nothing + + Y + + N + local + N + N + Y + N + 800 + 320 + + + + citizen_flags.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/jobs_once_a_day/citizen_flags.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1072 + 320 + + + + + + Start 2 + copy_punishment_and_deferment_once.hwf + Y + Y + Y + + + copy_punishment_and_deferment_once.hwf + citizen_flags.hwf + Y + Y + N + + + citizen_flags.hwf + Success + Y + Y + N + + + + + + diff --git a/map_v1/job_general.hwf b/map_v1/job_general.hwf new file mode 100644 index 0000000..93eb1fd --- /dev/null +++ b/map_v1/job_general.hwf @@ -0,0 +1,230 @@ + + + job_general + Y + + + + 0 + - + 2024/08/21 17:23:33.592 + - + 2024/08/21 17:23:33.592 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 288 + 240 + + + + Success + + SUCCESS + + N + 1296 + 240 + + + + job_pack.pub_recruitment + + WORKFLOW + + N + N + N + N + ${Internal.Entry.Current.Folder}/job_pack.pub_recruitment.hwf + + + Nothing + + Y + + N + local + N + N + Y + N + 512 + 240 + + + + job_recruitments_all + + WORKFLOW + + N + N + N + N + ${Internal.Entry.Current.Folder}/job_recruitments_all.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_recruitments_all + Minimal + + Y + + N + local + N + N + Y + N + 720 + 240 + + + + job_last_recording_date + + WORKFLOW + + N + N + N + N + ${Internal.Entry.Current.Folder}/\recording_date\job_last_recording_date.hwf + Nothing + + Y + + N + local + N + N + Y + N + 1120 + 240 + + + + job_info_recruits.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/job_info_recruits.hwf + Nothing + + Y + + N + local + N + N + Y + N + 928 + 128 + + + + + + job_pack.pub_recruitment + job_recruitments_all + Y + N + Y + + + Start + job_pack.pub_recruitment + Y + Y + Y + + + job_last_recording_date + Success + Y + N + Y + + + job_info_recruits.hwf + job_last_recording_date + N + N + Y + + + job_recruitments_all + job_info_recruits.hwf + N + N + Y + + + job_recruitments_all + job_last_recording_date + Y + N + Y + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + debug_plugin + + Write to log : action_log_result + N + + + Write to log : action_log_result_files + N + + + Write to log : action_log_result_rows + Y + + + Write to log : action_log_level + Basic + + + Write to log : action_log_variables + N + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/job_pack.pub_recruitment.hwf b/map_v1/job_pack.pub_recruitment.hwf new file mode 100644 index 0000000..b31f616 --- /dev/null +++ b/map_v1/job_pack.pub_recruitment.hwf @@ -0,0 +1,133 @@ + + + job_pack.pub_recruitment + Y + + + + - + 2024/08/16 15:32:20.489 + - + 2024/08/16 15:32:20.489 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 96 + 224 + + + + Success + + SUCCESS + + N + 560 + 224 + + + + pack.pub_recruitment + + PIPELINE + + N + N + N + Y + N + N + ${Internal.Entry.Current.Folder}/pack.pub_recruitment.hpl + Basic + + Y + + N + local + N + N + Y + N + 384 + 224 + + + + SQL + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.recruitment + N + N + N + 240 + 112 + + + + + + pack.pub_recruitment + Success + Y + Y + N + + + SQL + pack.pub_recruitment + Y + Y + N + + + Start + SQL + Y + Y + Y + + + Start + pack.pub_recruitment + N + Y + Y + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/job_recruitments_all.hwf b/map_v1/job_recruitments_all.hwf new file mode 100644 index 0000000..595886e --- /dev/null +++ b/map_v1/job_recruitments_all.hwf @@ -0,0 +1,453 @@ + + + job_recruitments_all + Y + + + + 0 + - + 2024/08/21 15:46:54.029 + - + 2024/08/21 15:46:54.029 + + + MD_ARRAY + + + + + MD_ID + + + + + PRNT_ID + + + + + REC_ID + + + + + SCM + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 112 + 240 + + + + job_recruitments_region.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/region/job_recruitments_region.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_recruitments_region + Basic + + Y + + N + local + N + N + Y + Y + 704 + 352 + + + + job_recruitments_country.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/country/job_recruitments_country.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_recruitments_country + Basic + + Y + + N + local + N + N + Y + N + 1120 + 352 + + + + job_recruitments_milcom.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_com/job_recruitments_milcom.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_recruitments_milcom + Basic + + Y + + N + local + N + N + Y + N + 320 + 352 + + + + job_recruitments_mildis.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_district/job_recruitments_mildis.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_recruitments_mildis + Basic + + Y + + N + local + N + N + Y + N + 896 + 352 + + + + Success 2 + + SUCCESS + + N + 1520 + 352 + + + + Success 3 + + SUCCESS + + N + 1072 + 464 + + + + job_ratings.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/ratings/job_ratings.hwf + txt + ${PROJECT_HOME}/log_jobs/log_job_ratings + Basic + + Y + + N + local + N + N + Y + N + 896 + 464 + + + + add_schema.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}\mil_com\parameters\add_schema.hpl + Basic + + Y + + N + local + N + N + Y + N + 528 + 352 + + + + Success + + SUCCESS + + N + 1024 + 192 + + + + percent_for_waiting_reg.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/supportive_jobs/percent_for_waiting_reg.hpl + Basic + + Y + + N + local + N + N + Y + N + 1344 + 352 + + + + main_profile.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/info_recruits/main_profile/main_profile.hwf + + + Nothing + + Y + + N + local + N + N + Y + N + 1296 + 464 + + + + Success 4 + + SUCCESS + + N + 1488 + 464 + + + + + + Start + job_recruitments_milcom.hwf + Y + Y + Y + + + job_recruitments_region.hwf + job_recruitments_mildis.hwf + Y + N + Y + + + job_ratings.hwf + Success 3 + Y + Y + N + + + job_recruitments_region.hwf + job_ratings.hwf + Y + Y + N + + + job_recruitments_mildis.hwf + job_recruitments_country.hwf + Y + N + Y + + + job_recruitments_milcom.hwf + add_schema.hpl + Y + N + Y + + + add_schema.hpl + job_recruitments_region.hwf + Y + N + Y + + + add_schema.hpl + Success + N + Y + N + + + job_recruitments_region.hwf + Success + N + Y + N + + + job_recruitments_mildis.hwf + Success + N + Y + N + + + job_recruitments_milcom.hwf + Success + N + Y + N + + + job_recruitments_country.hwf + percent_for_waiting_reg.hpl + Y + N + Y + + + percent_for_waiting_reg.hpl + Success 2 + Y + Y + Y + + + main_profile.hwf + Success 4 + Y + Y + N + + + job_recruitments_country.hwf + main_profile.hwf + Y + N + Y + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 416 + 544 + на шаге загрузки данных по регионам заполняется таблица ervu_dashboard.array_reg, рейтинги обращаются в эту таблицу за массивами + 766 + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/log.txt b/map_v1/log.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log/log-file-action.csv b/map_v1/log/log-file-action.csv new file mode 100644 index 0000000..94c4045 --- /dev/null +++ b/map_v1/log/log-file-action.csv @@ -0,0 +1,5 @@ +loggingDate;workflowName;workflowFilename;workflowLogChannelId;workflowParentLogChannelId;actionName;actionNr;actionResult;actionLogChannelId;actionLoggingText;actionErrors;actionLogDate;actionDuration;actionExitStatus;actionNrFilesRetrieved;actionFilename;actionComment;actionReason +2024/10/15 17:07:54.006;job_general;C:\Users\acer\Desktop\apache-hop mapping/job_general.hwf;f78de867-bf09-4ceb-b361-16a05a52f249;;Start;0;Y;ebd2f308-0a45-4e51-bbce-ad8227dbf32a;;0;2024/10/15 17:07:39.517;0;0;0;;Workflow execution finished; +2024/10/15 17:07:54.006;job_general;C:\Users\acer\Desktop\apache-hop mapping/job_general.hwf;f78de867-bf09-4ceb-b361-16a05a52f249;;job_pack.pub_recruitment;1;Y;b03a95ed-cbf4-4c22-b938-80af860c1dc0;;0;2024/10/15 17:07:39.618;99;0;0;file:///C:/Users/acer/Desktop/apache-hop%20mapping/job_pack.pub_recruitment.hwf;Workflow execution finished; +2024/10/15 17:07:54.006;job_general;C:\Users\acer\Desktop\apache-hop mapping/job_general.hwf;f78de867-bf09-4ceb-b361-16a05a52f249;;job_recruitments_all;2;Y;f6553ca0-b694-4478-b9e7-40c724142b31;;0;2024/10/15 17:07:54.000;14316;0;0;file:///C:/Users/acer/Desktop/apache-hop%20mapping/job_recruitments_all.hwf;Workflow execution finished; +2024/10/15 17:07:54.006;job_general;C:\Users\acer\Desktop\apache-hop mapping/job_general.hwf;f78de867-bf09-4ceb-b361-16a05a52f249;;Success;2;Y;55b7fb84-4bff-43ae-a454-2fe01927bddf;;0;2024/10/15 17:07:54.002;0;0;0;;Workflow execution finished; diff --git a/map_v1/log/log-file-workflow.csv b/map_v1/log/log-file-workflow.csv new file mode 100644 index 0000000..69266b2 --- /dev/null +++ b/map_v1/log/log-file-workflow.csv @@ -0,0 +1,1368 @@ +loggingDate;loggingPhase;workflowName;workflowFilename;workflowStart;workflowEnd;workflowLogChannelId;workflowParentLogChannelId;workflowLogging;workflowErrorCount;workflowStatusDescription +2024/10/15 17:07:54.006;end;job_general;C:\Users\acer\Desktop\apache-hop mapping/job_general.hwf;2024/10/15 17:07:39.485;2024/10/15 17:07:54.003;f78de867-bf09-4ceb-b361-16a05a52f249;;"2024/10/15 17:07:39 - job_general - Start of workflow execution +2024/10/15 17:07:39 - job_general - Starting action [job_pack.pub_recruitment] +2024/10/15 17:07:39 - job_pack.pub_recruitment - Start of workflow execution +2024/10/15 17:07:39 - job_pack.pub_recruitment - Starting action [SQL] +2024/10/15 17:07:39 - job_pack.pub_recruitment - Starting action [pack.pub_recruitment] +2024/10/15 17:07:39 - pack.pub_recruitment - Using run configuration [local] +2024/10/15 17:07:39 - pack.pub_recruitment - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - pack.pub_recruitment - Execution started for pipeline [pack.pub_recruitment] +2024/10/15 17:07:39 - Table output.0 - Connected to database [ervu-dashboard] (commit=1000) +2024/10/15 17:07:39 - Table input.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - pack.pub_recruitment - Pipeline duration : 0.051 seconds [ 0.051"" ] +2024/10/15 17:07:39 - pack.pub_recruitment - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - job_pack.pub_recruitment - Starting action [Success] +2024/10/15 17:07:39 - job_pack.pub_recruitment - Finished action [Success] (result=[true]) +2024/10/15 17:07:39 - job_pack.pub_recruitment - Finished action [pack.pub_recruitment] (result=[true]) +2024/10/15 17:07:39 - job_pack.pub_recruitment - Finished action [SQL] (result=[true]) +2024/10/15 17:07:39 - job_pack.pub_recruitment - Workflow execution finished +2024/10/15 17:07:39 - job_pack.pub_recruitment - Workflow duration : 0.093 seconds [ 0.093"" ] +2024/10/15 17:07:39 - job_general - Starting action [job_recruitments_all] +2024/10/15 17:07:39 - job_recruitments_all - Start of workflow execution +2024/10/15 17:07:39 - job_recruitments_all - Starting action [job_recruitments_region] +2024/10/15 17:07:39 - \region\job_recruitments_region - Start of workflow execution +2024/10/15 17:07:39 - \region\job_recruitments_region - Starting action [select_recruitments_region(reg)] +2024/10/15 17:07:39 - select_recruitments_region(reg) - Using run configuration [local] +2024/10/15 17:07:39 - select_recruitments_region(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - select_recruitments_region(reg) - Execution started for pipeline [select_recruitments_region(reg)] +2024/10/15 17:07:39 - Table input/регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - Copy rows to result.0 - Finished processing (I=0, O=0, R=4, W=4, U=0, E=0) +2024/10/15 17:07:39 - Table input/регион.0 - Finished processing (I=4, O=0, R=0, W=4, U=0, E=0) +2024/10/15 17:07:39 - select_recruitments_region(reg) - Pipeline duration : 0.032 seconds [ 0.032"" ] +2024/10/15 17:07:39 - select_recruitments_region(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - \region\job_recruitments_region - Starting action [SQL.md.appeals] +2024/10/15 17:07:39 - \region\job_recruitments_region - Starting action [main_dashboard.appeals(reg)] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution started for pipeline [main_dashboard.appeals(reg)] +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:39 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Pipeline duration : 0.058 seconds [ 0.058"" ] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution started for pipeline [main_dashboard.appeals(reg)] +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:39 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Pipeline duration : 0.061 seconds [ 0.061"" ] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution started for pipeline [main_dashboard.appeals(reg)] +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:39 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Pipeline duration : 0.075 seconds [ 0.075"" ] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution started for pipeline [main_dashboard.appeals(reg)] +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:39 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:39 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Pipeline duration : 0.073 seconds [ 0.073"" ] +2024/10/15 17:07:39 - main_dashboard.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:39 - \region\job_recruitments_region - Starting action [Success] +2024/10/15 17:07:39 - \region\job_recruitments_region - Finished action [Success] (result=[true]) +2024/10/15 17:07:39 - \region\job_recruitments_region - Finished action [main_dashboard.appeals(reg)] (result=[true]) +2024/10/15 17:07:39 - \region\job_recruitments_region - Finished action [SQL.md.appeals] (result=[true]) +2024/10/15 17:07:39 - \region\job_recruitments_region - Starting action [SQL.md.rec_cam] +2024/10/15 17:07:40 - \region\job_recruitments_region - Starting action [main_dashboard.recruitment_campaign(reg)] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution started for pipeline [main_dashboard.recruitment_campaign(reg)] +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Pipeline duration : 0.159 seconds [ 0.159"" ] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution started for pipeline [main_dashboard.recruitment_campaign(reg)] +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Pipeline duration : 0.124 seconds [ 0.124"" ] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution started for pipeline [main_dashboard.recruitment_campaign(reg)] +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Pipeline duration : 0.123 seconds [ 0.123"" ] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution started for pipeline [main_dashboard.recruitment_campaign(reg)] +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (subpoena) регион/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 4 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Pipeline duration : 0.104 seconds [ 0.104"" ] +2024/10/15 17:07:40 - main_dashboard.recruitment_campaign(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - \region\job_recruitments_region - Starting action [Success 2] +2024/10/15 17:07:40 - \region\job_recruitments_region - Finished action [Success 2] (result=[true]) +2024/10/15 17:07:40 - \region\job_recruitments_region - Finished action [main_dashboard.recruitment_campaign(reg)] (result=[true]) +2024/10/15 17:07:40 - \region\job_recruitments_region - Finished action [SQL.md.rec_cam] (result=[true]) +2024/10/15 17:07:40 - \region\job_recruitments_region - Starting action [SQL.md.tot_reg] +2024/10/15 17:07:40 - \region\job_recruitments_region - Starting action [main_dashboard.total_registered(reg)] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution started for pipeline [main_dashboard.total_registered(reg)] +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.total_registered) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Pipeline duration : 0.092 seconds [ 0.092"" ] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution started for pipeline [main_dashboard.total_registered(reg)] +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.total_registered) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Pipeline duration : 0.096 seconds [ 0.096"" ] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution started for pipeline [main_dashboard.total_registered(reg)] +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.total_registered) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Pipeline duration : 0.071 seconds [ 0.071"" ] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Using run configuration [local] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution started for pipeline [main_dashboard.total_registered(reg)] +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:40 - Table input (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:40 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - Insert / update (main_dashboard.total_registered) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Pipeline duration : 0.073 seconds [ 0.073"" ] +2024/10/15 17:07:40 - main_dashboard.total_registered(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:40 - \region\job_recruitments_region - Starting action [Success 3] +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [Success 3] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [main_dashboard.total_registered(reg)] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [SQL.md.tot_reg] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Starting action [SQL.md.wait_reg] +2024/10/15 17:07:41 - \region\job_recruitments_region - Starting action [main_dashboard.waiting_registration(reg)] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Using run configuration [local] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution started for pipeline [main_dashboard.waiting_registration(reg)] +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:41 - Get variables 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Select values 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Insert / update (main_dashboard.waiting_registration) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Pipeline duration : 0.068 seconds [ 0.068"" ] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Using run configuration [local] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution started for pipeline [main_dashboard.waiting_registration(reg)] +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:41 - Get variables 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Select values 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Insert / update (main_dashboard.waiting_registration) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Pipeline duration : 0.057 seconds [ 0.057"" ] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Using run configuration [local] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution started for pipeline [main_dashboard.waiting_registration(reg)] +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:41 - Get variables 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Select values 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Insert / update (main_dashboard.waiting_registration) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Pipeline duration : 0.058 seconds [ 0.058"" ] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Using run configuration [local] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution started for pipeline [main_dashboard.waiting_registration(reg)] +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input 2 (person_registry) регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:41 - Get variables 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Select values 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - Insert / update (main_dashboard.waiting_registration) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Pipeline duration : 0.061 seconds [ 0.061"" ] +2024/10/15 17:07:41 - main_dashboard.waiting_registration(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - \region\job_recruitments_region - Starting action [Success 4] +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [Success 4] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [main_dashboard.waiting_registration(reg)] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Finished action [SQL.md.wait_reg] (result=[true]) +2024/10/15 17:07:41 - \region\job_recruitments_region - Starting action [SQL.rcam.subpoenas] +2024/10/15 17:07:41 - \region\job_recruitments_region - Starting action [recruitment_campaign.subpoenas(reg)] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution started for pipeline [recruitment_campaign.subpoenas(reg)] +2024/10/15 17:07:41 - Table input (subpoena) осень/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input (subpoena) весна/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Pipeline duration : 0.152 seconds [ 0.152"" ] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution started for pipeline [recruitment_campaign.subpoenas(reg)] +2024/10/15 17:07:41 - Table input (subpoena) весна/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input (subpoena) осень/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Pipeline duration : 0.166 seconds [ 0.166"" ] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution started for pipeline [recruitment_campaign.subpoenas(reg)] +2024/10/15 17:07:41 - Table input (subpoena) весна/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input (subpoena) осень/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Pipeline duration : 0.146 seconds [ 0.146"" ] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:41 - recruitment_campaign.subpoenas(reg) - Execution started for pipeline [recruitment_campaign.subpoenas(reg)] +2024/10/15 17:07:41 - Table input (subpoena) осень/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:41 - Table input (subpoena) весна/регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - recruitment_campaign.subpoenas(reg) - Pipeline duration : 0.218 seconds [ 0.218"" ] +2024/10/15 17:07:42 - recruitment_campaign.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [Success 6] +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [Success 6] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [recruitment_campaign.subpoenas(reg)] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [SQL.rcam.subpoenas] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [SQL.totreg.mrc] +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [total_registered.reg_mil_cat(reg)] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution started for pipeline [total_registered.reg_mil_cat(reg)] +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Pipeline duration : 0.131 seconds [ 0.131"" ] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution started for pipeline [total_registered.reg_mil_cat(reg)] +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Pipeline duration : 0.137 seconds [ 0.137"" ] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution started for pipeline [total_registered.reg_mil_cat(reg)] +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Pipeline duration : 0.12 seconds [ 0.120"" ] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution started for pipeline [total_registered.reg_mil_cat(reg)] +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (person_registry) военком/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Table input (person_registry) военком 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Pipeline duration : 0.132 seconds [ 0.132"" ] +2024/10/15 17:07:42 - total_registered.reg_mil_cat(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [Success 7] +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [Success 7] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [total_registered.reg_mil_cat(reg)] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [SQL.totreg.mrc] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [SQL.totreg.remreg] +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [total_registered.removed_registry(reg)] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution started for pipeline [total_registered.removed_registry(reg)] +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.removed_registry) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Pipeline duration : 0.088 seconds [ 0.088"" ] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution started for pipeline [total_registered.removed_registry(reg)] +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.removed_registry) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Pipeline duration : 0.068 seconds [ 0.068"" ] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution started for pipeline [total_registered.removed_registry(reg)] +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.removed_registry) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Pipeline duration : 0.069 seconds [ 0.069"" ] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Using run configuration [local] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution started for pipeline [total_registered.removed_registry(reg)] +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:42 - Table input (decision-document-service) регион 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:42 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - Insert / update (total_registered.removed_registry) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Pipeline duration : 0.061 seconds [ 0.061"" ] +2024/10/15 17:07:42 - total_registered.removed_registry(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [Success 8] +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [Success 8] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [total_registered.removed_registry(reg)] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Finished action [SQL.totreg.remreg] (result=[true]) +2024/10/15 17:07:42 - \region\job_recruitments_region - Starting action [SQL.totreg.sub] +2024/10/15 17:07:43 - \region\job_recruitments_region - Starting action [total_registered.subpoenas(reg)] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution started for pipeline [total_registered.subpoenas(reg)] +2024/10/15 17:07:43 - Table input (subpoena) регион/не рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Table input (subpoena) регион/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Pipeline duration : 0.162 seconds [ 0.162"" ] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution started for pipeline [total_registered.subpoenas(reg)] +2024/10/15 17:07:43 - Table input (subpoena) регион/не рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Table input (subpoena) регион/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Pipeline duration : 0.154 seconds [ 0.154"" ] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution started for pipeline [total_registered.subpoenas(reg)] +2024/10/15 17:07:43 - Table input (subpoena) регион/не рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Table input (subpoena) регион/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Pipeline duration : 0.136 seconds [ 0.136"" ] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution started for pipeline [total_registered.subpoenas(reg)] +2024/10/15 17:07:43 - Table input (subpoena) регион/не рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Table input (subpoena) регион/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Pipeline duration : 0.152 seconds [ 0.152"" ] +2024/10/15 17:07:43 - total_registered.subpoenas(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:43 - \region\job_recruitments_region - Starting action [Success 9] +2024/10/15 17:07:43 - \region\job_recruitments_region - Finished action [Success 9] (result=[true]) +2024/10/15 17:07:43 - \region\job_recruitments_region - Finished action [total_registered.subpoenas(reg)] (result=[true]) +2024/10/15 17:07:43 - \region\job_recruitments_region - Finished action [SQL.totreg.sub] (result=[true]) +2024/10/15 17:07:43 - \region\job_recruitments_region - Starting action [SQL.totreg.drlic] +2024/10/15 17:07:43 - \region\job_recruitments_region - Starting action [total_registered.driver_license(reg)] +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Execution started for pipeline [total_registered.driver_license(reg)] +2024/10/15 17:07:43 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:43 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Table input (driver_license) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Table input (driver_license) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:43 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:43 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:43 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Pipeline duration : 0.249 seconds [ 0.249"" ] +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Using run configuration [local] +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:43 - total_registered.driver_license(reg) - Execution started for pipeline [total_registered.driver_license(reg)] +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Pipeline duration : 0.262 seconds [ 0.262"" ] +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Using run configuration [local] +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Execution started for pipeline [total_registered.driver_license(reg)] +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Pipeline duration : 0.27 seconds [ 0.270"" ] +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Using run configuration [local] +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Execution started for pipeline [total_registered.driver_license(reg)] +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (driver_license) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:44 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Pipeline duration : 0.314 seconds [ 0.314"" ] +2024/10/15 17:07:44 - total_registered.driver_license(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:44 - \region\job_recruitments_region - Starting action [Success 10] +2024/10/15 17:07:44 - \region\job_recruitments_region - Finished action [Success 10] (result=[true]) +2024/10/15 17:07:44 - \region\job_recruitments_region - Finished action [total_registered.driver_license(reg)] (result=[true]) +2024/10/15 17:07:44 - \region\job_recruitments_region - Finished action [SQL.totreg.drlic] (result=[true]) +2024/10/15 17:07:44 - \region\job_recruitments_region - Starting action [SQL.totreg.chmi] +2024/10/15 17:07:44 - \region\job_recruitments_region - Starting action [total_registered.child_minor(reg)] +2024/10/15 17:07:44 - total_registered.child_minor(reg) - Using run configuration [local] +2024/10/15 17:07:44 - total_registered.child_minor(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:44 - total_registered.child_minor(reg) - Execution started for pipeline [total_registered.child_minor(reg)] +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Pipeline duration : 0.416 seconds [ 0.416"" ] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Using run configuration [local] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution started for pipeline [total_registered.child_minor(reg)] +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Select values 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Pipeline duration : 0.342 seconds [ 0.342"" ] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Using run configuration [local] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution started for pipeline [total_registered.child_minor(reg)] +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:45 - Table input (person_registry)регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:45 - Get variables 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Select values 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Pipeline duration : 0.337 seconds [ 0.337"" ] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Using run configuration [local] +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:45 - total_registered.child_minor(reg) - Execution started for pipeline [total_registered.child_minor(reg)] +2024/10/15 17:07:46 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Select values 4 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 4 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.child_minor) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry)регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry)регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 4 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - total_registered.child_minor(reg) - Pipeline duration : 0.383 seconds [ 0.383"" ] +2024/10/15 17:07:46 - total_registered.child_minor(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:46 - \region\job_recruitments_region - Starting action [Success 11] +2024/10/15 17:07:46 - \region\job_recruitments_region - Finished action [Success 11] (result=[true]) +2024/10/15 17:07:46 - \region\job_recruitments_region - Finished action [total_registered.child_minor(reg)] (result=[true]) +2024/10/15 17:07:46 - \region\job_recruitments_region - Finished action [SQL.totreg.chmi] (result=[true]) +2024/10/15 17:07:46 - \region\job_recruitments_region - Starting action [SQL.totreg.age] +2024/10/15 17:07:46 - \region\job_recruitments_region - Starting action [total_registered.age(reg)] +2024/10/15 17:07:46 - total_registered.age(reg) - Using run configuration [local] +2024/10/15 17:07:46 - total_registered.age(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:46 - total_registered.age(reg) - Execution started for pipeline [total_registered.age(reg)] +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/все 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/все 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - total_registered.age(reg) - Pipeline duration : 0.288 seconds [ 0.288"" ] +2024/10/15 17:07:46 - total_registered.age(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:46 - total_registered.age(reg) - Using run configuration [local] +2024/10/15 17:07:46 - total_registered.age(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:46 - total_registered.age(reg) - Execution started for pipeline [total_registered.age(reg)] +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/женщины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/все 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/все 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Table input (person_registry) регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:46 - Table input (person_registry) регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Get variables 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:46 - total_registered.age(reg) - Pipeline duration : 0.225 seconds [ 0.225"" ] +2024/10/15 17:07:46 - total_registered.age(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:46 - total_registered.age(reg) - Using run configuration [local] +2024/10/15 17:07:46 - total_registered.age(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:46 - total_registered.age(reg) - Execution started for pipeline [total_registered.age(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/все 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/все 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Select values 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Select values 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - total_registered.age(reg) - Pipeline duration : 0.23 seconds [ 0.230"" ] +2024/10/15 17:07:47 - total_registered.age(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.age(reg) - Using run configuration [local] +2024/10/15 17:07:47 - total_registered.age(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.age(reg) - Execution started for pipeline [total_registered.age(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/все 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регион/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/мужчины 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регион/все 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - total_registered.age(reg) - Pipeline duration : 0.271 seconds [ 0.271"" ] +2024/10/15 17:07:47 - total_registered.age(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:47 - \region\job_recruitments_region - Starting action [Success 12] +2024/10/15 17:07:47 - \region\job_recruitments_region - Finished action [Success 12] (result=[true]) +2024/10/15 17:07:47 - \region\job_recruitments_region - Finished action [total_registered.age(reg)] (result=[true]) +2024/10/15 17:07:47 - \region\job_recruitments_region - Finished action [SQL.totreg.age] (result=[true]) +2024/10/15 17:07:47 - \region\job_recruitments_region - Starting action [SQL.totreg.marstat] +2024/10/15 17:07:47 - \region\job_recruitments_region - Starting action [total_registered.marital_status(reg)] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Using run configuration [local] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution started for pipeline [total_registered.marital_status(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Pipeline duration : 0.149 seconds [ 0.149"" ] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Using run configuration [local] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution started for pipeline [total_registered.marital_status(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Pipeline duration : 0.106 seconds [ 0.106"" ] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Using run configuration [local] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution started for pipeline [total_registered.marital_status(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Pipeline duration : 0.118 seconds [ 0.118"" ] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Using run configuration [local] +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:47 - total_registered.marital_status(reg) - Execution started for pipeline [total_registered.marital_status(reg)] +2024/10/15 17:07:47 - Table input (person_registry) регионы/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) регионы/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) регионы/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) регионы/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) регионы/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) регионы/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.marital_status(reg) - Pipeline duration : 0.147 seconds [ 0.147"" ] +2024/10/15 17:07:48 - total_registered.marital_status(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [Success 13] +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [Success 13] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [total_registered.marital_status(reg)] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [SQL.totreg.marstat] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [SQL.totreg.edulev] +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [total_registered.education_level(reg)] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution started for pipeline [total_registered.education_level(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.education_level(reg) - Pipeline duration : 0.133 seconds [ 0.133"" ] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution started for pipeline [total_registered.education_level(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.education_level(reg) - Pipeline duration : 0.126 seconds [ 0.126"" ] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution started for pipeline [total_registered.education_level(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.education_level(reg) - Pipeline duration : 0.179 seconds [ 0.179"" ] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution started for pipeline [total_registered.education_level(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.education_level(reg) - Pipeline duration : 0.123 seconds [ 0.123"" ] +2024/10/15 17:07:48 - total_registered.education_level(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [Success 14] +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [Success 14] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [total_registered.education_level(reg)] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Finished action [SQL.totreg.edulev] (result=[true]) +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [SQL.totreg.busyn] +2024/10/15 17:07:48 - \region\job_recruitments_region - Starting action [total_registered.busyness(reg)] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.busyness(reg) - Execution started for pipeline [total_registered.busyness(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.busyness(reg) - Pipeline duration : 0.135 seconds [ 0.135"" ] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.busyness(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.busyness(reg) - Execution started for pipeline [total_registered.busyness(reg)] +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:48 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:48 - total_registered.busyness(reg) - Pipeline duration : 0.137 seconds [ 0.137"" ] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.busyness(reg) - Using run configuration [local] +2024/10/15 17:07:48 - total_registered.busyness(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:48 - total_registered.busyness(reg) - Execution started for pipeline [total_registered.busyness(reg)] +2024/10/15 17:07:49 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - total_registered.busyness(reg) - Pipeline duration : 0.122 seconds [ 0.122"" ] +2024/10/15 17:07:49 - total_registered.busyness(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - total_registered.busyness(reg) - Using run configuration [local] +2024/10/15 17:07:49 - total_registered.busyness(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - total_registered.busyness(reg) - Execution started for pipeline [total_registered.busyness(reg)] +2024/10/15 17:07:49 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - total_registered.busyness(reg) - Pipeline duration : 0.151 seconds [ 0.151"" ] +2024/10/15 17:07:49 - total_registered.busyness(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - \region\job_recruitments_region - Starting action [Success 15] +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [Success 15] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [total_registered.busyness(reg)] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [SQL.totreg.busyn] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Starting action [SQL.reccam.appeals(reg)] +2024/10/15 17:07:49 - \region\job_recruitments_region - Starting action [recruitment_campaign.appeals(reg)] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution started for pipeline [recruitment_campaign.appeals(reg)] +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Pipeline duration : 0.09 seconds [ 0.090"" ] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution started for pipeline [recruitment_campaign.appeals(reg)] +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Pipeline duration : 0.095 seconds [ 0.095"" ] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution started for pipeline [recruitment_campaign.appeals(reg)] +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Pipeline duration : 0.097 seconds [ 0.097"" ] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Using run configuration [local] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution started for pipeline [recruitment_campaign.appeals(reg)] +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (appeal_document) регионы 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (appeal_document) регионы.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Pipeline duration : 0.085 seconds [ 0.085"" ] +2024/10/15 17:07:49 - recruitment_campaign.appeals(reg) - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:49 - \region\job_recruitments_region - Starting action [Success 16] +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [Success 16] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [recruitment_campaign.appeals(reg)] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [SQL.reccam.appeals(reg)] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Finished action [select_recruitments_region(reg)] (result=[true]) +2024/10/15 17:07:49 - \region\job_recruitments_region - Workflow execution finished +2024/10/15 17:07:49 - \region\job_recruitments_region - Workflow duration : 10.067 seconds [ 10.067"" ] +2024/10/15 17:07:49 - job_recruitments_all - Starting action [Success] +2024/10/15 17:07:49 - job_recruitments_all - Finished action [Success] (result=[true]) +2024/10/15 17:07:49 - job_recruitments_all - Finished action [job_recruitments_region] (result=[true]) +2024/10/15 17:07:49 - job_recruitments_all - Starting action [job_recruitments_country] +2024/10/15 17:07:49 - \country\job_recruitments_country - Start of workflow execution +2024/10/15 17:07:49 - \country\job_recruitments_country - Starting action [SQL.md.rec_cam] +2024/10/15 17:07:49 - \country\job_recruitments_country - Starting action [main_dashboard.recruitment_campaign] +2024/10/15 17:07:49 - main_dashboard.recruitment_campaign - Using run configuration [local] +2024/10/15 17:07:49 - main_dashboard.recruitment_campaign - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:49 - main_dashboard.recruitment_campaign - Execution started for pipeline [main_dashboard.recruitment_campaign] +2024/10/15 17:07:49 - Table input (person_registry) РФ/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (person_registry) РФ/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (person_registry) РФ/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Sort rows 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Sort rows 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (subpoena) РФ/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (subpoena) РФ/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Table input (subpoena) РФ/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:49 - Table input (subpoena) РФ/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:49 - Sort rows 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:49 - Sort rows 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) +2024/10/15 17:07:50 - Merge join 2.0 - Finished processing (I=0, O=0, R=2, W=1, U=0, E=0) +2024/10/15 17:07:50 - Merge join 2 2.0 - Finished processing (I=0, O=0, R=2, W=1, U=0, E=0) +2024/10/15 17:07:50 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:50 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:50 - main_dashboard.recruitment_campaign - Pipeline duration : 0.531 seconds [ 0.531"" ] +2024/10/15 17:07:50 - main_dashboard.recruitment_campaign - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [Success 2] +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [Success 2] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [main_dashboard.recruitment_campaign] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [SQL.md.rec_cam] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [SQL.md.tot_reg] +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [main_dashboard.total_registered] +2024/10/15 17:07:50 - main_dashboard.total_registered - Using run configuration [local] +2024/10/15 17:07:50 - main_dashboard.total_registered - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:50 - main_dashboard.total_registered - Execution started for pipeline [main_dashboard.total_registered] +2024/10/15 17:07:50 - Table input (person_registry) РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:50 - Table input (person_registry) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:50 - Insert / update (main_dashboard.total_registered).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:50 - main_dashboard.total_registered - Pipeline duration : 0.382 seconds [ 0.382"" ] +2024/10/15 17:07:50 - main_dashboard.total_registered - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [Success 3] +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [Success 3] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [main_dashboard.total_registered] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Finished action [SQL.md.tot_reg] (result=[true]) +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [SQL.md.wait_reg] +2024/10/15 17:07:50 - \country\job_recruitments_country - Starting action [main_dashboard.waiting_registration] +2024/10/15 17:07:50 - main_dashboard.waiting_registration - Using run configuration [local] +2024/10/15 17:07:50 - main_dashboard.waiting_registration - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:50 - main_dashboard.waiting_registration - Execution started for pipeline [main_dashboard.waiting_registration] +2024/10/15 17:07:51 - Table input 2 (person_registry) РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input 2 (person_registry) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (main_dashboard.waiting_registration).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - main_dashboard.waiting_registration - Pipeline duration : 0.208 seconds [ 0.208"" ] +2024/10/15 17:07:51 - main_dashboard.waiting_registration - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success 4] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success 4] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [main_dashboard.waiting_registration] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.md.wait_reg] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.rcam.subpoenas] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [recruitment_campaign.subpoenas] +2024/10/15 17:07:51 - recruitment_campaign.subpoenas - Using run configuration [local] +2024/10/15 17:07:51 - recruitment_campaign.subpoenas - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - recruitment_campaign.subpoenas - Execution started for pipeline [recruitment_campaign.subpoenas] +2024/10/15 17:07:51 - Table input (subpoena) Весна/РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (subpoena) Весна/РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Table input (subpoena) осень/РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (subpoena) осень/РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (recruitment_campaign.subpoenas) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (recruitment_campaign.subpoenas).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - recruitment_campaign.subpoenas - Pipeline duration : 0.143 seconds [ 0.143"" ] +2024/10/15 17:07:51 - recruitment_campaign.subpoenas - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success 6] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success 6] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [recruitment_campaign.subpoenas] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.rcam.subpoenas] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.totreg.mrc] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [total_registered.reg_mil_cat] +2024/10/15 17:07:51 - total_registered.reg_mil_cat - Using run configuration [local] +2024/10/15 17:07:51 - total_registered.reg_mil_cat - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - total_registered.reg_mil_cat - Execution started for pipeline [total_registered.reg_mil_cat] +2024/10/15 17:07:51 - Table input (person_registry) РФ/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (person_registry) РФ/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (person_registry) РФ/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Table input (person_registry) РФ/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - total_registered.reg_mil_cat - Pipeline duration : 0.096 seconds [ 0.096"" ] +2024/10/15 17:07:51 - total_registered.reg_mil_cat - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success 7] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success 7] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [total_registered.reg_mil_cat] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.totreg.mrc] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.totreg.remreg] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [total_registered.removed_registry] +2024/10/15 17:07:51 - total_registered.removed_registry - Using run configuration [local] +2024/10/15 17:07:51 - total_registered.removed_registry - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - total_registered.removed_registry - Execution started for pipeline [total_registered.removed_registry] +2024/10/15 17:07:51 - Table input (decision-document-service) РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (decision-document-service) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.removed_registry).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - total_registered.removed_registry - Pipeline duration : 0.066 seconds [ 0.066"" ] +2024/10/15 17:07:51 - total_registered.removed_registry - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success 8] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success 8] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [total_registered.removed_registry] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.totreg.remreg] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.totreg.sub] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [total_registered.subpoenas] +2024/10/15 17:07:51 - total_registered.subpoenas - Using run configuration [local] +2024/10/15 17:07:51 - total_registered.subpoenas - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - total_registered.subpoenas - Execution started for pipeline [total_registered.subpoenas] +2024/10/15 17:07:51 - Table input (subpoena) РФ/не рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (subpoena) РФ/не рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Table input (subpoena)РФ/рег.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (subpoena)РФ/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.subpoenas) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.subpoenas).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - total_registered.subpoenas - Pipeline duration : 0.13 seconds [ 0.130"" ] +2024/10/15 17:07:51 - total_registered.subpoenas - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success 9] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success 9] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [total_registered.subpoenas] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.totreg.sub] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.md.appeals] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [main_dashboard.appeals] +2024/10/15 17:07:51 - main_dashboard.appeals - Using run configuration [local] +2024/10/15 17:07:51 - main_dashboard.appeals - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - main_dashboard.appeals - Execution started for pipeline [main_dashboard.appeals] +2024/10/15 17:07:51 - Table input (appeal_document) РФ.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (appeal_document) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:51 - main_dashboard.appeals - Pipeline duration : 0.07 seconds [ 0.070"" ] +2024/10/15 17:07:51 - main_dashboard.appeals - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [Success] +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [Success] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [main_dashboard.appeals] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Finished action [SQL.md.appeals] (result=[true]) +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [SQL.totreg.marstat] +2024/10/15 17:07:51 - \country\job_recruitments_country - Starting action [total_registered.marital_status] +2024/10/15 17:07:51 - total_registered.marital_status - Using run configuration [local] +2024/10/15 17:07:51 - total_registered.marital_status - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:51 - total_registered.marital_status - Execution started for pipeline [total_registered.marital_status] +2024/10/15 17:07:51 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:51 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:51 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - total_registered.marital_status - Pipeline duration : 0.136 seconds [ 0.136"" ] +2024/10/15 17:07:52 - total_registered.marital_status - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [Success 13] +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [Success 13] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [total_registered.marital_status] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [SQL.totreg.marstat] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [SQL.totreg.chimin] +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [total_registered.child_minor] +2024/10/15 17:07:52 - total_registered.child_minor - Using run configuration [local] +2024/10/15 17:07:52 - total_registered.child_minor - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:52 - total_registered.child_minor - Execution started for pipeline [total_registered.child_minor] +2024/10/15 17:07:52 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry)РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry)РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.child_minor) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - total_registered.child_minor - Pipeline duration : 0.46 seconds [ 0.460"" ] +2024/10/15 17:07:52 - total_registered.child_minor - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [Success 11] +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [Success 11] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [total_registered.child_minor] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [SQL.totreg.chimin] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [SQL.totreg.age] +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [total_registered.age] +2024/10/15 17:07:52 - total_registered.age - Using run configuration [local] +2024/10/15 17:07:52 - total_registered.age - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:52 - total_registered.age - Execution started for pipeline [total_registered.age] +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/все/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/все/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/все/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/все/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - total_registered.age - Pipeline duration : 0.236 seconds [ 0.236"" ] +2024/10/15 17:07:52 - total_registered.age - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [Success 12] +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [Success 12] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [total_registered.age] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Finished action [SQL.totreg.age] (result=[true]) +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [SQL.totreg.drilic] +2024/10/15 17:07:52 - \country\job_recruitments_country - Starting action [total_registered.driver_license] +2024/10/15 17:07:52 - total_registered.driver_license - Using run configuration [local] +2024/10/15 17:07:52 - total_registered.driver_license - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:52 - total_registered.driver_license - Execution started for pipeline [total_registered.driver_license] +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:52 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:52 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - total_registered.driver_license - Pipeline duration : 0.16 seconds [ 0.160"" ] +2024/10/15 17:07:53 - total_registered.driver_license - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [Success 10] +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [Success 10] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [total_registered.driver_license] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [SQL.totreg.drilic] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [SQL.totreg.edulev] +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [total_registered.education_level] +2024/10/15 17:07:53 - total_registered.education_level - Using run configuration [local] +2024/10/15 17:07:53 - total_registered.education_level - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:53 - total_registered.education_level - Execution started for pipeline [total_registered.education_level] +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - total_registered.education_level - Pipeline duration : 0.397 seconds [ 0.397"" ] +2024/10/15 17:07:53 - total_registered.education_level - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [Success 14] +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [Success 14] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [total_registered.education_level] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [SQL.totreg.edulev] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [SQL.totreg.busyn] +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [total_registered.busyness] +2024/10/15 17:07:53 - total_registered.busyness - Using run configuration [local] +2024/10/15 17:07:53 - total_registered.busyness - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:53 - total_registered.busyness - Execution started for pipeline [total_registered.busyness] +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/женщины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/все/не на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/все/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/все/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/все/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - total_registered.busyness - Pipeline duration : 0.239 seconds [ 0.239"" ] +2024/10/15 17:07:53 - total_registered.busyness - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [Success 15] +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [Success 15] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [total_registered.busyness] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [SQL.totreg.busyn] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [SQL.reccam.app] +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [recruitment_campaign.appeals] +2024/10/15 17:07:53 - recruitment_campaign.appeals - Using run configuration [local] +2024/10/15 17:07:53 - recruitment_campaign.appeals - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' +2024/10/15 17:07:53 - recruitment_campaign.appeals - Execution started for pipeline [recruitment_campaign.appeals] +2024/10/15 17:07:53 - Table input (appeal_document) РФ/осень.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (appeal_document) РФ/весна.0 - Finished reading query, closing connection. +2024/10/15 17:07:53 - Table input (appeal_document) РФ/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Table input (appeal_document) РФ/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0) +2024/10/15 17:07:53 - recruitment_campaign.appeals - Pipeline duration : 0.062 seconds [ 0.062"" ] +2024/10/15 17:07:53 - recruitment_campaign.appeals - Execution finished on a local pipeline engine with run configuration 'local' +2024/10/15 17:07:53 - \country\job_recruitments_country - Starting action [Success 16] +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [Success 16] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [recruitment_campaign.appeals] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Finished action [SQL.reccam.app] (result=[true]) +2024/10/15 17:07:53 - \country\job_recruitments_country - Workflow execution finished +2024/10/15 17:07:53 - \country\job_recruitments_country - Workflow duration : 4.14 seconds [ 4.139"" ] +2024/10/15 17:07:53 - job_recruitments_all - Starting action [Success] +2024/10/15 17:07:53 - job_recruitments_all - Finished action [Success] (result=[true]) +2024/10/15 17:07:53 - job_recruitments_all - Finished action [job_recruitments_country] (result=[true]) +2024/10/15 17:07:53 - job_recruitments_all - Workflow execution finished +2024/10/15 17:07:53 - job_recruitments_all - Workflow duration : 14.309 seconds [ 14.308"" ] +2024/10/15 17:07:54 - job_general - Starting action [Success] +2024/10/15 17:07:54 - job_general - Finished action [Success] (result=[true]) +2024/10/15 17:07:54 - job_general - Finished action [job_recruitments_all] (result=[true]) +2024/10/15 17:07:54 - job_general - Finished action [job_pack.pub_recruitment] (result=[true]) +2024/10/15 17:07:54 - job_general - Workflow execution finished +2024/10/15 17:07:54 - job_general - Workflow duration : 14.518 seconds [ 14.518"" ]";0;Finished diff --git a/map_v1/log/workflows-logging.hpl b/map_v1/log/workflows-logging.hpl new file mode 100644 index 0000000..b493733 --- /dev/null +++ b/map_v1/log/workflows-logging.hpl @@ -0,0 +1,830 @@ + + + + workflows-logging + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/10/14 18:02:30.789 + - + 2024/10/14 18:02:30.789 + + + + + + Workflow Logging + action logs + Y + + + Workflow Logging + workflow logs + Y + + + workflow logs + unique workflow data + Y + + + unique workflow data + Table output workflow + Y + + + action logs + Table output action + Y + + + + Workflow Logging + WorkflowLogging + + N + + 1 + + none + + + Y + + + 672 + 304 + + + + action logs + SelectValues + + Y + + 1 + + none + + + + + loggingDate + + + workflowName + + + workflowFilename + + + workflowLogChannelId + + + workflowParentLogChannelId + + + actionName + + + actionNr + + + actionResult + + + actionLogChannelId + + + actionLoggingText + + + actionErrors + + + actionLogDate + + + actionDuration + + + actionExitStatus + + + actionNrFilesRetrieved + + + actionFilename + + + actionComment + + + actionReason + + N + + + + 832 + 432 + + + + unique workflow data + SortRows + + Y + + 1 + + none + + + N + ${java.io.tmpdir} + + + Y + N + N + 0 + loggingDate + N + + + Y + N + N + 0 + loggingPhase + N + + + Y + N + N + 0 + workflowName + N + + + Y + N + N + 0 + workflowFilename + N + + + Y + N + N + 0 + workflowStart + N + + + Y + N + N + 0 + workflowEnd + N + + + Y + N + N + 0 + workflowLogChannelId + N + + + Y + N + N + 0 + workflowParentLogChannelId + N + + + Y + N + N + 0 + workflowLogging + N + + + Y + N + N + 0 + workflowErrorCount + N + + + Y + N + N + 0 + workflowStatusDescription + N + + + 1000000 + Y + + + 1008 + 304 + + + + workflow logs + SelectValues + + Y + + 1 + + none + + + + + loggingDate + + + loggingPhase + + + workflowName + + + workflowFilename + + + workflowStart + + + workflowEnd + + + workflowLogChannelId + + + workflowParentLogChannelId + + + workflowLogging + + + workflowErrorCount + + + workflowStatusDescription + + N + + + + 832 + 304 + + + + workflow-log-action.csv out + TextFileOutput + + Y + + 1 + + none + + + + ; + " + N + N +
Y
+
N
+ DOS + None + + + N + + Y + + ${PROJECT_HOME}/log/log-file-action + N + Y + csv + N + N + N + N + N + N + + Y + N + N + + + + + loggingDate + Date + + + + + + both + -1 + -1 + + + workflowName + String + + + + + + both + -1 + -1 + + + workflowFilename + String + + + + + + both + -1 + -1 + + + workflowLogChannelId + String + + + + + + both + -1 + -1 + + + workflowParentLogChannelId + String + + + + + + both + -1 + -1 + + + actionName + String + + + + + + both + -1 + -1 + + + actionNr + Integer + 0 + $ + . + , + + both + -1 + -1 + + + actionResult + Boolean + + + + + + both + -1 + -1 + + + actionLogChannelId + String + + + + + + both + -1 + -1 + + + actionLoggingText + String + + + + + + both + -1 + -1 + + + actionErrors + Integer + 0 + $ + . + , + + both + -1 + -1 + + + actionLogDate + Date + + + + + + both + -1 + -1 + + + actionDuration + Integer + 0 + $ + . + , + + both + -1 + -1 + + + actionExitStatus + Integer + 0 + $ + . + , + + both + -1 + -1 + + + actionNrFilesRetrieved + Integer + 0 + $ + . + , + + both + -1 + -1 + + + actionFilename + String + + + + + + both + -1 + -1 + + + actionComment + String + + + + + + both + -1 + -1 + + + actionReason + String + + + + + + both + -1 + -1 + + + + + 1504 + 432 + +
+ + workflow-log.csv out + TextFileOutput + + Y + + 1 + + none + + + + ; + " + N + N +
Y
+
N
+ DOS + None + + + N + + Y + + ${PROJECT_HOME}/log/log-file-workflow + N + Y + csv + N + N + N + N + N + N + + Y + N + N + + + + + loggingDate + Date + + + + + + both + -1 + -1 + + + loggingPhase + String + + + + + + both + -1 + -1 + + + workflowName + String + + + + + + both + -1 + -1 + + + workflowFilename + String + + + + + + both + -1 + -1 + + + workflowStart + Date + + + + + + both + -1 + -1 + + + workflowEnd + Date + + + + + + both + -1 + -1 + + + workflowLogChannelId + String + + + + + + both + -1 + -1 + + + workflowParentLogChannelId + String + + + + + + both + -1 + -1 + + + workflowLogging + String + + + + + + both + -1 + -1 + + + workflowErrorCount + Integer + 0 + $ + . + , + + both + -1 + -1 + + + workflowStatusDescription + String + + + + + + both + -1 + -1 + + + + + 1504 + 256 + +
+ + Table output workflow + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + + Y + + N + public + N + workflow_logs
+ + N + Y + N + Y + + + 1280 + 304 + +
+ + Table output action + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + + Y + + N + public + N + action_logs
+ + N + Y + N + Y + + + 1280 + 432 + +
+ + + +
diff --git a/map_v1/log_jobs/log_job_info_recruits.txt b/map_v1/log_jobs/log_job_info_recruits.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_info_recruits_once.txt b/map_v1/log_jobs/log_job_info_recruits_once.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_ratings.txt b/map_v1/log_jobs/log_job_ratings.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_recruitments_all.txt b/map_v1/log_jobs/log_job_recruitments_all.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_recruitments_country.txt b/map_v1/log_jobs/log_job_recruitments_country.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_recruitments_milcom.txt b/map_v1/log_jobs/log_job_recruitments_milcom.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_recruitments_mildis.txt b/map_v1/log_jobs/log_job_recruitments_mildis.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/log_jobs/log_job_recruitments_region.txt b/map_v1/log_jobs/log_job_recruitments_region.txt new file mode 100644 index 0000000..e69de29 diff --git a/map_v1/metadata/pipeline-run-configuration/local.json b/map_v1/metadata/pipeline-run-configuration/local.json new file mode 100644 index 0000000..d6b7ca4 --- /dev/null +++ b/map_v1/metadata/pipeline-run-configuration/local.json @@ -0,0 +1,20 @@ +{ + "engineRunConfiguration": { + "Local": { + "feedback_size": "50000", + "sample_size": "100", + "sample_type_in_gui": "Last", + "wait_time": "20", + "rowset_size": "10000", + "safe_mode": false, + "show_feedback": false, + "topo_sort": false, + "gather_metrics": false, + "transactional": false + } + }, + "defaultSelection": true, + "configurationVariables": [], + "name": "local", + "description": "Runs your pipelines locally with the standard local Hop pipeline engine" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/118_ervu-person-registry.json b/map_v1/metadata/rdbms/118_ervu-person-registry.json new file mode 100644 index 0000000..f58b973 --- /dev/null +++ b/map_v1/metadata/rdbms/118_ervu-person-registry.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "ervu-person-registry", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "10.10.31.118", + "password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "pluginName": "PostgreSQL", + "port": "5432", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "postgres" + } + }, + "name": "118_ervu-person-registry" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json b/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json new file mode 100644 index 0000000..f2bd116 --- /dev/null +++ b/map_v1/metadata/rdbms/118_ervu-subpoena-registry.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "ervu-subpoena-registry", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "10.10.31.118", + "password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb", + "pluginName": "PostgreSQL", + "port": "5432", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "postgres" + } + }, + "name": "118_ervu-subpoena-registry" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json b/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json new file mode 100644 index 0000000..25ade15 --- /dev/null +++ b/map_v1/metadata/rdbms/119_ervu-dashboard-copy.json @@ -0,0 +1,27 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "ervu-dashboard-copy", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "10.10.31.119", + "password": "Encrypted 2be98caba1cd2df80aa0aa672d193bdde", + "pluginName": "PostgreSQL", + "port": "5432", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "ervu-dashboard" + } + }, + "name": "119_ervu-dashboard-copy" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/ervu-dashboard.json b/map_v1/metadata/rdbms/ervu-dashboard.json new file mode 100644 index 0000000..b270eef --- /dev/null +++ b/map_v1/metadata/rdbms/ervu-dashboard.json @@ -0,0 +1,27 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_DASHBOARD_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_DASHBOARD_HOST}", + "password": "${DB_DASHBOARD_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_DASHBOARD_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_DASHBOARD_USERNAME}" + } + }, + "name": "ervu-dashboard" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/ervu-journal.json b/map_v1/metadata/rdbms/ervu-journal.json new file mode 100644 index 0000000..da61575 --- /dev/null +++ b/map_v1/metadata/rdbms/ervu-journal.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_JOURNAL_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_JOURNAL_HOST}", + "password": "${DB_JOURNAL_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_JOURNAL_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_JOURNAL_USERNAME}" + } + }, + "name": "ervu-journal" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/ervu_person_registry.json b/map_v1/metadata/rdbms/ervu_person_registry.json new file mode 100644 index 0000000..7e965f9 --- /dev/null +++ b/map_v1/metadata/rdbms/ervu_person_registry.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_PERSON_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_PERSON_HOST}", + "password": "${DB_PERSON_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_PERSON_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_PERSON_USERNAME}" + } + }, + "name": "ervu_person_registry" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/incident.json b/map_v1/metadata/rdbms/incident.json new file mode 100644 index 0000000..3cb4185 --- /dev/null +++ b/map_v1/metadata/rdbms/incident.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_INCIDENTS_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_INCIDENTS_HOST}", + "password": "${DB_INCIDENTS_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_INCIDENTS_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_INCIDENTS_USERNAME}" + } + }, + "name": "incident" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/metrics.json b/map_v1/metadata/rdbms/metrics.json new file mode 100644 index 0000000..fe7601d --- /dev/null +++ b/map_v1/metadata/rdbms/metrics.json @@ -0,0 +1,27 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_METRICS_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_METRICS_HOST}", + "password": "${DB_METRICS_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_METRICS_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_METRICS_USERNAME}" + } + }, + "name": "metrics" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/postgres.appeal-document-service.json b/map_v1/metadata/rdbms/postgres.appeal-document-service.json new file mode 100644 index 0000000..dc7d764 --- /dev/null +++ b/map_v1/metadata/rdbms/postgres.appeal-document-service.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_APPEAL_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_APPEAL_HOST}", + "password": "${DB_APPEAL_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_APPEAL_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_APPEAL_USERNAME}" + } + }, + "name": "postgres.appeal-document-service" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/postgres.decision-document-service.json b/map_v1/metadata/rdbms/postgres.decision-document-service.json new file mode 100644 index 0000000..2104dad --- /dev/null +++ b/map_v1/metadata/rdbms/postgres.decision-document-service.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_DECISION_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_DECISION_HOST}", + "password": "${DB_DECISION_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_DECISION_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_DECISION_USERNAME}" + } + }, + "name": "postgres.decision-document-service" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/postgres.person_registry.json b/map_v1/metadata/rdbms/postgres.person_registry.json new file mode 100644 index 0000000..bd67eb2 --- /dev/null +++ b/map_v1/metadata/rdbms/postgres.person_registry.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_PERSON_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_PERSON_HOST}", + "password": "${DB_PERSON_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_PERSON_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_PERSON_USERNAME}" + } + }, + "name": "postgres.person_registry" +} \ No newline at end of file diff --git a/map_v1/metadata/rdbms/postgres.subpoena.json b/map_v1/metadata/rdbms/postgres.subpoena.json new file mode 100644 index 0000000..5bc7195 --- /dev/null +++ b/map_v1/metadata/rdbms/postgres.subpoena.json @@ -0,0 +1,26 @@ +{ + "rdbms": { + "POSTGRESQL": { + "databaseName": "${DB_SUBPOENA_NAME}", + "pluginId": "POSTGRESQL", + "accessType": 0, + "hostname": "${DB_SUBPOENA_HOST}", + "password": "${DB_SUBPOENA_PASSWORD}", + "pluginName": "PostgreSQL", + "port": "${DB_SUBPOENA_PORT}", + "attributes": { + "SUPPORTS_TIMESTAMP_DATA_TYPE": "Y", + "QUOTE_ALL_FIELDS": "N", + "SUPPORTS_BOOLEAN_DATA_TYPE": "Y", + "FORCE_IDENTIFIERS_TO_LOWERCASE": "N", + "PRESERVE_RESERVED_WORD_CASE": "Y", + "SQL_CONNECT": "", + "FORCE_IDENTIFIERS_TO_UPPERCASE": "N", + "PREFERRED_SCHEMA_NAME": "" + }, + "manualUrl": "", + "username": "${DB_SUBPOENA_USERNAME}" + } + }, + "name": "postgres.subpoena" +} \ No newline at end of file diff --git a/map_v1/metadata/workflow-log/workflow-logging.json b/map_v1/metadata/workflow-log/workflow-logging.json new file mode 100644 index 0000000..60cceb4 --- /dev/null +++ b/map_v1/metadata/workflow-log/workflow-logging.json @@ -0,0 +1,16 @@ +{ + "loggingParentsOnly": true, + "name": "workflow-logging", + "workflowToLog": [ + "${PROJECT_HOME}/job_general.hwf", + "${PROJECT_HOME}/region/job_recruitments_region.hwf", + "${PROJECT_HOME}/country/job_recruitments_country.hwf", + "${PROJECT_HOME}/info_recruits/job_info_recruits.hwf" + ], + "intervalInSeconds": "30", + "executingPeriodically": false, + "pipelineFilename": "${PROJECT_HOME}/log/workflows-logging.hpl", + "executingAtEnd": true, + "enabled": true, + "executingAtStart": true +} \ No newline at end of file diff --git a/map_v1/metadata/workflow-run-configuration/local.json b/map_v1/metadata/workflow-run-configuration/local.json new file mode 100644 index 0000000..1d0cf74 --- /dev/null +++ b/map_v1/metadata/workflow-run-configuration/local.json @@ -0,0 +1,11 @@ +{ + "engineRunConfiguration": { + "Local": { + "safe_mode": false, + "transactional": false + } + }, + "defaultSelection": true, + "name": "local", + "description": "Runs your workflows locally with the standard local Hop workflow engine" +} \ No newline at end of file diff --git a/map_v1/mil_com/job_recruitments_milcom.hwf b/map_v1/mil_com/job_recruitments_milcom.hwf new file mode 100644 index 0000000..e70eb4f --- /dev/null +++ b/map_v1/mil_com/job_recruitments_milcom.hwf @@ -0,0 +1,2185 @@ + + + job_recruitments_milcom + Y + + + + 0 + - + 2024/08/15 16:02:12.821 + - + 2024/08/15 16:02:12.821 + + + ARR_MC + + + + + REC_ID + + + + + SCM + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 1008 + 1552 + + + + Success 2 + + SUCCESS + + N + 2592 + 1152 + + + + main_dashboard.total_registered(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl + txt + ${PROJECT_HOME}/log + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1248 + + + + Success main_dashboard.total_registered(m_c)_pll + + SUCCESS + + N + 2592 + 1312 + + + + Success main_dashboard.waiting_registration(m_c)_pll + + SUCCESS + + N + 2592 + 1232 + + + + Success 6 + + SUCCESS + + N + 2592 + 1072 + + + + total_registered.reg_mil_cat(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1312 + + + + Success 7 + + SUCCESS + + N + 0 + 1312 + + + + total_registered.removed_registry(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1376 + + + + Success 8 + + SUCCESS + + N + 0 + 1376 + + + + total_registered.subpoenas(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1440 + + + + Success 9 + + SUCCESS + + N + 0 + 1440 + + + + total_registered.driver_license(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1504 + + + + Success 10 + + SUCCESS + + N + 0 + 1504 + + + + total_registered.child_minor(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl + txt + C:\Users\acer\Desktop\лог + Rowlevel + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1568 + + + + Success 11 + + SUCCESS + + N + 0 + 1568 + + + + total_registered.age(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1632 + + + + Success 12 + + SUCCESS + + N + 0 + 1632 + + + + total_registered.marital_status(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1696 + + + + Success 13 + + SUCCESS + + N + 0 + 1696 + + + + total_registered.education_level(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1760 + + + + Success 14 + + SUCCESS + + N + 0 + 1760 + + + + total_registered.busyness(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1824 + + + + Success 15 + + SUCCESS + + N + 0 + 1824 + + + + array_recruitments.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/array_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + Y + 848 + 1552 + + + + SQL total_registered.reg_mil_cat + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1312 + + + + SQL main_dashboard.total_registered + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1248 + + + + SQL total_registered.removed_registry + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 624 + 1376 + + + + SQL total_registered.subpoenas + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1440 + + + + SQL total_registered.driver_license + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 624 + 1504 + + + + SQL total_registered.child_minor + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1568 + + + + SQL total_registered.age + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1632 + + + + SQL total_registered.marital_status + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1696 + + + + SQL total_registered.education_level + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 624 + 1760 + + + + SQL total_registered.busyness + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1824 + + + + main_dashboard.recruitment_campaign(m_c).hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf + Nothing + + Y + + N + local + N + N + Y + N + 1712 + 1152 + + + + SQL main_dashboard.recruitment_campaign clearing null + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date +AND new_recruits IS NULL +AND subpoenas_sent IS NULL +AND appeared_on_subpoenas IS NULL +AND postponement_have_right IS NULL +AND postponement_granted IS NULL; + N + N + N + 2336 + 1152 + + + + postponement_percents.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl + Basic + + Y + + N + local + N + N + Y + N + 2032 + 1152 + + + + recruitment_campaign.subpoenas(m_c).hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf + Nothing + + Y + + N + local + N + N + Y + N + 1712 + 1072 + + + + main_dashboard.waiting_registration(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1232 + + + + SQL main_dashboard.waiting_registration + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 624 + 1184 + + + + Success main_dashboard.waiting_registration(m_c) + + SUCCESS + + N + 0 + 1184 + + + + main_dashboard.waiting_registration(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 320 + 1184 + + + + Success main_dashboard.total_registered(m_c) + + SUCCESS + + N + 0 + 1248 + + + + array_recruitment_for_parallel.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/array_recruitment_for_parallel.hpl + txt + C:\Users\acer\Desktop\logii + Rowlevel + + Y + + N + local + N + N + Y + Y + 1152 + 1552 + + + + SQL main_dashboard.waiting_registration 2 + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1232 + + + + main_dashboard.total_registered(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1312 + + + + SQL main_dashboard.total_registered 2 + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1312 + + + + SQL total_registered.reg_mil_cat 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1392 + + + + total_registered.reg_mil_cat(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1392 + + + + Success total_registered.reg_mil_cat(m_c)_pll + + SUCCESS + + N + 2592 + 1392 + + + + SQL total_registered.removed_registry 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 1712 + 1472 + + + + total_registered.removed_registry(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1472 + + + + Success total_registered.removed_registry(m_c)_pll + + SUCCESS + + N + 2592 + 1472 + + + + SQL total_registered.subpoenas 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1552 + + + + total_registered.subpoenas(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1552 + + + + Success total_registered.subpoenas(m_c)_pll + + SUCCESS + + N + 2592 + 1552 + + + + total_registered.driver_license(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1632 + + + + SQL total_registered.driver_license 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 1712 + 1632 + + + + Success total_registered.driver_license(m_c)_pll + + SUCCESS + + N + 2592 + 1632 + + + + SQL total_registered.child_minor 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1712 + + + + total_registered.child_minor(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1712 + + + + Success total_registered.child_minor(m_c)_pll + + SUCCESS + + N + 2592 + 1712 + + + + SQL total_registered.age 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1792 + + + + total_registered.age(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1792 + + + + Success total_registered.age(m_c)_pll + + SUCCESS + + N + 2592 + 1792 + + + + SQL total_registered.marital_status 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 1872 + + + + total_registered.marital_status(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1872 + + + + Success total_registered.marital_status(m_c)_pll + + SUCCESS + + N + 2592 + 1872 + + + + SQL total_registered.education_level 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + N + 1712 + 1952 + + + + total_registered.education_level(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 1952 + + + + Success total_registered.education_level(m_c)_pll + + SUCCESS + + N + 2592 + 1952 + + + + SQL total_registered.busyness 2 + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + + N + N + N + 1712 + 2032 + + + + total_registered.busyness(m_c).hwf + + WORKFLOW + + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf + Nothing + + + ARR_PR_1 + PART_RECRUITMENT_1 + + + ARR_PR_2 + PART_RECRUITMENT_2 + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + ARR_PR_4 + PART_RECRUITMENT_4 + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 2032 + 2032 + + + + Success total_registered.busyness(m_c)_pll + + SUCCESS + + N + 2592 + 2032 + + + + + + total_registered.reg_mil_cat(m_c).hpl + Success 7 + Y + Y + N + + + total_registered.removed_registry(m_c).hpl + Success 8 + Y + Y + N + + + total_registered.subpoenas(m_c).hpl + Success 9 + Y + Y + N + + + total_registered.driver_license(m_c).hpl + Success 10 + Y + Y + N + + + total_registered.child_minor(m_c).hpl + Success 11 + Y + Y + N + + + total_registered.age(m_c).hpl + Success 12 + Y + Y + N + + + total_registered.marital_status(m_c).hpl + Success 13 + Y + Y + N + + + total_registered.education_level(m_c).hpl + Success 14 + Y + Y + N + + + total_registered.busyness(m_c).hpl + Success 15 + Y + Y + N + + + Start + array_recruitments.hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.reg_mil_cat + N + Y + N + + + SQL total_registered.reg_mil_cat + total_registered.reg_mil_cat(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL main_dashboard.total_registered + N + Y + N + + + SQL main_dashboard.total_registered + main_dashboard.total_registered(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.removed_registry + N + Y + N + + + SQL total_registered.removed_registry + total_registered.removed_registry(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.subpoenas + N + Y + N + + + SQL total_registered.subpoenas + total_registered.subpoenas(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.driver_license + N + Y + N + + + SQL total_registered.driver_license + total_registered.driver_license(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.child_minor + N + Y + N + + + SQL total_registered.child_minor + total_registered.child_minor(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.age + N + Y + N + + + SQL total_registered.age + total_registered.age(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.marital_status + N + Y + N + + + SQL total_registered.marital_status + total_registered.marital_status(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.education_level + N + Y + N + + + SQL total_registered.education_level + total_registered.education_level(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.busyness + N + Y + N + + + SQL total_registered.busyness + total_registered.busyness(m_c).hpl + Y + N + Y + + + Start + main_dashboard.recruitment_campaign(m_c).hwf + Y + Y + Y + + + SQL main_dashboard.recruitment_campaign clearing null + Success 2 + Y + Y + Y + + + main_dashboard.recruitment_campaign(m_c).hwf + postponement_percents.hpl + Y + N + Y + + + postponement_percents.hpl + SQL main_dashboard.recruitment_campaign clearing null + Y + Y + Y + + + Start + recruitment_campaign.subpoenas(m_c).hwf + N + Y + Y + + + recruitment_campaign.subpoenas(m_c).hwf + Success 6 + Y + N + Y + + + main_dashboard.waiting_registration(m_c).hwf + Success main_dashboard.waiting_registration(m_c)_pll + Y + N + Y + + + array_recruitments.hpl + SQL main_dashboard.waiting_registration + N + Y + N + + + SQL main_dashboard.waiting_registration + main_dashboard.waiting_registration(m_c).hpl + Y + N + Y + + + main_dashboard.waiting_registration(m_c).hpl + Success main_dashboard.waiting_registration(m_c) + Y + Y + N + + + main_dashboard.total_registered(m_c).hpl + Success main_dashboard.total_registered(m_c) + Y + Y + N + + + Start + array_recruitment_for_parallel.hpl + Y + Y + Y + + + array_recruitment_for_parallel.hpl + SQL main_dashboard.waiting_registration 2 + Y + Y + Y + + + SQL main_dashboard.waiting_registration 2 + main_dashboard.waiting_registration(m_c).hwf + Y + Y + Y + + + SQL main_dashboard.total_registered 2 + main_dashboard.total_registered(m_c).hwf + Y + N + Y + + + main_dashboard.total_registered(m_c).hwf + Success main_dashboard.total_registered(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL main_dashboard.total_registered 2 + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.reg_mil_cat 2 + Y + Y + Y + + + SQL total_registered.reg_mil_cat 2 + total_registered.reg_mil_cat(m_c).hwf + Y + N + Y + + + total_registered.reg_mil_cat(m_c).hwf + Success total_registered.reg_mil_cat(m_c)_pll + Y + N + Y + + + SQL total_registered.removed_registry 2 + total_registered.removed_registry(m_c).hwf + Y + N + Y + + + total_registered.removed_registry(m_c).hwf + Success total_registered.removed_registry(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.removed_registry 2 + Y + Y + Y + + + SQL total_registered.subpoenas 2 + total_registered.subpoenas(m_c).hwf + Y + N + Y + + + total_registered.subpoenas(m_c).hwf + Success total_registered.subpoenas(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.subpoenas 2 + Y + Y + Y + + + SQL total_registered.driver_license 2 + total_registered.driver_license(m_c).hwf + Y + N + Y + + + total_registered.driver_license(m_c).hwf + Success total_registered.driver_license(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.driver_license 2 + Y + Y + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.child_minor 2 + Y + Y + Y + + + SQL total_registered.child_minor 2 + total_registered.child_minor(m_c).hwf + Y + N + Y + + + total_registered.child_minor(m_c).hwf + Success total_registered.child_minor(m_c)_pll + Y + N + Y + + + SQL total_registered.age 2 + total_registered.age(m_c).hwf + Y + N + Y + + + total_registered.age(m_c).hwf + Success total_registered.age(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.age 2 + Y + Y + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.marital_status 2 + Y + Y + Y + + + SQL total_registered.marital_status 2 + total_registered.marital_status(m_c).hwf + Y + N + Y + + + total_registered.marital_status(m_c).hwf + Success total_registered.marital_status(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.education_level 2 + Y + Y + Y + + + SQL total_registered.education_level 2 + total_registered.education_level(m_c).hwf + Y + N + Y + + + total_registered.education_level(m_c).hwf + Success total_registered.education_level(m_c)_pll + Y + N + Y + + + array_recruitment_for_parallel.hpl + SQL total_registered.busyness 2 + Y + Y + Y + + + SQL total_registered.busyness 2 + total_registered.busyness(m_c).hwf + Y + N + Y + + + total_registered.busyness(m_c).hwf + Success total_registered.busyness(m_c)_pll + Y + N + Y + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl new file mode 100644 index 0000000..85504aa --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl @@ -0,0 +1,142 @@ + + + + m_d.rec_cam(m_c)_to_decision_service + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input отчрочки из decisions + Update + Y + + + + Table input отчрочки из decisions + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +vse AS( + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + dd.postponement_date, + COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.updated_at, dd.created_at) DESC) AS rn + FROM recruit r + JOIN deferment_decision dd ON dd.recruit_id = r.id + JOIN deferment_decision_type ddt on ddt.id = dd.type_id AND ddt.code in ('1', '2') + WHERE COALESCE(r.current_recruitment, r.target_recruitment)::uuid IN (SELECT recruitment_id FROM ids) +), +last_status AS( + SELECT * + FROM vse + WHERE rn = 1 +) +SELECT + --COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true'), 0) AS postponement_have_right, + COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false'), 0) AS postponement_granted, + --COALESCE((COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') * 100 / NULLIF(COUNT(ls.postponement), 0)), 0) AS postponement_have_right_percent, + --COALESCE((COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') * 100 / NULLIF(COUNT(ls.postponement), 0)), 0) AS postponement_granted_percent, + CASE + WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + THEN 'Весна' + WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + THEN 'Осень' + END AS spring_autumn, + ls.recruitment_id, + current_date AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ((ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') or + (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days')) +GROUP BY spring_autumn, ls.recruitment_id + Y + + + 400 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + postponement_granted + postponement_granted + +
+ N + Y + + + 1024 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl new file mode 100644 index 0000000..8a4475b --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl @@ -0,0 +1,178 @@ + + + + m_d.rec_cam(m_c)_to_decision_service_uniq + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input отчрочки из decisions + Update + Y + + + + Table input отчрочки из decisions + TableInput + + Y + + 1 + + none + + + postgres.decision-document-service + N + 0 + WITH +ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +), +vse AS( + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id, + 'Весна' AS season, + dd.postponement_date, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.updated_at, dd.created_at) DESC) AS rn + FROM recruit r + JOIN deferment_decision dd ON dd.recruit_id = r.id + JOIN deferment_decision_type ddt on ddt.id = dd.type_id AND ddt.code = '1' + WHERE COALESCE(r.current_recruitment, r.target_recruitment)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + + UNION ALL + + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id, + 'Осень' AS season, + dd.postponement_date, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.updated_at, dd.created_at) DESC) AS rn + FROM recruit r + JOIN deferment_decision dd ON dd.recruit_id = r.id + JOIN deferment_decision_type ddt on ddt.id = dd.type_id AND ddt.code = '1' + WHERE COALESCE(r.current_recruitment, r.target_recruitment)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') +), +last_status AS( + SELECT * + FROM vse + WHERE rn = 1 +) +SELECT + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, + 'Весна' AS spring_autumn, + ls.recruitment_id, + CURRENT_DATE AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days' -- 15 июля текущего года + AND ls.season = 'Весна' +GROUP BY ls.recruitment_id + +UNION ALL + +SELECT + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, + 'Осень' AS spring_autumn, + ls.recruitment_id, + CURRENT_DATE AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months' -- 1 января следующего года + AND ls.season = 'Осень' +GROUP BY ls.recruitment_id; + Y + + + 400 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + + = + recruitment_id + recruitment_id + + + + = + spring_autumn + spring_autumn + + + + = + recording_date + recording_date + + + main_dashboard + recruitment_campaign
+ + postponement_granted + postponement_granted + +
+ N + Y + + + 1024 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl new file mode 100644 index 0000000..ff15055 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl @@ -0,0 +1,274 @@ + + + + m_d.rec_cam(m_c)_to_person_registry + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/осень + Update + Y + + + + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + r.current_recruitment_id AS recruitment_id, + -- coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + CASE + WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + THEN 'Весна' + WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')) + THEN 'Осень' + END AS spring_autumn, + r.birth_date, + ddd.hidden--, -- когда фолс отсрочка есть, когда тру или нулл - нет + --ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + -- JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND + ((r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + OR + (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))) + + UNION ALL + + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + --r.current_recruitment_id AS recruitment_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + CASE + WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + THEN 'Весна' + WHEN (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')) + THEN 'Осень' + END AS spring_autumn, + r.birth_date, + ddd.hidden--, -- когда фолс отсрочка есть, когда тру или нулл - нет + --ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND + + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id, rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + -- r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND + ((r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + OR + (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30'))) + +), +vse as ( + SELECT + rd.hidden as postponement, + 'Весна' AS spring_autumn, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + r.recruit_id, + rd.postponement_date, + r.recruitment_id, + r.hidden + FROM recruit_data r + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn, + rd.recruit_id, + rd.hidden, + rd.postponement_date + FROM recruits_deferment rd + WHERE rd.hidden is false + AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + -- AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + ) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1 + WHERE r.spring_autumn = 'Весна' + + UNION ALL + + SELECT + rd.hidden as postponement, + 'Осень' AS spring_autumn, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + r.recruit_id, + rd.postponement_date, + r.recruitment_id, + r.hidden + FROM recruit_data r + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn, + rd.recruit_id, + rd.hidden, + rd.postponement_date + FROM recruits_deferment rd + WHERE rd.hidden is false + -- AND (rs.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + ) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1 + WHERE r.spring_autumn = 'Осень' +) +SELECT + r.recruitment_id, + r.spring_autumn, + current_date as recording_date, + COUNT(r.recruit_id) FILTER (WHERE r.hidden IS NOT true) AS recruit, + COUNT(r.recruit_id) FILTER (WHERE r.postponement IS NOT null) AS postponement_have_right +FROM vse r +GROUP BY recruitment_id, spring_autumn + Y + + + 464 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + new_recruits + recruit + + + postponement_have_right + postponement_have_right + +
+ N + Y + + + 1056 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl new file mode 100644 index 0000000..7452855 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement.hpl @@ -0,0 +1,137 @@ + + + + m_d.rec_cam(m_c)_to_person_registry_postponement + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/осень + Update + Y + + + + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +vse AS( + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + dd.postponement_date, + COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn + FROM recruits r + JOIN recruits_deferment dd ON dd.recruit_id = r.id + WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +), +last_status AS( + SELECT * + FROM vse + WHERE rn = 1 +) +SELECT + COALESCE(COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false'), 0) AS postponement_have_right, + CASE + WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + THEN 'Весна' + WHEN (ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + THEN 'Осень' + END AS spring_autumn, + ls.recruitment_id, + current_date AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months' +GROUP BY spring_autumn, ls.recruitment_id + Y + + + 464 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + postponement_have_right + postponement_have_right + +
+ N + Y + + + 1056 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl new file mode 100644 index 0000000..d12b342 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_postponement_uniq.hpl @@ -0,0 +1,170 @@ + + + + m_d.rec_cam(m_c)_to_person_registry_postponement_uniq + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/осень + Update + Y + + + + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +), +vse AS( + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + dd.postponement_date, + COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn + FROM recruits r + JOIN recruits_deferment dd ON dd.recruit_id = r.id + WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + + UNION ALL + + SELECT + CASE + WHEN dd.hidden is true THEN 'true' + ELSE 'false' + END AS postponement, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + dd.recruit_id, + dd.postponement_date, + COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id, + ROW_NUMBER() OVER (PARTITION BY dd.recruit_id ORDER BY COALESCE(dd.system_update_date, dd.system_create_date) DESC) AS rn + FROM recruits r + JOIN recruits_deferment dd ON dd.recruit_id = r.id + WHERE COALESCE(r.current_recruitment_id, r.target_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') +), +last_status AS( + SELECT * + FROM vse + WHERE rn = 1 +) +SELECT + COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, + 'Весна' AS spring_autumn, + ls.recruitment_id, + CURRENT_DATE AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days' -- 15 июля текущего года + AND ls.season = 'Весна' +GROUP BY ls.recruitment_id + +UNION ALL + +SELECT + COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'true') AS postponement_have_right, + --COUNT(ls.postponement) FILTER (WHERE ls.postponement = 'false') AS postponement_granted, + 'Осень' AS spring_autumn, + ls.recruitment_id, + CURRENT_DATE AS recording_date +FROM last_status ls +WHERE ls.recruitment_id IS NOT NULL + AND ls.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months' -- 1 января следующего года + AND ls.season = 'Осень' +GROUP BY ls.recruitment_id; + Y + + + 464 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + N + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + postponement_have_right + postponement_have_right + +
+ N + N + + + 1024 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl new file mode 100644 index 0000000..dd44b39 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl @@ -0,0 +1,342 @@ + + + + m_d.rec_cam(m_c)_to_person_registry_uniq + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/осень + Update + Y + + + + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + 'Весна' AS spring_autumn, + r.birth_date, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') +*/ + r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + + + UNION ALL + + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + 'Осень' AS spring_autumn, + r.birth_date, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') +*/ + r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') + AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')) + + UNION ALL + + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + --r.current_recruitment_id AS recruitment_id, + 'Весна' AS spring_autumn, + r.birth_date, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND +--/* + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') +--*/ + --AND r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-04-02') and DATE (extract(year from now())-18||'-07-13')) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + --r.current_recruitment_id AS recruitment_id, + 'Осень' AS spring_autumn, + r.birth_date, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.gender = 'MALE' AND +--/* + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') +--*/ + --AND r.current_recruitment_id ::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') + AND (r.birth_date BETWEEN DATE (extract(year from now())-30||'-10-02') and DATE (extract(year from now())-18||'-12-30')) + AND r.current_recruitment_id is null + +), +vse as ( + SELECT + rd.hidden as postponement, + 'Весна' AS spring_autumn, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + r.recruit_id, + rd.postponement_date, + r.recruitment_id, + r.hidden + FROM recruit_data r + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn, + rd.recruit_id, + rd.hidden, + rd.postponement_date + FROM recruits_deferment rd + WHERE rd.hidden is false + AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + -- AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + ) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1 + WHERE r.spring_autumn = 'Весна' + + UNION ALL + + SELECT + rd.hidden as postponement, + 'Осень' AS spring_autumn, + --COALESCE(dd.updated_at, dd.created_at) AS postponement_date, + r.recruit_id, + rd.postponement_date, + r.recruitment_id, + r.hidden + FROM recruit_data r + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY rd.recruit_id ORDER BY COALESCE(rd.system_update_date, rd.system_create_date) DESC) AS rn, + rd.recruit_id, + rd.hidden, + rd.postponement_date + FROM recruits_deferment rd + WHERE rd.hidden is false + -- AND (rs.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '6 months' + INTERVAL '14 days') + AND (rd.postponement_date > DATE_TRUNC('year', CURRENT_DATE) + INTERVAL '12 months') + ) rd on rd.recruit_id = r.recruit_id AND rd.rn = 1 + WHERE r.spring_autumn = 'Осень' +) +SELECT + r.recruitment_id, + r.spring_autumn, + current_date as recording_date, + COUNT(r.recruit_id) FILTER (WHERE r.hidden IS NOT true) AS recruit, + COUNT(r.recruit_id) FILTER (WHERE r.postponement IS NOT null) AS postponement_have_right +FROM vse r +GROUP BY recruitment_id, spring_autumn + Y + + + 464 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + N + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + new_recruits + recruit + + + postponement_have_right + postponement_have_right + +
+ N + N + + + 1024 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl new file mode 100644 index 0000000..fd1ff82 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl @@ -0,0 +1,272 @@ + + + + m_d.rec_cam(m_c)_to_subpoena_registry + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/осень + Update + Y + + + + Table input (subpoena) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, +sh.rn, +rd.rn_d, +--rdi.rn_di, +ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +season_separations AS ( + SELECT DISTINCT + ls.recruitment_id, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, +ls.rn, +ls.rn_d, +--rdi.rn_di, +ls.rn_si, + CASE + WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days') + THEN 'Весна' + WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days') + THEN 'Осень' + END AS spring_autumn + FROM subpoena_data ls + WHERE --ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) + ((ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days') + or + (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days')) +), +season_separations_clean AS ( + SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations +), +t1 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_subpoena + FROM season_separations ss + WHERE sub_stat_hist IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t2 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_appeared + FROM season_separations ss + WHERE sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t3 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_not_appeared + FROM season_separations ss + WHERE sub_stat_hist = '5' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +) +SELECT + current_date AS recording_date, + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.count_appeared, 0) AS count_appeared, + COALESCE(t3.count_not_appeared, 0) AS count_not_appeared, + COALESCE(ROUND(COALESCE(t2.count_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS appeared_on_subpoenas_percent, + COALESCE(ROUND(COALESCE(t3.count_not_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS not_appeared_on_subpoenas_percent, + 0 AS new_recruits, + 0 AS postponement_have_right, + 0 AS postponement_granted, + 0 AS postponement_have_right_percent, + 0 AS postponement_granted_percent, + ss.spring_autumn, + ss.recruitment_id +FROM season_separations_clean ss +LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id AND ss.spring_autumn = t1.spring_autumn +LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id AND ss.spring_autumn = t2.spring_autumn +LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id AND ss.spring_autumn = t3.spring_autumn + Y + + + 288 + 320 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + subpoenas_sent + count_subpoena + + + appeared_on_subpoenas + count_appeared + + + not_appeared_on_subpoenas + count_not_appeared + + + appeared_on_subpoenas_percent + appeared_on_subpoenas_percent + + + not_appeared_on_subpoenas_percent + not_appeared_on_subpoenas_percent + +
+ N + Y + + + 928 + 320 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl new file mode 100644 index 0000000..28fed23 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl @@ -0,0 +1,369 @@ + + + + m_d.rec_cam(m_c)_to_subpoena_registry_uniq + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/осень + Update + Y + + + + Table input (subpoena) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + 'Весна' AS season, +sh.rn, +rd.rn_d, +--rdi.rn_di, +ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) + UNION ALL + SELECT + s.id AS subpoena_id, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + 'Осень' AS season, +sh.rn, +rd.rn_d, +--rdi.rn_di, +ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1 AND*/ --ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +season_separations AS ( + SELECT DISTINCT + ls.recruitment_id, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, + ls.season AS spring_autumn, +ls.rn, +ls.rn_d, +--rdi.rn_di, +ls.rn_si + FROM subpoena_data ls + WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '4 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '7 months' + INTERVAL '14 days') + AND ls.season = 'Весна' + + --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) + + UNION ALL + + SELECT DISTINCT + ls.recruitment_id, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, + ls.season AS spring_autumn, +ls.rn, +ls.rn_d, +--rdi.rn_di, +ls.rn_si + FROM subpoena_data ls + WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '10 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '30 days') + AND ls.season = 'Осень' + + --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) +), +season_separations_clean AS ( + SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations +), +t1 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_subpoena + FROM season_separations ss + WHERE sub_stat_hist IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t2 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_appeared + FROM season_separations ss + WHERE sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t3 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT subpoena_id) AS count_not_appeared + FROM season_separations ss + WHERE sub_stat_hist = '5' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +) +SELECT + current_date AS recording_date, + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.count_appeared, 0) AS count_appeared, + COALESCE(t3.count_not_appeared, 0) AS count_not_appeared, + COALESCE(ROUND(COALESCE(t2.count_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS appeared_on_subpoenas_percent, + COALESCE(ROUND(COALESCE(t3.count_not_appeared, 0) * 100.0 / NULLIF(COALESCE(t1.count_subpoena, 0), 0), 2), 0) AS not_appeared_on_subpoenas_percent, + 0 AS new_recruits, + 0 AS postponement_have_right, + 0 AS postponement_granted, + 0 AS postponement_have_right_percent, + 0 AS postponement_granted_percent, + ss.spring_autumn, + ss.recruitment_id +FROM season_separations_clean ss +LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id AND ss.spring_autumn = t1.spring_autumn +LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id AND ss.spring_autumn = t2.spring_autumn +LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id AND ss.spring_autumn = t3.spring_autumn; + Y + + + 656 + 336 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + subpoenas_sent + count_subpoena + + + appeared_on_subpoenas + count_appeared + + + not_appeared_on_subpoenas + count_not_appeared + + + appeared_on_subpoenas_percent + appeared_on_subpoenas_percent + + + not_appeared_on_subpoenas_percent + not_appeared_on_subpoenas_percent + +
+ N + Y + + + 1056 + 336 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf new file mode 100644 index 0000000..cd9c18a --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/main_dashboard.recruitment_campaign(m_c).hwf @@ -0,0 +1,769 @@ + + + main_dashboard.recruitment_campaign(m_c) + Y + + + + - + 2025/03/19 10:26:06.313 + - + 2025/03/19 10:26:06.313 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 48 + 256 + + + + m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 1104 + 0 + + + + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 1648 + 112 + + + + m_d.rec_cam(m_c)_to_decision_service_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 2000 + 112 + + + + recruitment_season_combination_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 672 + 112 + + + + array_season_recruitments_all.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 368 + + + + array_season_recruitments.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 112 + + + + m_d.rec_cam(m_c)_to_person_registry.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_person_registry.hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 1040 + 480 + + + + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_subpoena_registry.hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 1408 + 368 + + + + m_d.rec_cam(m_c)_to_decision_service.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/m_d.rec_cam(m_c)_to_decision_service.hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 1984 + 368 + + + + recruitment_season_combination.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 672 + 368 + + + + Success all + + SUCCESS + + N + 2352 + 368 + + + + SQL main_dashboard.recruitment_campaign + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + Y + 256 + 256 + + + + Success uniq + + SUCCESS + + N + 2352 + 112 + + + + array_season_recruitments_all.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 768 + 480 + + + + array_season_recruitments_all.hpl 2 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 1312 + 480 + + + + array_season_recruitments_all.hpl 2 2 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 1616 + 480 + + + + array_season_recruitments.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 800 + 0 + + + + array_season_recruitments.hpl 3 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 1408 + 0 + + + + array_season_recruitments.hpl 4 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 1840 + 16 + + + + + + m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + N + N + Y + + + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + m_d.rec_cam(m_c)_to_decision_service_uniq.hpl + N + N + Y + + + recruitment_season_combination_uniq.hpl + m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + N + Y + Y + + + array_season_recruitments.hpl + recruitment_season_combination_uniq.hpl + Y + Y + Y + + + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + m_d.rec_cam(m_c)_to_decision_service.hpl + N + N + Y + + + recruitment_season_combination.hpl + m_d.rec_cam(m_c)_to_person_registry.hpl + N + N + Y + + + array_season_recruitments_all.hpl + recruitment_season_combination.hpl + Y + N + Y + + + m_d.rec_cam(m_c)_to_decision_service.hpl + Success all + Y + Y + N + + + Start + SQL main_dashboard.recruitment_campaign + Y + Y + Y + + + recruitment_season_combination.hpl + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + N + N + Y + + + recruitment_season_combination_uniq.hpl + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + N + N + Y + + + SQL main_dashboard.recruitment_campaign + array_season_recruitments.hpl + Y + N + Y + + + SQL main_dashboard.recruitment_campaign + array_season_recruitments_all.hpl + Y + Y + Y + + + m_d.rec_cam(m_c)_to_decision_service_uniq.hpl + Success uniq + Y + Y + N + + + m_d.rec_cam(m_c)_to_person_registry.hpl + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + N + Y + N + + + recruitment_season_combination.hpl + array_season_recruitments_all.hpl 2 + Y + Y + N + + + array_season_recruitments_all.hpl 2 + m_d.rec_cam(m_c)_to_person_registry.hpl + Y + Y + N + + + m_d.rec_cam(m_c)_to_person_registry.hpl + array_season_recruitments_all.hpl 2 2 + Y + Y + N + + + array_season_recruitments_all.hpl 2 2 + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + Y + Y + N + + + m_d.rec_cam(m_c)_to_subpoena_registry.hpl + array_season_recruitments_all.hpl 2 2 2 + Y + Y + N + + + array_season_recruitments_all.hpl 2 2 2 + m_d.rec_cam(m_c)_to_decision_service.hpl + Y + Y + N + + + recruitment_season_combination_uniq.hpl + array_season_recruitments.hpl 2 + Y + Y + N + + + array_season_recruitments.hpl 2 + m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + Y + Y + N + + + m_d.rec_cam(m_c)_to_person_registry_uniq.hpl + array_season_recruitments.hpl 3 + Y + Y + N + + + array_season_recruitments.hpl 3 + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + Y + Y + N + + + m_d.rec_cam(m_c)_to_subpoena_registry_uniq.hpl + array_season_recruitments.hpl 4 + Y + Y + N + + + array_season_recruitments.hpl 4 + m_d.rec_cam(m_c)_to_decision_service_uniq.hpl + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 0 + 112 + особенные регионы + 123 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 0 + 400 + обычные регионы + 113 + + + + diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl new file mode 100644 index 0000000..c2efea3 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/postponement_percents.hpl @@ -0,0 +1,112 @@ + + + + postponement_percents + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/21 14:21:43.089 + - + 2025/03/21 14:21:43.089 + + + + + + Table input + Update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + current_date AS recording_date, + spring_autumn, + recruitment_id, + ROUND(COALESCE(SUM(postponement_have_right) * 100 / NULLIF(SUM(new_recruits), 0), 0), 1) AS postponement_have_right_percent, + ROUND(COALESCE(SUM(postponement_granted) * 100 / NULLIF(SUM(new_recruits), 0), 0), 1) AS postponement_granted_percent +FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'empty' +GROUP BY recruitment_id, spring_autumn; + N + + + 480 + 256 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + spring_autumn + spring_autumn + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + postponement_have_right_percent + postponement_have_right_percent + + + postponement_granted_percent + postponement_granted_percent + +
+ N + Y + + + 800 + 256 + +
+ + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl new file mode 100644 index 0000000..9d5387b --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination.hpl @@ -0,0 +1,126 @@ + + + + recruitment_season_combination + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 14:06:15.043 + - + 2025/03/20 14:06:15.043 + + + + + + Table input (person_registry) регион/осень + Insert / update (main_dashboard.recruitment_campaign) + Y + + + + Insert / update (main_dashboard.recruitment_campaign) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + + = + recording_date + recording_date + + + + = + spring_autumn + spring_autumn + + + main_dashboard + recruitment_campaign
+ + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + recording_date + recording_date + N + +
+ N + + + 1168 + 304 + +
+ + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +season_separations AS ( + SELECT 'Весна' AS spring_autumn + UNION ALL + SELECT 'Осень' AS spring_autumn +) +SELECT + current_date AS recording_date, + i.recruitment_id AS recruitment_id, + ss.spring_autumn +FROM ids i +CROSS JOIN season_separations ss + Y + + + 624 + 304 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl new file mode 100644 index 0000000..9d87a89 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.recruitment_campaign(m_c)/recruitment_season_combination_uniq.hpl @@ -0,0 +1,124 @@ + + + + recruitment_season_combination_uniq + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 14:06:15.043 + - + 2025/03/20 14:06:15.043 + + + + + + Table input (person_registry) регион/осень + Insert / update (main_dashboard.recruitment_campaign) + Y + + + + Insert / update (main_dashboard.recruitment_campaign) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + + = + recording_date + recording_date + + + + = + spring_autumn + spring_autumn + + + main_dashboard + recruitment_campaign
+ + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + recording_date + recording_date + N + +
+ N + + + 1056 + 320 + +
+ + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +) +SELECT + current_date AS recording_date, + i.recruitment_id AS recruitment_id, + i.spring_autumn +FROM ids i; + Y + + + 512 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl new file mode 100644 index 0000000..2667286 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hpl @@ -0,0 +1,436 @@ + + + + main_dashboard.total_registered(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + N + + + Select values 2 2 + Insert / update (main_dashboard.total_registered) 2 + N + + + Table input (person_registry) регион + Get variables 2 2 + N + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 704 + 480 + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 912 + 480 + + + + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf new file mode 100644 index 0000000..2f9cedc --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered(m_c).hwf @@ -0,0 +1,309 @@ + + + main_dashboard.total_registered(m_c) + Y + + + + - + 2025/03/31 14:43:03.816 + - + 2025/03/31 14:43:03.816 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 544 + 304 + + + + main_dashboard.total_registered_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1120 + 144 + + + + main_dashboard.total_registered_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1120 + 224 + + + + main_dashboard.total_registered_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1120 + 304 + + + + main_dashboard.total_registered_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1120 + 384 + + + + main_dashboard.total_registered_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1120 + 464 + + + + Success + + SUCCESS + + N + 1392 + 144 + + + + Success 2 + + SUCCESS + + N + 1392 + 224 + + + + Success 3 + + SUCCESS + + N + 1392 + 304 + + + + Success 4 + + SUCCESS + + N + 1392 + 384 + + + + Success 5 + + SUCCESS + + N + 1392 + 464 + + + + + + Start + main_dashboard.total_registered_pr1(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.total_registered_pr2(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.total_registered_pr3(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.total_registered_pr4(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.total_registered_pr5(m_c).hpl + Y + Y + Y + + + main_dashboard.total_registered_pr1(m_c).hpl + Success + Y + Y + N + + + main_dashboard.total_registered_pr2(m_c).hpl + Success 2 + Y + Y + N + + + main_dashboard.total_registered_pr3(m_c).hpl + Success 3 + Y + Y + N + + + main_dashboard.total_registered_pr4(m_c).hpl + Success 4 + Y + Y + N + + + main_dashboard.total_registered_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl new file mode 100644 index 0000000..f75f382 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr1(m_c).hpl @@ -0,0 +1,334 @@ + + + + main_dashboard.total_registered_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl new file mode 100644 index 0000000..18c15c8 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr2(m_c).hpl @@ -0,0 +1,334 @@ + + + + main_dashboard.total_registered_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl new file mode 100644 index 0000000..3493467 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr3(m_c).hpl @@ -0,0 +1,334 @@ + + + + main_dashboard.total_registered_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl new file mode 100644 index 0000000..293beaf --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr4(m_c).hpl @@ -0,0 +1,334 @@ + + + + main_dashboard.total_registered_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl new file mode 100644 index 0000000..001fcc8 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.total_registered(m_c)/main_dashboard.total_registered_pr5(m_c).hpl @@ -0,0 +1,334 @@ + + + + main_dashboard.total_registered_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион + Insert / update (main_dashboard.total_registered) 2 + Y + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + convicts + convicts + N + +
+ N + + + 1168 + 320 + +
+ + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') -- критерии от 03.06.2025 + --and rh.source is not null + ), +*/ +vse AS ( + SELECT + --distinct + r.id AS r_id, + ri.recruit_id AS recruit_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS r_current_recruitment_id, + r.current_recruitment_id AS r_current_recruitment_id, + r.gender, + r.birth_date, + --r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) and + coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_current_recruitment_id::uuid AS recruitment_id, + ri.convicts, + COUNT(distinct ri.recruit_id) AS total_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_current_recruitment_id, ri.convicts +), +recruit_data_all AS ( + SELECT + recruitment_id, + 'ALL' AS convicts, + SUM(total_count) AS total_count, + SUM(male_count) AS male_count, + SUM(female_count) AS female_count, + SUM(mobilization_criterion) AS mobilization_criterion, + SUM(volunteer_criterion) AS volunteer_criterion, + SUM(contract_criterion) AS contract_criterion + FROM recruit_data + GROUP BY recruitment_id +) +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data AS rd ON ids.recruitment_id = rd.recruitment_id + +UNION ALL + +SELECT + ids.recruitment_id, + rd.convicts, + current_date AS recording_date, + COALESCE(rd.total_count, 0) AS total_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.total_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.total_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM ids +JOIN recruit_data_all AS rd ON ids.recruitment_id = rd.recruitment_id + Y + + + 496 + 320 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl new file mode 100644 index 0000000..acc5ecd --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf new file mode 100644 index 0000000..70f7f97 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration(m_c).hwf @@ -0,0 +1,309 @@ + + + main_dashboard.waiting_registration(m_c) + Y + + + + - + 2025/03/31 10:12:19.214 + - + 2025/03/31 10:12:19.214 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 688 + 416 + + + + main_dashboard.waiting_registration_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1568 + 256 + + + + main_dashboard.waiting_registration_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1568 + 336 + + + + main_dashboard.waiting_registration_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1568 + 416 + + + + main_dashboard.waiting_registration_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1568 + 496 + + + + Success + + SUCCESS + + N + 1808 + 256 + + + + Success 2 + + SUCCESS + + N + 1808 + 336 + + + + Success 3 + + SUCCESS + + N + 1808 + 416 + + + + Success 4 + + SUCCESS + + N + 1808 + 496 + + + + main_dashboard.waiting_registration_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1568 + 576 + + + + Success 5 + + SUCCESS + + N + 1808 + 576 + + + + + + main_dashboard.waiting_registration_pr1(m_c).hpl + Success + Y + Y + N + + + main_dashboard.waiting_registration_pr2(m_c).hpl + Success 2 + Y + Y + N + + + main_dashboard.waiting_registration_pr3(m_c).hpl + Success 3 + Y + Y + N + + + main_dashboard.waiting_registration_pr4(m_c).hpl + Success 4 + Y + Y + N + + + main_dashboard.waiting_registration_pr5(m_c).hpl + Success 5 + Y + Y + N + + + Start + main_dashboard.waiting_registration_pr1(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.waiting_registration_pr2(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.waiting_registration_pr3(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.waiting_registration_pr4(m_c).hpl + Y + Y + Y + + + Start + main_dashboard.waiting_registration_pr5(m_c).hpl + Y + Y + Y + + + + + + diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl new file mode 100644 index 0000000..9e9b647 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr1(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl new file mode 100644 index 0000000..232eb01 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr2(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl new file mode 100644 index 0000000..1be98fb --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr3(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl new file mode 100644 index 0000000..c11a7f1 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr4(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl new file mode 100644 index 0000000..dbbb488 --- /dev/null +++ b/map_v1/mil_com/main_dashboard.waiting_registration(m_c)/main_dashboard.waiting_registration_pr5(m_c).hpl @@ -0,0 +1,272 @@ + + + + main_dashboard.waiting_registration_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input 2 (person_registry) регион + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1024 + 240 + +
+ + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +vse AS ( + SELECT + r.id AS r_id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS r_target_recruitment_id, + r.gender, + r.birth_date, + -- r.conscription, + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd + WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text + ) + ELSE + false + END AS uchet_pnd, + CASE + WHEN ddd.hidden IS false THEN ddd.hidden + ELSE true + END AS hidden, -- когда фолс отсрочка есть, когда тру или нулл - нет + ri.info + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY ddd.recruit_id ORDER BY COALESCE(ddd.updated_at, ddd.created_at) DESC) AS rn, + ddd.recruit_id, + ddd.hidden + FROM decision_deferment_dto ddd + WHERE ddd.hidden is true -- когда фолс отсрочка есть, когда тру или нулл - нет (для подсчета подпадающих под призыв) + ) ddd ON ddd.recruit_id = r.id AND ddd.rn = 1 + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) and + coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +extracted_children AS ( + SELECT + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_birth_dates AS ( + SELECT + recruit_id, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year + FROM extracted_children +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) AS children_under_16 + FROM children_birth_dates + WHERE AGE(make_date(year, month, day)) < interval '16 years' + GROUP BY recruit_id +), +recruit_data AS ( + SELECT + ri.r_target_recruitment_id::uuid AS recruitment_id, + COUNT(distinct ri.recruit_id) AS waiting_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'MALE') AS male_count, + COUNT(distinct ri.recruit_id) FILTER (WHERE gender = 'FEMALE') AS female_count, + COUNT(distinct ri.recruit_id) FILTER ( + WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 50 AND gender = 'MALE') -- мужчины от 30 до 50 лет + OR (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 30 AND 45 AND gender = 'FEMALE') -- женщины от 30 до 45 лет + AND COALESCE(cc.children_under_16, 0) < 5 + ) AS mobilization_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30 + AND gender = 'MALE' + AND hidden IS true -- нет отсрочки и нет освобождения от службы + ) AS volunteer_criterion, -- критерии от 03.06.2025 + + COUNT(distinct ri.recruit_id) FILTER ( + WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50 + AND gender = 'MALE' + AND (ri.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1' + OR uchet_pnd is false) + AND ri.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ + --AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' + ) AS contract_criterion -- критерии от 03.06.2025 + FROM vse AS ri + LEFT JOIN children_count AS cc ON ri.recruit_id = cc.recruit_id + GROUP BY ri.r_target_recruitment_id +) +SELECT + rd.recruitment_id, + current_date AS recording_date, + COALESCE(rd.waiting_count, 0) AS waiting_count, + COALESCE(rd.male_count, 0) AS male_count, + COALESCE(rd.female_count, 0) AS female_count, + COALESCE(rd.mobilization_criterion, 0) AS mobilization_criterion, + COALESCE(rd.volunteer_criterion, 0) AS volunteer_criterion, + COALESCE(rd.contract_criterion, 0) AS contract_criterion, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.mobilization_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS mobilization_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.volunteer_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS volunteer_criterion_percent, + CASE + WHEN rd.waiting_count > 0 THEN ROUND(rd.contract_criterion::NUMERIC / rd.waiting_count * 100, 2) + ELSE 0 + END AS contract_criterion_percent +FROM recruit_data AS rd + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/mil_com/parameters/add_schema.hpl b/map_v1/mil_com/parameters/add_schema.hpl new file mode 100644 index 0000000..836f4d7 --- /dev/null +++ b/map_v1/mil_com/parameters/add_schema.hpl @@ -0,0 +1,692 @@ + + + + add_schema + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/17 12:24:07.728 + - + 2025/01/17 12:24:07.728 + + + + + + Table input + Update (total_registered.driver_license) + Y + + + Table input + Update (total_registered.child_minor) + Y + + + Table input + Update (total_registered.age) + Y + + + Table input + Update (total_registered.marital_status) + Y + + + Table input + Update (total_registered.busyness) + Y + + + Table input + Update (total_registered.education_level) + Y + + + Table input + Update (total_registered.subpoenas) + Y + + + Table input + Update (total_registered.removed_registry) + Y + + + Table input + Update (total_registered.reg_mil_cat) + Y + + + Table input + Update (main_dashboard.waiting_registration) + Y + + + Table input + Update (main_dashboard.total_registered) + Y + + + Table input + Update (recruitment_campaign.appeals) + N + + + Table input + Update (recruitment_campaign.subpoenas) + Y + + + Table input + Update (main_dashboard.recruitment_campaign) + Y + + + + Table input + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + idm_id AS recruitment_id, + -- parent_id AS PARENT_ID, + CASE + WHEN schema = 'Department' THEN 'Department' + WHEN schema = 'Organization' THEN 'REG_LVL' + WHEN schema = 'Region' THEN 'MD_LVL' + WHEN schema = 'Ministry' THEN 'Ministry' + ELSE schema -- на случай, если появится неизвестное значение + END AS schema, + current_date AS recording_date +FROM + ervu_dashboard.recruitment +WHERE schema in ('Department', 'Organization', 'Region') + N + + + 608 + 928 + + + + Update (main_dashboard.recruitment_campaign) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + recruitment_campaign
+ + schema + schema + +
+ N + Y + + + 1200 + 320 + +
+ + Update (main_dashboard.total_registered) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + total_registered
+ + schema + schema + +
+ N + Y + + + 1200 + 480 + +
+ + Update (main_dashboard.waiting_registration) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + main_dashboard + waiting_registration
+ + schema + schema + +
+ N + Y + + + 1200 + 560 + +
+ + Update (recruitment_campaign.appeals) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + recruitment_campaign + appeals
+ + schema + schema + +
+ N + Y + + + 1200 + 1376 + +
+ + Update (recruitment_campaign.subpoenas) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + recruitment_campaign + subpoenas
+ + schema + schema + +
+ N + Y + + + 1200 + 400 + +
+ + Update (total_registered.age) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + age
+ + schema + schema + +
+ N + Y + + + 1200 + 1040 + +
+ + Update (total_registered.busyness) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + busyness
+ + schema + schema + +
+ N + Y + + + 1200 + 1200 + +
+ + Update (total_registered.child_minor) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + child_minor
+ + schema + schema + +
+ N + Y + + + 1200 + 960 + +
+ + Update (total_registered.driver_license) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + driver_license
+ + schema + schema + +
+ N + Y + + + 1200 + 880 + +
+ + Update (total_registered.education_level) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + education_level
+ + schema + schema + +
+ N + Y + + + 1200 + 1280 + +
+ + Update (total_registered.marital_status) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + marital_status
+ + schema + schema + +
+ N + Y + + + 1200 + 1120 + +
+ + Update (total_registered.reg_mil_cat) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + reg_mil_cat
+ + schema + schema + +
+ N + Y + + + 1200 + 640 + +
+ + Update (total_registered.removed_registry) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + schema + schema + +
+ N + Y + + + 1200 + 720 + +
+ + Update (total_registered.subpoenas) + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + subpoenas
+ + schema + schema + +
+ N + Y + + + 1200 + 800 + +
+ + + +
diff --git a/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl b/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl new file mode 100644 index 0000000..396b2c5 --- /dev/null +++ b/map_v1/mil_com/parameters/array_recruitment_for_parallel.hpl @@ -0,0 +1,113 @@ + + + + array_recruitment_for_parallel + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/31 10:14:04.435 + - + 2025/03/31 10:14:04.435 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 1040 + 384 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ids AS ( + SELECT idm_id, + NTILE(5) OVER (ORDER BY idm_id) AS part -- Разбиваем на 5 частей + FROM ervu_dashboard.recruitment + WHERE schema IN ('Department', 'Organization', 'Region') +), +grouped AS ( + SELECT + array_agg(idm_id) FILTER (WHERE part = 1) AS part_1, + array_agg(idm_id) FILTER (WHERE part = 2) AS part_2, + array_agg(idm_id) FILTER (WHERE part = 3) AS part_3, + array_agg(idm_id) FILTER (WHERE part = 4) AS part_4, + array_agg(idm_id) FILTER (WHERE part = 5) AS part_5 + FROM ids +), +split_parts AS ( + SELECT + gs.row_num, + (SELECT array_agg(val) FROM unnest(part_1) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_1, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_1, 1) * gs.row_num / 2) AS PART_RECRUITMENT_1, + (SELECT array_agg(val) FROM unnest(part_2) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_2, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_2, 1) * gs.row_num / 2) AS PART_RECRUITMENT_2, + (SELECT array_agg(val) FROM unnest(part_3) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_3, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_3, 1) * gs.row_num / 2) AS PART_RECRUITMENT_3, + (SELECT array_agg(val) FROM unnest(part_4) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_4, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_4, 1) * gs.row_num / 2) AS PART_RECRUITMENT_4, + (SELECT array_agg(val) FROM unnest(part_5) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_5, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_5, 1) * gs.row_num / 2) AS PART_RECRUITMENT_5 + FROM grouped + CROSS JOIN generate_series(1, 2) gs(row_num) +) +SELECT +PART_RECRUITMENT_1, +PART_RECRUITMENT_2, +PART_RECRUITMENT_3, +PART_RECRUITMENT_4, +PART_RECRUITMENT_5 +FROM split_parts; + N + + + 672 + 384 + + + + + + diff --git a/map_v1/mil_com/parameters/array_recruitments.hpl b/map_v1/mil_com/parameters/array_recruitments.hpl new file mode 100644 index 0000000..4fc3712 --- /dev/null +++ b/map_v1/mil_com/parameters/array_recruitments.hpl @@ -0,0 +1,120 @@ + + + + array_recruitments + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/17 10:29:53.663 + - + 2025/01/17 10:29:53.663 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 42 + 752 + 128 + ARRAY_MIL_COM - алиас (массив idm_id всех военкоматов) +ARR_MC - параметр + 339 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 752 + 192 + для запуска без параллели + 158 + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 768 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + WITH ids AS ( + SELECT idm_id, + (ROW_NUMBER() OVER ()) - 1 AS rn + FROM ervu_dashboard.recruitment + WHERE schema IN ('Department', 'Organization', 'Region') + --LIMIT 200 +) +SELECT array_agg(idm_id) AS ARRAY_MIL_COM +FROM ids +GROUP BY rn / 100; + N + + + 512 + 336 + + + + + + diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl new file mode 100644 index 0000000..58e9e3a --- /dev/null +++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments.hpl @@ -0,0 +1,114 @@ + + + + array_season_recruitments + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 10:44:35.298 + - + 2025/03/20 10:44:35.298 + + + + + + Table input определенные вк + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 832 + 240 + + + + Table input определенные вк + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + ARRAY[ + '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа + 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края + 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края + 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия) + '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия) + '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия) + '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия) + 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия) + 'eaffdb79-767f-405c-a1b1-b48bdc63add8' -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия) + ] AS ARRAY_MIL_COM_SP, -- 1.05-15.07 + ARRAY[ + '354f7fbd-467f-4f41-aaad-f0e2e139527e'::UUID, -- Военный комиссариат города Воркута Республики Коми + 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми + 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми + '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми + 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми + 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми + 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми + '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми + '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми + 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми + '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми + '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми + '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми + '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края + 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края + 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат + '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края + '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края + '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края + 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края + '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа + 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области + 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа + '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа + '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа + 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа + '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа + 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа + '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа + 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа + ] AS ARRAY_MIL_COM_AU -- 1.11-31.12 + N + + + 512 + 240 + + + + + + diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl new file mode 100644 index 0000000..b2dbe45 --- /dev/null +++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all.hpl @@ -0,0 +1,121 @@ + + + + array_season_recruitments_all + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 10:44:35.298 + - + 2025/03/20 10:44:35.298 + + + + + + Table input остальные + Copy rows to result 2 + Y + + + + Copy rows to result 2 + RowsToResult + + Y + + 1 + + none + + + + + 832 + 352 + + + + Table input остальные + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH ids AS ( + SELECT idm_id, + (ROW_NUMBER() OVER ()) - 1 AS rn + FROM ervu_dashboard.recruitment + WHERE schema IN ('Department', 'Organization', 'Region') + --LIMIT 200 + AND idm_id NOT IN ( + '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа + 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края + 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края + 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия) + '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия) + '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия) + '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия) + 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия) + 'eaffdb79-767f-405c-a1b1-b48bdc63add8', -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия) + '354f7fbd-467f-4f41-aaad-f0e2e139527e', -- Военный комиссариат города Воркута Республики Коми + 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми + 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми + '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми + 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми + 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми + 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми + '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми + '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми + 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми + '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми + '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми + '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми + '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края + 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края + 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат + '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края + '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края + '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края + 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края + '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа + 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области + 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа + '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа + '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа + 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа + '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа + 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа + '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа + 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа + ) +) +SELECT array_agg(idm_id) AS ARRAY_MIL_COM +FROM ids +GROUP BY rn / 200; + N + + + 512 + 352 + + + + + + diff --git a/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl new file mode 100644 index 0000000..b2d6ede --- /dev/null +++ b/map_v1/mil_com/parameters/season_separation/array_season_recruitments_all_parallel.hpl @@ -0,0 +1,154 @@ + + + + array_season_recruitments_all_parallel + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 10:44:35.298 + - + 2025/03/20 10:44:35.298 + + + + + + Table input остальные + Copy rows to result 2 + Y + + + + Copy rows to result 2 + RowsToResult + + Y + + 1 + + none + + + + + 832 + 352 + + + + Table input остальные + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH ids AS ( + SELECT idm_id, + NTILE(5) OVER (ORDER BY idm_id) AS part -- Разбиваем на 5 частей + FROM ervu_dashboard.recruitment + WHERE schema IN ('Department', 'Organization', 'Region') + AND idm_id NOT IN ( + '55158cc6-1342-4701-ab2b-855a6389906d'::UUID, -- Военный комиссариат Провиденского и Чукотского районов Чукотского автономного округа + 'd35584cf-8405-42ea-9944-25bfe5725347', -- Военный комиссариат Охотского Аяно-Майского и Тугуро-Чумиканского районов Хабаровского края + 'b960d9a3-97c5-42ff-9fa7-1843114392a0', -- Военный комиссариат Тигильского Карагинского Олюторского и Пенжинского районов Камчатского края + 'ab335d7b-7966-470d-89b3-72cee950839d', -- Военный комиссариат Оймяконского и Момского улусов Республики Саха (Якутия) + '1dea48be-40fb-42bd-9df8-14d0cfd3fd12', -- Военный комиссариат Нижнеколымского и Среднеколымского улусов Республики Саха (Якутия) + '018b8e04-2714-402a-961b-39877b9ee698', -- Военный комиссариат Верхоянского и Эвено-Бытантайского улусов Республики Саха (Якутия) + '18e818af-ef45-49ee-aea2-d0f3516ddf1d', -- Военный комиссариат Верхнеколымского улуса Республики Саха (Якутия) + 'b2ec295c-47a4-4be9-a6f8-827096f9857d', -- Военный комиссариат Булунского и Жиганского улусов Республики Саха (Якутия) + 'eaffdb79-767f-405c-a1b1-b48bdc63add8', -- Военный комиссариат Усть-Янского Аллаиховского и Абыйского улусов Республики Саха (Якутия) + '354f7fbd-467f-4f41-aaad-f0e2e139527e', -- Военный комиссариат города Воркута Республики Коми + 'ce2b0297-d1e8-422a-8367-b7e3a5cc7a40', -- Военный комиссариат города Инта Республики Коми + 'c023af4a-ad27-4539-a1f9-7a3251634fdb', -- Военный комиссариат города Печора и Печорского района Республики Коми + '0e44335f-02db-43ac-b713-f09532e675a3', -- Военный комиссариат городов Ухта Вуктыл и Сосногорск Вуктыльского и Сосногорского районов Республики Коми + 'e55859e6-9d34-47b7-a969-efc8ceea708b', -- Военный комиссариат Ижемского района Республики Коми + 'b9d1002f-d2a7-4d2f-910b-637b2cf332dd', -- Военный комиссариат Княжпогостского и Усть-Вымского районов Республики Коми + 'ef2da2e5-0cc1-479c-b2de-c334c95b5514', -- Военный комиссариат Сысольского Койгородского и Прилузского районов Республики Коми + '53851a38-fc95-400b-9ff7-00b4dcad2918', -- Военный комиссариат города Сыктывкар Сыктывдинского и Корткеросского районов Республики Коми + '2dc1de3a-712a-4376-8baf-7833a43f6678', -- Военный комиссариат Троицко-Печорского района Республики Коми + 'a6db3dba-65e3-4ad9-a76e-a846efec2a2d', -- Военный комиссариат Удорского района Республики Коми + '630ba6cd-c979-4d35-b128-f6e2527949ef', -- Военный комиссариат города Усинск и Усинского района Республики Коми + '231361d3-3d34-4409-8a30-20c4b013d62c', -- Военный комиссариат Усть-Куломского района Республики Коми + '6466af82-e8be-416d-88c9-cef02f99fef0', -- Военный комиссариат Усть-Цилемского района Республики Коми + '83c89e3d-aa69-43bc-857c-59ce405b9e1e', -- Военный комиссариат Туруханского района и города Игарка Красноярского края + 'ec2c03cd-9c13-4980-9f6d-ba4a93a9a411', -- Военный комиссариат города Лесосибирск и Мотыгинского района Красноярского края + 'd386bf1f-42bd-436f-8b14-288b2cbe1046', -- какой то Северо-Енисейский безымянный военкомат + '61b5758c-c72b-426e-a96f-e146d89197c2', -- Военный комиссариат города Норильск и Таймырского Долгано-Ненецкого района Красноярского края + '9f1a1e68-2fd2-478c-b6ba-b04cc6b752b3', -- Военный комиссариат Эвенкийского района Красноярского края + '7cb704d4-b600-4ce9-bddf-723e1b024f98', -- Военный комиссариат Гайнского района Пермского края + 'be515915-26e8-41c8-af21-3b53d991d632', -- Военный комиссариат Кочевского и Косинского районов Пермского края + '28061db5-22ef-46f6-a2af-043c47288885', -- Военный комиссариат Ненецкого автономного округа + 'ce08e909-5a14-480f-b931-bff172872ac6', -- ВК городских округов Курильский и Северо-Курильский Сахалинской области + 'f578c2c0-72fe-4f3b-bcf7-659bda20f511', -- Военный комиссариат города Губкинский Пуровского и Красноселькупского районов Ямало-Ненецкого автономного округа + '5a0c4a0c-1d00-4528-9dcc-73c8d6dd52b9', -- Военный комиссариат города Лабытнанги и Шурышкарского района Ямало-Ненецкого автономного округа + '50af0e45-872b-48e8-bf74-c13b2162e3ce', -- Военный комиссариат городов Ноябрьск и Муравленко Ямало-Ненецкого автономного округа + 'a8852d04-516d-4ea4-9979-5eb149e9ac7e', -- Военный комиссариат города Новый Уренгой Ямало-Ненецкого автономного округа + '9464d4df-9402-4eb2-abb2-c68b079ad5cf', -- Военный комиссариат города Салехард и Приуральского района Ямало-Ненецкого автономного округа + 'b778245a-0257-4d93-a51c-fa7005e4a480', -- Военный комиссариат города Надым и Надымского района Ямало-Ненецкого автономного округа + '2e18cd11-bbca-406d-a2b8-0a89cbb2046e', -- Военный комиссариат Тазовского района Ямало-Ненецкого автономного округа + 'a4126a2d-3412-47cd-aa90-caa62e202c7f' -- Военный комиссариат Ямальского района Ямало-Ненецкого автономного округа + ) +), +grouped AS ( + SELECT + array_agg(idm_id) FILTER (WHERE part = 1) AS part_1, + array_agg(idm_id) FILTER (WHERE part = 2) AS part_2, + array_agg(idm_id) FILTER (WHERE part = 3) AS part_3, + array_agg(idm_id) FILTER (WHERE part = 4) AS part_4, + array_agg(idm_id) FILTER (WHERE part = 5) AS part_5 + FROM ids +), +split_parts AS ( + SELECT + gs.row_num, + (SELECT array_agg(val) FROM unnest(part_1) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_1, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_1, 1) * gs.row_num / 2) AS PART_RECRUITMENT_1, + (SELECT array_agg(val) FROM unnest(part_2) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_2, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_2, 1) * gs.row_num / 2) AS PART_RECRUITMENT_2, + (SELECT array_agg(val) FROM unnest(part_3) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_3, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_3, 1) * gs.row_num / 2) AS PART_RECRUITMENT_3, + (SELECT array_agg(val) FROM unnest(part_4) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_4, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_4, 1) * gs.row_num / 2) AS PART_RECRUITMENT_4, + (SELECT array_agg(val) FROM unnest(part_5) WITH ORDINALITY AS t(val, ord) + WHERE ord > array_length(part_5, 1) * (gs.row_num - 1) / 2 + AND ord <= array_length(part_5, 1) * gs.row_num / 2) AS PART_RECRUITMENT_5 + FROM grouped + CROSS JOIN generate_series(1, 2) gs(row_num) +) +SELECT +PART_RECRUITMENT_1, +PART_RECRUITMENT_2, +PART_RECRUITMENT_3, +PART_RECRUITMENT_4, +PART_RECRUITMENT_5 +FROM split_parts; + N + + + 512 + 352 + + + + + + diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl new file mode 100644 index 0000000..0a7e8ab --- /dev/null +++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl @@ -0,0 +1,702 @@ + + + + recruitment_campaign.subpoenas(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/09 13:13:59.825 + - + 2024/08/09 13:13:59.825 + + + + + + Get variables 4 3 + Select values 4 3 + N + + + Table input (subpoena) осень/регионы + Get variables 4 3 + N + + + Select values 4 3 + Insert / update (recruitment_campaign.subpoenas) 3 + N + + + Table input (subpoena) осень/регионы + Insert / update (recruitment_campaign.subpoenas) 3 + N + + + Table input (subpoena) осень/регионы + Update recruitment_campaign.subpoenas + Y + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 592 + 512 + + + + Insert / update (recruitment_campaign.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + restrictions_applied + count_restrictions_applied + Y + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + recruitment_id + recruitment_id + N + + + rest + rest + Y + + + spring_autumn + spring_autumn + N + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 960 + 400 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 512 + + + + Table input (subpoena) осень/регионы + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + rdi.status_applied, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +season_separations AS ( + SELECT distinct + ls.recruitment_id, + ls.recruit_id, + ls.status_applied, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, + ls.rn, + ls.rn_d, + --rdi.rn_di, + ls.rn_si, + CASE + WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days') + THEN 'Весна' + WHEN (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days') + THEN 'Осень' + END AS spring_autumn + FROM subpoena_data ls + WHERE --ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) + --AND + ((ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '3 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '6 months' + INTERVAL '15 days') + OR + (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '9 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '31 days')) +), +season_separations_clean AS ( + SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations +), +t1 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_subpoena + FROM season_separations ss + WHERE sub_stat_hist IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t2 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + ROUND( + AVG( + CASE + WHEN ss.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ss.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared + FROM season_separations ss +where ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t3 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_appeared + FROM season_separations ss + WHERE ss.sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t4 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_appeared + FROM season_separations ss + WHERE sub_stat_hist = '5' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t5 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_ap_good_reason + FROM season_separations ss + WHERE sub_stat_hist = '5.1' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t6 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_ap_not_required + FROM season_separations ss + WHERE sub_stat_hist IN ('3.8', '5.2') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t7 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM season_separations ss + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and ss.rn = 1 and ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t8 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM season_separations ss + WHERE status_applied = '11' and ss.rn = 1 and ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t9 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_paper + FROM season_separations ss + WHERE d_code != '7' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t10 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_electron + FROM season_separations ss + WHERE d_code = '7' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t11 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT (DISTINCT ss.rdi_id) AS count_restrictions + FROM season_separations ss +where ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t12 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_delivery + FROM season_separations ss + WHERE ss.act_number IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t13 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS appear_date_is_good + FROM season_separations ss + WHERE ss.sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +) +SELECT + current_date AS recording_date, + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appeared_percent, + ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_appeared_percent, + ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_ap_good_reason_percent, + ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS ap_not_required_percent, + ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS electron_percent, + ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS paper_percent, + ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS restrictions_applied_percent, + ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS introduced_measures_percent, + ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_delivery_percent, + ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appear_date_is_good_percent, + ss.recruitment_id, + 0 AS rest, + ss.spring_autumn +FROM season_separations_clean ss +LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id AND ss.spring_autumn = t1.spring_autumn +LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id AND ss.spring_autumn = t2.spring_autumn +LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id AND ss.spring_autumn = t3.spring_autumn +LEFT JOIN t4 ON ss.recruitment_id = t4.recruitment_id AND ss.spring_autumn = t4.spring_autumn +LEFT JOIN t5 ON ss.recruitment_id = t5.recruitment_id AND ss.spring_autumn = t5.spring_autumn +LEFT JOIN t6 ON ss.recruitment_id = t6.recruitment_id AND ss.spring_autumn = t6.spring_autumn +LEFT JOIN t7 ON ss.recruitment_id = t7.recruitment_id AND ss.spring_autumn = t7.spring_autumn +LEFT JOIN t8 ON ss.recruitment_id = t8.recruitment_id AND ss.spring_autumn = t8.spring_autumn +LEFT JOIN t9 ON ss.recruitment_id = t9.recruitment_id AND ss.spring_autumn = t9.spring_autumn +LEFT JOIN t10 ON ss.recruitment_id = t10.recruitment_id AND ss.spring_autumn = t10.spring_autumn +LEFT JOIN t11 ON ss.recruitment_id = t11.recruitment_id AND ss.spring_autumn = t11.spring_autumn +LEFT JOIN t12 ON ss.recruitment_id = t12.recruitment_id AND ss.spring_autumn = t12.spring_autumn +LEFT JOIN t13 ON ss.recruitment_id = t13.recruitment_id AND ss.spring_autumn = t13.spring_autumn + Y + + + 464 + 400 + + + + Update recruitment_campaign.subpoenas + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + + + appeared + count_appeared + + + not_appeared + count_not_appeared + + + not_ap_good_reason + count_not_ap_good_reason + + + ap_not_required + count_ap_not_required + + + restrictions_applied + count_restrictions_applied + + + appeared_percent + appeared_percent + + + not_appeared_percent + not_appeared_percent + + + not_ap_good_reason_percent + not_ap_good_reason_percent + + + ap_not_required_percent + ap_not_required_percent + + + restrictions_applied_percent + restrictions_applied_percent + + + introduced_measures + count_introduced_measures + + + introduced_measures_percent + introduced_measures_percent + + + count_not_delivery + count_not_delivery + + + appear_date_is_good + appear_date_is_good + + + not_delivery_percent + not_delivery_percent + + + appear_date_is_good_percent + appear_date_is_good_percent + +
+ N + Y + + + 960 + 240 + +
+ + + +
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf new file mode 100644 index 0000000..4c2f5d9 --- /dev/null +++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hwf @@ -0,0 +1,487 @@ + + + recruitment_campaign.subpoenas(m_c) + Y + + + + - + 2025/03/28 13:41:42.903 + - + 2025/03/28 13:41:42.903 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 416 + 304 + + + + SQL recruitment_campaign.subpoenas + + SQL + + ervu-dashboard + N + DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N + N + Y + 624 + 304 + + + + array_season_recruitments.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 832 + 176 + + + + array_season_recruitments_all.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 832 + 416 + + + + recruitment_season_combination_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 1120 + 176 + + + + recruitment_season_combination.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 1120 + 416 + + + + recruitment_campaign.subpoenas(m_c)_uniq.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl + Basic + + + ARR_MC_SP + ARRAY_MIL_COM_SP + + + ARR_MC_AU + ARRAY_MIL_COM_AU + + Y + + Y + local + N + N + Y + N + 1408 + 112 + + + + recruitment_campaign.subpoenas(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c).hpl + Basic + + + ARR_MC + ARRAY_MIL_COM + + Y + + Y + local + N + N + Y + N + 1408 + 464 + + + + Success uniq + + SUCCESS + + N + 1696 + 112 + + + + Success all + + SUCCESS + + N + 1696 + 464 + + + + Success + + SUCCESS + + N + 992 + 304 + + + + Success 2 + + SUCCESS + + N + 1248 + 304 + + + + array_season_recruitments.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 1264 + 80 + + + + array_season_recruitments_all.hpl 2 + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_com/parameters/season_separation/array_season_recruitments_all.hpl + Basic + + Y + + N + local + N + N + Y + N + 1216 + 528 + + + + + + Start + SQL recruitment_campaign.subpoenas + Y + Y + Y + + + SQL recruitment_campaign.subpoenas + array_season_recruitments.hpl + Y + Y + N + + + SQL recruitment_campaign.subpoenas + array_season_recruitments_all.hpl + Y + Y + N + + + array_season_recruitments.hpl + recruitment_season_combination_uniq.hpl + Y + Y + N + + + array_season_recruitments_all.hpl + recruitment_season_combination.hpl + Y + Y + N + + + recruitment_season_combination_uniq.hpl + recruitment_campaign.subpoenas(m_c)_uniq.hpl + N + Y + N + + + recruitment_season_combination.hpl + recruitment_campaign.subpoenas(m_c).hpl + N + Y + N + + + recruitment_campaign.subpoenas(m_c).hpl + Success all + Y + Y + N + + + recruitment_campaign.subpoenas(m_c)_uniq.hpl + Success uniq + Y + Y + N + + + array_season_recruitments_all.hpl + Success + N + N + Y + + + array_season_recruitments.hpl + Success + N + N + Y + + + recruitment_season_combination.hpl + Success 2 + N + N + Y + + + recruitment_season_combination_uniq.hpl + Success 2 + N + N + Y + + + recruitment_season_combination.hpl + array_season_recruitments_all.hpl 2 + Y + Y + N + + + array_season_recruitments_all.hpl 2 + recruitment_campaign.subpoenas(m_c).hpl + Y + Y + N + + + recruitment_season_combination_uniq.hpl + array_season_recruitments.hpl 2 + Y + Y + N + + + array_season_recruitments.hpl 2 + recruitment_campaign.subpoenas(m_c)_uniq.hpl + Y + Y + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 400 + 176 + уникальные + 78 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 400 + 448 + остальные + 70 + + + + diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl new file mode 100644 index 0000000..da86027 --- /dev/null +++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_campaign.subpoenas(m_c)_uniq.hpl @@ -0,0 +1,799 @@ + + + + recruitment_campaign.subpoenas(m_c)_uniq + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/09 13:13:59.825 + - + 2024/08/09 13:13:59.825 + + + + + + Get variables 4 3 + Select values 4 3 + N + + + Table input (subpoena) осень/регионы + Get variables 4 3 + N + + + Select values 4 3 + Insert / update (recruitment_campaign.subpoenas) 3 + N + + + Table input (subpoena) осень/регионы + Insert / update (recruitment_campaign.subpoenas) 3 + N + + + Table input (subpoena) осень/регионы + Update recruitment_campaign.subpoenas + Y + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 592 + 624 + + + + Insert / update (recruitment_campaign.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + restrictions_applied + count_restrictions_applied + Y + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + recruitment_id + recruitment_id + N + + + rest + rest + Y + + + spring_autumn + spring_autumn + N + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1040 + 624 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 624 + + + + Table input (subpoena) осень/регионы + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + rdi.status_applied, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + 'Весна' AS season, +sh.rn, +rd.rn_d, +--rdi.rn_di +ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1 AND */--ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Весна') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) + UNION ALL + SELECT + s.id AS subpoena_id, + s.recruit_id, + rdi.status_applied, + s.create_date, + s.visit_date, + s.department_id::uuid AS recruitment_id, + s.status_id, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + 'Осень' AS season, +sh.rn, +rd.rn_d, +--rdi.rn_di +ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ --AND ssi.rn_si = 1 + --AND +sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids WHERE spring_autumn = 'Осень') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +season_separations AS ( + SELECT distinct + ls.recruitment_id, + ls.recruit_id, + ls.status_applied, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, + 'Весна' AS spring_autumn, +ls.rn, +ls.rn_d, +--rdi.rn_di +ls.rn_si + FROM subpoena_data ls + WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '4 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '7 months' + INTERVAL '14 days') + AND ls.season = 'Весна' + + UNION ALL + + SELECT distinct + ls.recruitment_id, + ls.recruit_id, + ls.status_applied, + ls.create_date, + ls.visit_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.act_number, + ls.rdi_id, + 'Осень' AS spring_autumn, +ls.rn, +ls.rn_d, +--rdi.rn_di +ls.rn_si + FROM subpoena_data ls + WHERE (ls.visit_date BETWEEN DATE_TRUNC('year', ls.visit_date) + INTERVAL '10 months' + INTERVAL '1 day' + AND DATE_TRUNC('year', ls.visit_date) + INTERVAL '12 months' + INTERVAL '30 days') + AND ls.season = 'Осень' +), +season_separations_clean AS ( + SELECT DISTINCT recruitment_id, spring_autumn FROM season_separations +), +t1 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_subpoena + FROM season_separations ss + WHERE sub_stat_hist IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t2 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + ROUND( + AVG( + CASE + WHEN ss.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ss.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ss.history_date::timestamp - ss.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ss.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared + FROM season_separations ss +where ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t3 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_appeared + FROM season_separations ss + WHERE ss.sub_stat_hist IN ('4.1', '4.2') and ss.rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t4 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_appeared + FROM season_separations ss + WHERE sub_stat_hist = '5' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t5 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_ap_good_reason + FROM season_separations ss + WHERE sub_stat_hist = '5.1' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t6 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_ap_not_required + FROM season_separations ss + WHERE sub_stat_hist IN ('3.8', '5.2') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t7 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT recruit_id) AS count_restrictions_applied + FROM season_separations ss + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and ss.rn = 1 and ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t8 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT recruit_id) AS count_introduced_measures + FROM season_separations ss + WHERE status_applied = '11' and ss.rn = 1 and ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t9 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_paper + FROM season_separations ss + WHERE d_code != '7' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t10 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_electron + FROM season_separations ss + WHERE d_code = '7' and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t11 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT (DISTINCT ss.rdi_id) AS count_restrictions + FROM season_separations ss +where ss.rn_d = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t12 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS count_not_delivery + FROM season_separations ss + WHERE ss.act_number IS NOT NULL and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +), +t13 AS ( + SELECT + ss.recruitment_id, + ss.spring_autumn, + COUNT(DISTINCT ss.subpoena_id) AS appear_date_is_good + FROM season_separations ss + WHERE ss.sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and ss.rn = 1 + GROUP BY ss.recruitment_id, ss.spring_autumn +) +SELECT + current_date AS recording_date, + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appeared_percent, + ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_appeared_percent, + ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_ap_good_reason_percent, + ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS ap_not_required_percent, + ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS electron_percent, + ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS paper_percent, + ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS restrictions_applied_percent, + ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS introduced_measures_percent, + ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS not_delivery_percent, + ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2) AS appear_date_is_good_percent, + ss.recruitment_id, + 0 AS rest, + ss.spring_autumn +FROM season_separations_clean ss +LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id AND ss.spring_autumn = t1.spring_autumn +LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id AND ss.spring_autumn = t2.spring_autumn +LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id AND ss.spring_autumn = t3.spring_autumn +LEFT JOIN t4 ON ss.recruitment_id = t4.recruitment_id AND ss.spring_autumn = t4.spring_autumn +LEFT JOIN t5 ON ss.recruitment_id = t5.recruitment_id AND ss.spring_autumn = t5.spring_autumn +LEFT JOIN t6 ON ss.recruitment_id = t6.recruitment_id AND ss.spring_autumn = t6.spring_autumn +LEFT JOIN t7 ON ss.recruitment_id = t7.recruitment_id AND ss.spring_autumn = t7.spring_autumn +LEFT JOIN t8 ON ss.recruitment_id = t8.recruitment_id AND ss.spring_autumn = t8.spring_autumn +LEFT JOIN t9 ON ss.recruitment_id = t9.recruitment_id AND ss.spring_autumn = t9.spring_autumn +LEFT JOIN t10 ON ss.recruitment_id = t10.recruitment_id AND ss.spring_autumn = t10.spring_autumn +LEFT JOIN t11 ON ss.recruitment_id = t11.recruitment_id AND ss.spring_autumn = t11.spring_autumn +LEFT JOIN t12 ON ss.recruitment_id = t12.recruitment_id AND ss.spring_autumn = t12.spring_autumn +LEFT JOIN t13 ON ss.recruitment_id = t13.recruitment_id AND ss.spring_autumn = t13.spring_autumn + Y + + + 464 + 400 + + + + Update recruitment_campaign.subpoenas + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + + + appeared + count_appeared + + + not_appeared + count_not_appeared + + + not_ap_good_reason + count_not_ap_good_reason + + + ap_not_required + count_ap_not_required + + + restrictions_applied + count_restrictions_applied + + + appeared_percent + appeared_percent + + + not_appeared_percent + not_appeared_percent + + + not_ap_good_reason_percent + not_ap_good_reason_percent + + + ap_not_required_percent + ap_not_required_percent + + + restrictions_applied_percent + restrictions_applied_percent + + + introduced_measures + count_introduced_measures + + + introduced_measures_percent + introduced_measures_percent + + + count_not_delivery + count_not_delivery + + + appear_date_is_good + appear_date_is_good + + + not_delivery_percent + not_delivery_percent + + + appear_date_is_good_percent + appear_date_is_good_percent + +
+ N + Y + + + 1056 + 400 + +
+ + + +
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl new file mode 100644 index 0000000..70e64bc --- /dev/null +++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination.hpl @@ -0,0 +1,126 @@ + + + + recruitment_season_combination + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 14:06:15.043 + - + 2025/03/20 14:06:15.043 + + + + + + Table input (person_registry) регион/осень + Insert / update (recruitment_campaign.subpoenas) + Y + + + + Insert / update (recruitment_campaign.subpoenas) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + + = + recording_date + recording_date + + + + = + spring_autumn + spring_autumn + + + recruitment_campaign + subpoenas
+ + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + recording_date + recording_date + N + +
+ N + + + 1168 + 304 + +
+ + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +season_separations AS ( + SELECT 'Весна' AS spring_autumn + UNION ALL + SELECT 'Осень' AS spring_autumn +) +SELECT + current_date AS recording_date, + i.recruitment_id AS recruitment_id, + ss.spring_autumn +FROM ids i +CROSS JOIN season_separations ss + Y + + + 624 + 304 + + + + + +
diff --git a/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl new file mode 100644 index 0000000..63a90b4 --- /dev/null +++ b/map_v1/mil_com/recruitment_campaign.subpoenas(m_c)/recruitment_season_combination_uniq.hpl @@ -0,0 +1,124 @@ + + + + recruitment_season_combination_uniq + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/20 14:06:15.043 + - + 2025/03/20 14:06:15.043 + + + + + + Table input (person_registry) регион/осень + Insert / update (recruitment_campaign.subpoenas) + Y + + + + Insert / update (recruitment_campaign.subpoenas) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + + = + recording_date + recording_date + + + + = + spring_autumn + spring_autumn + + + recruitment_campaign + subpoenas
+ + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + recording_date + recording_date + N + +
+ N + + + 1056 + 320 + +
+ + Table input (person_registry) регион/осень + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH ids AS ( + -- Весенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_SP}'), ''), ','))::uuid AS recruitment_id, + 'Весна' AS spring_autumn + UNION ALL + -- Осенние ID + SELECT unnest(string_to_array(nullif(trim(both '{}' from '${ARR_MC_AU}'), ''), ','))::uuid AS recruitment_id, + 'Осень' AS spring_autumn +) +SELECT + current_date AS recording_date, + i.recruitment_id AS recruitment_id, + i.spring_autumn +FROM ids i; + Y + + + 512 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl new file mode 100644 index 0000000..b3e8207 --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hpl @@ -0,0 +1,548 @@ + + + + total_registered.age(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 2 + Select values 3 2 2 + N + + + Table input (person_registry) регион/мужчины + Get variables 3 2 2 + N + + + Select values 3 2 2 + Insert / update (total_registered.age) 2 + N + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Get variables 3 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1536 + 800 + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Select values 3 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1680 + 800 + + + + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf new file mode 100644 index 0000000..ebf664d --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age(m_c).hwf @@ -0,0 +1,312 @@ + + + total_registered.age(m_c) + Y + + + + - + 2025/04/01 09:55:15.265 + - + 2025/04/01 09:55:15.265 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 544 + 400 + + + + total_registered.age_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 992 + 240 + + + + total_registered.age_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 992 + 320 + + + + total_registered.age_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 992 + 400 + + + + total_registered.age_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 992 + 480 + + + + total_registered.age_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl + + + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + + Y + + Y + local + N + N + Y + N + 992 + 560 + + + + Success + + SUCCESS + + N + 1200 + 240 + + + + Success 2 + + SUCCESS + + N + 1200 + 320 + + + + Success 3 + + SUCCESS + + N + 1200 + 400 + + + + Success 4 + + SUCCESS + + N + 1200 + 480 + + + + Success 5 + + SUCCESS + + N + 1200 + 560 + + + + + + Start + total_registered.age_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.age_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.age_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.age_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.age_pr5(m_c).hpl + Y + Y + Y + + + total_registered.age_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.age_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.age_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.age_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.age_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl new file mode 100644 index 0000000..7c7627d --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr1(m_c).hpl @@ -0,0 +1,446 @@ + + + + total_registered.age_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl new file mode 100644 index 0000000..b5ad7ee --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr2(m_c).hpl @@ -0,0 +1,446 @@ + + + + total_registered.age_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl new file mode 100644 index 0000000..3e7ed5b --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr3(m_c).hpl @@ -0,0 +1,446 @@ + + + + total_registered.age_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl new file mode 100644 index 0000000..e618ef4 --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr4(m_c).hpl @@ -0,0 +1,446 @@ + + + + total_registered.age_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl new file mode 100644 index 0000000..d016ad4 --- /dev/null +++ b/map_v1/mil_com/total_registered.age(m_c)/total_registered.age_pr5(m_c).hpl @@ -0,0 +1,446 @@ + + + + total_registered.age_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регион/мужчины + Insert / update (total_registered.age) 2 + Y + + + + Insert / update (total_registered.age) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 41-45_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1920 + 720 + +
+ + Table input (person_registry) регион/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +recruit_data AS ( + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'false' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + + UNION ALL + + SELECT + r.id, + ri.recruit_id AS recruit_id, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + 'ALL' AS convicts, + 'true' AS registered, + r.birth_date + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + +), +total_count AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +total_count_all AS ( + SELECT + rd.recruitment_id, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.registered, rd.convicts +), +age_counts AS ( + SELECT + rd.recruitment_id, + rd.gender, + rd.registered, + rd.convicts, + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.registered, rd.convicts +), +age_counts_all AS ( + SELECT + r.recruitment_id, + r.registered, + r.convicts, + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count", + COUNT(distinct r.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count" + FROM recruit_data r + GROUP BY r.recruitment_id, r.registered, r.convicts +) +SELECT + current_date AS recording_date, + COALESCE(ac."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent", + COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(ac."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tc.total, 0) AS total_count, + tc.recruitment_id, + (CASE + WHEN tc.gender = 'MALE' THEN 'M' + ELSE 'W' + END)::text AS gender, + tc.convicts, + tc.registered::text +FROM total_count tc +LEFT JOIN age_counts ac + ON ac.recruitment_id = tc.recruitment_id + AND ac.gender = tc.gender + AND ac.registered = tc.registered + AND ac.convicts = tc.convicts +UNION ALL +SELECT + current_date AS recording_date, + COALESCE(aca."17_year_count", 0) AS "17_year_count", + COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent", + COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count", + COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent", + COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count", + COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent", + COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count", + COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent", + COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count", + COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent", + COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count", + COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent", + COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count", + COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent", + COALESCE(aca."51+_year_count", 0) AS "51+_year_count", + COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent", + COALESCE(tca.total, 0) AS total_count, + tca.recruitment_id, + 'ALL' AS gender, + tca.convicts, + tca.registered::text +FROM total_count_all tca +LEFT JOIN age_counts_all aca + ON aca.recruitment_id = tca.recruitment_id + AND aca.registered = tca.registered + AND aca.convicts = tca.convicts + Y + + + 1296 + 720 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl new file mode 100644 index 0000000..7d13e7a --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hpl @@ -0,0 +1,691 @@ + + + + total_registered.busyness(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 2 + Select values 3 2 2 + N + + + Select values 3 2 2 + Insert / update (total_registered.busyness) 2 + N + + + Table input (person_registry) РФ/мужчины + Get variables 3 2 2 + N + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Get variables 3 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1568 + 624 + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Select values 3 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1712 + 624 + + + + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf new file mode 100644 index 0000000..8c60f83 --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness(m_c).hwf @@ -0,0 +1,309 @@ + + + total_registered.busyness(m_c) + Y + + + + - + 2025/04/01 10:45:43.074 + - + 2025/04/01 10:45:43.074 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 704 + 432 + + + + total_registered.busyness_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1088 + 272 + + + + total_registered.busyness_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1088 + 352 + + + + total_registered.busyness_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1088 + 432 + + + + total_registered.busyness_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1088 + 512 + + + + total_registered.busyness_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1088 + 592 + + + + Success + + SUCCESS + + N + 1360 + 272 + + + + Success 2 + + SUCCESS + + N + 1360 + 352 + + + + Success 3 + + SUCCESS + + N + 1360 + 432 + + + + Success 4 + + SUCCESS + + N + 1360 + 512 + + + + Success 5 + + SUCCESS + + N + 1360 + 592 + + + + + + Start + total_registered.busyness_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.busyness_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.busyness_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.busyness_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.busyness_pr5(m_c).hpl + Y + Y + Y + + + total_registered.busyness_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.busyness_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.busyness_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.busyness_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.busyness_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl new file mode 100644 index 0000000..0903778 --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr1(m_c).hpl @@ -0,0 +1,589 @@ + + + + total_registered.busyness_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl new file mode 100644 index 0000000..875eb9c --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr2(m_c).hpl @@ -0,0 +1,589 @@ + + + + total_registered.busyness_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl new file mode 100644 index 0000000..fac1d1f --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr3(m_c).hpl @@ -0,0 +1,589 @@ + + + + total_registered.busyness_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl new file mode 100644 index 0000000..d7232f1 --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr4(m_c).hpl @@ -0,0 +1,589 @@ + + + + total_registered.busyness_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl new file mode 100644 index 0000000..acd579b --- /dev/null +++ b/map_v1/mil_com/total_registered.busyness(m_c)/total_registered.busyness_pr5(m_c).hpl @@ -0,0 +1,589 @@ + + + + total_registered.busyness_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.busyness) 2 + Y + + + + Insert / update (total_registered.busyness) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + recording_date + recording_date + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + convicts + convicts + N + +
+ Y + + + 1968 + 544 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + -- Преобразуем строковый массив в таблицу UUID + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +status_info AS ( + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + AND kolledzh->'svedObrProg'->>'kodFormaObuch'='1' + ) + + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'true' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + r.id AS recruit_id, + -- Проверка на обучение в вузе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz + WHERE vuz->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_vuz, + + -- Проверка на обучение в колледже (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh + WHERE kolledzh->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_college, + + -- Проверка на обучение в школе (есть информация и обучается) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedSHkola'->'shkola') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedSHkola'->'shkola') AS school + WHERE school->>'kodStatus' IN ( + '1', -- Обучается + '2', -- Восстановлен + '4' -- Отпуск + ) + ) + ELSE false + END + ) AS is_studying_in_school, + + -- Проверка на работу (есть информация и работает) + ( + CASE + WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array' THEN + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud + WHERE trud->>'prAktMestRab' = '1' + ) + ELSE false + END + ) AS is_working, + + -- Проверка на самозанятого (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedNPD'->'npd'->'aktNPD' != 'null' THEN true + ELSE false + END + ) AS is_samozanyat, + + -- Проверка на ИП (есть информация) + ( + CASE + WHEN jsonb_typeof(ri.info->'svedFL'->'svedRegIP'->'regIP'->'aktRegIP') = 'array' THEN true + ELSE false + END + ) AS is_ip, + + -- Проверка на КФХ (есть информация) + ( + CASE + WHEN ri.info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' != 'null' THEN true + ELSE false + END + ) AS is_kfh, + + + -- Проверка на отсутствие сведений о вузе + info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' AND jsonb_typeof(info->'svedFL'->'svedVUZ') != 'array' AS no_info_vuz, + + -- Проверка на отсутствие сведений о колледже + info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' AND jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') != 'array' AS no_info_college, + + -- Проверка на отсутствие сведений о школе + info->'svedFL'->'svedSHkola'->>'prOtsSvedSHkola' = '1' AND jsonb_typeof(info->'svedFL'->'svedSHkola') != 'array' AS no_info_school, + + -- Проверка на отсутствие сведений о работе + info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' AND jsonb_typeof(info->'svedFL'->'svedTrud') != 'array' AS no_info_work, + + -- Проверка на отсутствие сведений о самозанятых + info->'svedFL'->'svedNPD'->'npd'->'aktNPD' is null OR info->'svedFL'->'svedNPD'->'npd'->'aktNPD' = 'null' AS no_info_samozanyat, + + -- Проверка на отсутствие сведений об ip + info->'svedFL'->'svedRegIP'->>'prOtsRegIP' = '1' AND jsonb_typeof(info->'svedFL'->'svedRegIP') != 'array' AS no_info_ip, + + -- Проверка на отсутствие сведений о KFH + info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' = 'null' OR info->'svedFL'->'svedRabotodat'->'rabotodat'->'aktRabotodat'->'svedGlKFH' is null AS no_info_kfh, + + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + 'false' AS registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history AS rh on rh.recruit_id = r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) + AND rh.id in (SELECT recruit_history_id FROM notregistered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null +), +summary AS ( + SELECT + si.recruitment_id, + CASE WHEN si.gender = 'MALE' THEN 'M' ELSE 'W' END AS gender, + si.convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.convicts, si.registered + + UNION ALL + + SELECT + si.recruitment_id, + CASE + WHEN si.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + 'ALL' AS convicts, + si.registered, + + -- Количество людей, которые учатся + COUNT(CASE WHEN is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school THEN 1 END) AS study, + + -- Количество людей, которые работают (но не учатся) + COUNT(CASE WHEN (is_working OR is_samozanyat OR is_ip OR is_kfh) + AND NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school) + THEN 1 END) AS work, + + /*-- Количество людей, для которых отсутствуют сведения о вузе, колледже, школе и работе + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR is_working OR is_samozanyat OR is_ip OR is_kfh) THEN 1 END) AS no_info, +*/ + -- Количество людей, для которых нет информации + COUNT(CASE WHEN NOT (is_studying_in_vuz OR is_studying_in_college OR is_studying_in_school OR + is_working OR is_samozanyat OR is_ip OR is_kfh) + THEN 1 END) AS no_info, + + -- Общее количество людей + COUNT(si.recruit_id) AS total_people + FROM status_info si + GROUP BY si.recruitment_id, si.gender, si.registered +), +summary_all AS ( + SELECT + recruitment_id, + registered, + convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered, convicts + + UNION ALL + + SELECT + recruitment_id, + registered, + 'ALL' AS convicts, + 'ALL' AS gender, + SUM(study) AS study, + SUM(work) AS work, + SUM(no_info) AS no_info, + SUM(total_people) AS total_people + FROM summary + GROUP BY recruitment_id, registered +) +SELECT + current_date AS recording_date, + s.convicts, + s.gender, + s.registered, + s.recruitment_id, + s.study, + s.work, + s.no_info, + s.total_people, + + -- Процент людей, которые учатся + ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent +FROM summary s +UNION ALL +SELECT + current_date AS recording_date, + sa.convicts, + sa.gender, + sa.registered, + sa.recruitment_id, + sa.study, + sa.work, + sa.no_info, + sa.total_people, + + -- Процент людей, которые учатся + ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + + -- Процент людей, которые работают + ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + + -- Процент людей, для которых отсутствуют сведения + ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent +FROM summary_all sa + Y + + + 1328 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl new file mode 100644 index 0000000..66817de --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hpl @@ -0,0 +1,424 @@ + + + + total_registered.child_minor(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + N + + + Table input (person_registry)регион/все + Get variables 4 2 + N + + + Select values 4 2 + Insert / update (total_registered.child_minor) 3 + N + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1056 + 480 + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1248 + 480 + + + + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf new file mode 100644 index 0000000..a5570dd --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor(m_c).hwf @@ -0,0 +1,312 @@ + + + total_registered.child_minor(m_c) + Y + + + + - + 2025/03/31 17:47:01.214 + - + 2025/03/31 17:47:01.214 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 640 + 496 + + + + total_registered.child_minor_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 976 + 336 + + + + total_registered.child_minor_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 976 + 416 + + + + total_registered.child_minor_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 976 + 496 + + + + total_registered.child_minor_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 976 + 576 + + + + total_registered.child_minor_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl + + + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + + Y + + Y + local + N + N + Y + N + 976 + 656 + + + + Success + + SUCCESS + + N + 1280 + 336 + + + + Success 2 + + SUCCESS + + N + 1280 + 416 + + + + Success 3 + + SUCCESS + + N + 1280 + 496 + + + + Success 4 + + SUCCESS + + N + 1280 + 576 + + + + Success 5 + + SUCCESS + + N + 1280 + 656 + + + + + + Start + total_registered.child_minor_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.child_minor_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.child_minor_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.child_minor_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.child_minor_pr5(m_c).hpl + Y + Y + Y + + + total_registered.child_minor_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.child_minor_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.child_minor_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.child_minor_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.child_minor_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl new file mode 100644 index 0000000..1bf758f --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr1(m_c).hpl @@ -0,0 +1,322 @@ + + + + total_registered.child_minor_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl new file mode 100644 index 0000000..fb8302b --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr2(m_c).hpl @@ -0,0 +1,322 @@ + + + + total_registered.child_minor_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl new file mode 100644 index 0000000..8fd266a --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr3(m_c).hpl @@ -0,0 +1,322 @@ + + + + total_registered.child_minor_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl new file mode 100644 index 0000000..68988de --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr4(m_c).hpl @@ -0,0 +1,322 @@ + + + + total_registered.child_minor_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl new file mode 100644 index 0000000..86bce7f --- /dev/null +++ b/map_v1/mil_com/total_registered.child_minor(m_c)/total_registered.child_minor_pr5(m_c).hpl @@ -0,0 +1,322 @@ + + + + total_registered.child_minor_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry)регион/все + Insert / update (total_registered.child_minor) 3 + Y + + + + Insert / update (total_registered.child_minor) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1504 + 368 + +
+ + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +vse AS ( + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') + + UNION ALL + + SELECT + r.id, + ri.recruit_id, + --COALESCE(r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.current_recruitment_id AS recruitment_id, + r.gender, + 'ALL' AS convicts, + ri.info + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh ON rh.recruit_id = r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id IN (SELECT recruit_id FROM registered) + AND rh.id IN (SELECT recruit_history_id FROM registered) + AND COALESCE(r.current_recruitment_id, rh.current_recruitment_id)::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') +), +extracted_children AS( + SELECT + distinct + ri.recruit_id, + jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child + FROM vse ri + WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array' +), +children_count AS ( + SELECT + recruit_id, + COUNT(*) FILTER ( + WHERE make_date( + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int, + (child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int + ) > CURRENT_DATE - INTERVAL '18 years' + ) AS children_under_18 + FROM + extracted_children + GROUP BY + recruit_id +), +gender_and_recruitment_data AS ( + SELECT + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END gender, + r.convicts, + r.recruitment_id, + COUNT(r.recruit_id) AS total_count, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children, + COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS no_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS one_child_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS two_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS three_children_percent, + ROUND(COUNT(r.recruit_id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.recruit_id), 0), 2) AS four_or_more_children_percent + FROM vse r + LEFT JOIN children_count cc + ON r.recruit_id = cc.recruit_id + GROUP BY + r.gender, + r.convicts, + r.recruitment_id +) +SELECT + current_date AS recording_date, + gender, + recruitment_id, + convicts, + total_count, + no_children, + one_child, + two_children, + three_children, + four_or_more_children, + COALESCE(ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data + +UNION ALL + +SELECT + current_date AS recording_date, + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total_count) AS total_count, + SUM(no_children) AS no_children, + SUM(one_child) AS one_child, + SUM(two_children) AS two_children, + SUM(three_children) AS three_children, + SUM(four_or_more_children) AS four_or_more_children, + COALESCE(ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS no_children_percent, + COALESCE(ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS one_child_percent, + COALESCE(ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS two_children_percent, + COALESCE(ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS three_children_percent, + COALESCE(ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2), 0) AS four_or_more_children_percent +FROM + gender_and_recruitment_data +GROUP BY recruitment_id, convicts + Y + + + 816 + 368 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl new file mode 100644 index 0000000..06ee25d --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hpl @@ -0,0 +1,414 @@ + + + + total_registered.driver_license(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + N + + + Select values 3 2 + Insert / update (total_registered.driver_license) 2 + N + + + Table input (driver_license) регионы/все + Get variables 3 2 + N + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 960 + 496 + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1104 + 496 + + + + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf new file mode 100644 index 0000000..a5e579d --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license(m_c).hwf @@ -0,0 +1,309 @@ + + + total_registered.driver_license(m_c) + Y + + + + - + 2025/03/31 17:29:01.571 + - + 2025/03/31 17:29:01.571 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 592 + 400 + + + + total_registered.driver_license_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1088 + 240 + + + + total_registered.driver_license_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1088 + 320 + + + + total_registered.driver_license_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1088 + 400 + + + + total_registered.driver_license_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1088 + 480 + + + + total_registered.driver_license_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1088 + 560 + + + + Success + + SUCCESS + + N + 1520 + 240 + + + + Success 2 + + SUCCESS + + N + 1520 + 320 + + + + Success 3 + + SUCCESS + + N + 1520 + 400 + + + + Success 4 + + SUCCESS + + N + 1520 + 480 + + + + Success 5 + + SUCCESS + + N + 1520 + 560 + + + + + + Start + total_registered.driver_license_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.driver_license_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.driver_license_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.driver_license_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.driver_license_pr5(m_c).hpl + Y + Y + Y + + + total_registered.driver_license_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.driver_license_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.driver_license_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.driver_license_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.driver_license_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl new file mode 100644 index 0000000..499784b --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr1(m_c).hpl @@ -0,0 +1,312 @@ + + + + total_registered.driver_license_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl new file mode 100644 index 0000000..123f382 --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr2(m_c).hpl @@ -0,0 +1,312 @@ + + + + total_registered.driver_license_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl new file mode 100644 index 0000000..a80fbf3 --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr3(m_c).hpl @@ -0,0 +1,312 @@ + + + + total_registered.driver_license_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl new file mode 100644 index 0000000..b8ebe8a --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr4(m_c).hpl @@ -0,0 +1,312 @@ + + + + total_registered.driver_license_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl new file mode 100644 index 0000000..33620bb --- /dev/null +++ b/map_v1/mil_com/total_registered.driver_license(m_c)/total_registered.driver_license_pr5(m_c).hpl @@ -0,0 +1,312 @@ + + + + total_registered.driver_license_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (driver_license) регионы/все + Insert / update (total_registered.driver_license) 2 + Y + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + nope_repcent + nope_percent + Y + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1264 + 384 + +
+ + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +categorized AS ( + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender + + UNION ALL + + SELECT + r.id, + r.gender, + r.current_recruitment_id AS recruitment_id, + 'ALL' AS convicts, + MAX(CASE WHEN cat->>'naimKatTS' like '%A%' THEN 1 ELSE 0 END) AS has_A, + MAX(CASE WHEN cat->>'naimKatTS' like '%B%' THEN 1 ELSE 0 END) AS has_B, + MAX(CASE WHEN cat->>'naimKatTS' like '%C%' THEN 1 ELSE 0 END) AS has_C, + MAX(CASE WHEN cat->>'naimKatTS' like '%D%' THEN 1 ELSE 0 END) AS has_D, + MAX(CASE WHEN cat->>'naimKatTS' like '%E%' THEN 1 ELSE 0 END) AS has_E, + MAX(CASE WHEN cat->>'naimKatTS' like '%M%' THEN 1 ELSE 0 END) AS has_M, -- мопеды + MAX(CASE WHEN cat->>'naimKatTS' like '%T%' THEN 1 ELSE 0 END) AS has_T -- трамваи и троллейбусы + FROM public.recruits AS r + JOIN public.recruits_info ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + LEFT JOIN jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) +/* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + AND r.gender IN ('MALE', 'FEMALE') -- Исключаем NULL + GROUP BY r.id, r.gender +), +aggregated AS ( + SELECT + current_date AS recording_date, + CASE + WHEN r.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + r.convicts, + r.recruitment_id, + -- Считаем количество уникальных рекрутов с каждой категорией + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.gender, r.recruitment_id, r.convicts +), +aggregated_all AS ( + SELECT + current_date AS recording_date, + 'ALL' AS gender, + r.convicts, + r.recruitment_id, + COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a, + COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b, + COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c, + COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d, + COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e, + COUNT(DISTINCT r.id) FILTER (WHERE (has_A + has_B + has_C + has_D + has_E = 0) OR ((has_M + has_T > 0) AND (has_A + has_B + has_C + has_D + has_E = 0))) AS nope, -- условие от 14.03.2025 + COUNT(DISTINCT r.id) AS total + FROM categorized r + GROUP BY r.recruitment_id, r.convicts +) + +-- Объединение результатов с вычислением процентов +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated +UNION ALL +SELECT + *, + COALESCE(ROUND((a * 100.0) / NULLIF(total, 0), 2), 0) AS a_percent, + COALESCE(ROUND((b * 100.0) / NULLIF(total, 0), 2), 0) AS b_percent, + COALESCE(ROUND((c * 100.0) / NULLIF(total, 0), 2), 0) AS c_percent, + COALESCE(ROUND((d * 100.0) / NULLIF(total, 0), 2), 0) AS d_percent, + COALESCE(ROUND((e * 100.0) / NULLIF(total, 0), 2), 0) AS e_percent, + COALESCE(ROUND((nope * 100.0) / NULLIF(total, 0), 2), 0) AS nope_percent +FROM aggregated_all + Y + + + 800 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl new file mode 100644 index 0000000..39bed0f --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hpl @@ -0,0 +1,452 @@ + + + + total_registered.education_level(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 2 + Select values 3 2 2 + N + + + Table input (person_registry) РФ/мужчины + Get variables 3 2 2 + N + + + Select values 3 2 2 + Insert / update (total_registered.education_level) 2 + N + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Get variables 3 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1328 + 624 + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Select values 3 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1472 + 624 + + + + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf new file mode 100644 index 0000000..d2032bb --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level(m_c).hwf @@ -0,0 +1,309 @@ + + + total_registered.education_level(m_c) + Y + + + + - + 2025/04/01 10:26:22.205 + - + 2025/04/01 10:26:22.205 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 624 + 432 + + + + total_registered.education_level_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1088 + 272 + + + + total_registered.education_level_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1088 + 352 + + + + total_registered.education_level_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1088 + 432 + + + + total_registered.education_level_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1088 + 512 + + + + total_registered.education_level_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1088 + 592 + + + + Success + + SUCCESS + + N + 1360 + 272 + + + + Success 2 + + SUCCESS + + N + 1360 + 352 + + + + Success 3 + + SUCCESS + + N + 1360 + 432 + + + + Success 4 + + SUCCESS + + N + 1360 + 512 + + + + Success 5 + + SUCCESS + + N + 1360 + 592 + + + + + + Start + total_registered.education_level_pr1(m_c).hpl + Y + Y + Y + + + total_registered.education_level_pr1(m_c).hpl + Success + Y + Y + N + + + Start + total_registered.education_level_pr2(m_c).hpl + Y + Y + Y + + + total_registered.education_level_pr2(m_c).hpl + Success 2 + Y + Y + N + + + Start + total_registered.education_level_pr3(m_c).hpl + Y + Y + Y + + + total_registered.education_level_pr3(m_c).hpl + Success 3 + Y + Y + N + + + Start + total_registered.education_level_pr4(m_c).hpl + Y + Y + Y + + + total_registered.education_level_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.education_level_pr5(m_c).hpl + Success 5 + Y + Y + N + + + Start + total_registered.education_level_pr5(m_c).hpl + Y + Y + Y + + + + + + diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl new file mode 100644 index 0000000..625f5ac --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr1(m_c).hpl @@ -0,0 +1,350 @@ + + + + total_registered.education_level_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl new file mode 100644 index 0000000..01c5120 --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr2(m_c).hpl @@ -0,0 +1,350 @@ + + + + total_registered.education_level_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl new file mode 100644 index 0000000..2d28874 --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr3(m_c).hpl @@ -0,0 +1,350 @@ + + + + total_registered.education_level_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl new file mode 100644 index 0000000..9e18fa4 --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr4(m_c).hpl @@ -0,0 +1,350 @@ + + + + total_registered.education_level_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl new file mode 100644 index 0000000..e5cb4e6 --- /dev/null +++ b/map_v1/mil_com/total_registered.education_level(m_c)/total_registered.education_level_pr5(m_c).hpl @@ -0,0 +1,350 @@ + + + + total_registered.education_level_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 + Y + + + + Insert / update (total_registered.education_level) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + convicts + convicts + N + +
+ Y + + + 1728 + 496 + +
+ + Table input (person_registry) РФ/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +education_status AS ( + SELECT + ri.id, + ri.recruit_id AS recruit_id, + coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + -- Высшее образование (российское или иностранное) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5') + ) + ) AS has_higher, + + -- Среднее профессиональное образование (если нет высшего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('6', '8', '10', '11') + ) + ) AS has_average_prof, + + -- Общее образование (если нет высшего и среднего) + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + AND education->>'kodUrObr' IN ('7', '9') + ) + ) AS has_only_general, + + -- Нет данных об образовании (российское или иностранное) + ( + NOT ( + ( + EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array' + ) OR EXISTS ( + SELECT 1 + FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education + WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array' + ) + ) + ) AND ( + ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' + OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1' + ) + ) AS has_no_data + + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + join public.recruits_history rh on rh.recruit_id=r.id + WHERE + r.gender IN ('MALE', 'FEMALE') + AND r.id in (SELECT recruit_id FROM registered) + AND rh.id in (SELECT recruit_history_id FROM registered) + -- AND r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + AND coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +), +final_counts AS ( + SELECT + es.gender, + es.recruitment_id, + es.convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender, es.convicts + + UNION ALL + + SELECT + es.gender, + es.recruitment_id, + 'ALL' AS convicts, + COUNT(DISTINCT es.id) AS total, + COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof, + COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general, + COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata + FROM education_status es + GROUP BY es.recruitment_id, es.gender +), +final_counts_all AS ( + SELECT + 'ALL' AS gender, + recruitment_id, + convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id, convicts + + UNION ALL + + SELECT + 'ALL' AS gender, + recruitment_id, + 'ALL' AS convicts, + SUM(total) AS total, + SUM(higher) AS higher, + SUM(average_prof) AS average_prof, + SUM(only_general) AS only_general, + SUM(count_nodata) AS count_nodata + FROM final_counts + GROUP BY recruitment_id +) +SELECT + current_date AS recording_date, + CASE + WHEN fc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + fc.convicts, + fc.recruitment_id, + fc.higher, + fc.average_prof, + fc.only_general, + fc.count_nodata, + fc.total, + COALESCE(ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts fc +UNION ALL +SELECT + current_date AS recording_date, + fca.gender, + fca.convicts, + fca.recruitment_id, + fca.higher, + fca.average_prof, + fca.only_general, + fca.count_nodata, + fca.total, + COALESCE(ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2), 0) AS higher_percentage, + COALESCE(ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2), 0) AS average_prof_percentage, + COALESCE(ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2), 0) AS only_general_percentage, + COALESCE(ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2), 0) AS count_nodata_percentage +FROM final_counts_all fca + Y + + + 1072 + 496 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl new file mode 100644 index 0000000..e285fa4 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hpl @@ -0,0 +1,372 @@ + + + + total_registered.marital_status(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 2 + Select values 3 2 2 + N + + + Table input (person_registry) регионы/мужчины + Get variables 3 2 2 + N + + + Select values 3 2 2 + Insert / update (total_registered.marital_status) 2 + N + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Get variables 3 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1280 + 624 + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Select values 3 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1424 + 624 + + + + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf new file mode 100644 index 0000000..85f6e93 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status(m_c).hwf @@ -0,0 +1,312 @@ + + + total_registered.marital_status(m_c) + Y + + + + - + 2025/04/01 10:07:53.719 + - + 2025/04/01 10:07:53.719 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 512 + 416 + + + + total_registered.marital_status_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 896 + 256 + + + + total_registered.marital_status_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 896 + 336 + + + + total_registered.marital_status_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 896 + 416 + + + + total_registered.marital_status_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 896 + 496 + + + + total_registered.marital_status_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl + + + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + + Y + + Y + local + N + N + Y + N + 896 + 576 + + + + Success + + SUCCESS + + N + 1264 + 256 + + + + Success 2 + + SUCCESS + + N + 1264 + 336 + + + + Success 3 + + SUCCESS + + N + 1264 + 416 + + + + Success 4 + + SUCCESS + + N + 1264 + 496 + + + + Success 5 + + SUCCESS + + N + 1264 + 576 + + + + + + Start + total_registered.marital_status_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.marital_status_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.marital_status_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.marital_status_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.marital_status_pr5(m_c).hpl + Y + Y + Y + + + total_registered.marital_status_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.marital_status_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.marital_status_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.marital_status_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.marital_status_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl new file mode 100644 index 0000000..cdf8016 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr1(m_c).hpl @@ -0,0 +1,270 @@ + + + + total_registered.marital_status_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl new file mode 100644 index 0000000..af10c10 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr2(m_c).hpl @@ -0,0 +1,270 @@ + + + + total_registered.marital_status_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl new file mode 100644 index 0000000..1dc80e3 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr3(m_c).hpl @@ -0,0 +1,270 @@ + + + + total_registered.marital_status_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl new file mode 100644 index 0000000..2401073 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr4(m_c).hpl @@ -0,0 +1,270 @@ + + + + total_registered.marital_status_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl new file mode 100644 index 0000000..47b4635 --- /dev/null +++ b/map_v1/mil_com/total_registered.marital_status(m_c)/total_registered.marital_status_pr5(m_c).hpl @@ -0,0 +1,270 @@ + + + + total_registered.marital_status_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) регионы/мужчины + Insert / update (total_registered.marital_status) 2 + Y + + + + Insert / update (total_registered.marital_status) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + other + other + Y + + + other_percent + other_percent + Y + + + convicts + convicts + N + +
+ Y + + + 1680 + 544 + +
+ + Table input (person_registry) регионы/мужчины + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +recruit_data AS ( + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ + + UNION ALL + + SELECT + ri.recruit_id, + ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh' AS sem_pol, + r.gender, + 'ALL' AS convicts, + r.current_recruitment_id AS recruitment_id + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + --JOIN public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND r.gender IN ('MALE', 'FEMALE') +/* + AND r.id in (SELECT recruit_id FROM registered) + and rh.id in (SELECT recruit_history_id FROM registered) + --and r.vu_current_info->>'recruitmentCommercialInfo' = 'true' + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) +*/ +), +married_counts AS ( + -- Считаем значения для каждого гендера + SELECT + rd.recruitment_id, + rd.gender, + rd.convicts, + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IN ('2', '3')) AS not_married, -- в расзводе/вдова/вдовец + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol = '1') AS married, -- статус в браке + COUNT(rd.recruit_id) FILTER (WHERE rd.sem_pol IS NULL) AS other, + COUNT(rd.recruit_id) AS total + FROM recruit_data rd + GROUP BY rd.recruitment_id, rd.gender, rd.convicts -- изменено 12.03.2025 +), +all_counts AS ( + -- Считаем значения для ALL, суммируя данные по всем гендерам + SELECT + recruitment_id, + 'ALL' AS gender, + convicts, + SUM(not_married) AS not_married, + SUM(married) AS married, + SUM(other) AS other, + SUM(total) AS total + FROM married_counts + GROUP BY recruitment_id, convicts +) +-- Финальное объединение +SELECT + mc.not_married, + mc.married, + mc.total, + mc.other, + mc.convicts, + COALESCE(ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2), 0) AS other_percent, + CASE + WHEN mc.gender = 'MALE' THEN 'M' + ELSE 'W' + END AS gender, + current_date AS recording_date, + mc.recruitment_id +FROM married_counts mc +UNION ALL +SELECT + ac.not_married, + ac.married, + ac.total, + ac.other, + ac.convicts, + COALESCE(ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS not_married_percent, + COALESCE(ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2), 0) AS married_percent, + COALESCE(ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2), 0) AS other_percent, + ac.gender, + current_date AS recording_date, + ac.recruitment_id +FROM all_counts ac + Y + + + 1040 + 544 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl new file mode 100644 index 0000000..c26f394 --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hpl @@ -0,0 +1,453 @@ + + + + total_registered.reg_mil_cat(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 + Select values 3 + N + + + Table input (person_registry) военком/рег + Get variables 3 + N + + + Select values 3 + Insert / update (total_registered.reg_mil_cat) + N + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Get variables 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1008 + 464 + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Select values 3 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1152 + 464 + + + + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf new file mode 100644 index 0000000..56a73fb --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat(m_c).hwf @@ -0,0 +1,309 @@ + + + total_registered.reg_mil_cat(m_c) + Y + + + + - + 2025/03/31 15:05:31.181 + - + 2025/03/31 15:05:31.181 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 400 + 368 + + + + total_registered.reg_mil_cat_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 816 + 208 + + + + total_registered.reg_mil_cat_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 816 + 288 + + + + total_registered.reg_mil_cat_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + N + local + N + N + Y + N + 816 + 368 + + + + total_registered.reg_mil_cat_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 816 + 448 + + + + total_registered.reg_mil_cat_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 816 + 528 + + + + Success + + SUCCESS + + N + 1136 + 208 + + + + Success 2 + + SUCCESS + + N + 1136 + 288 + + + + Success 3 + + SUCCESS + + N + 1136 + 368 + + + + Success 4 + + SUCCESS + + N + 1136 + 448 + + + + Success 5 + + SUCCESS + + N + 1136 + 528 + + + + + + Start + total_registered.reg_mil_cat_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.reg_mil_cat_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.reg_mil_cat_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.reg_mil_cat_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.reg_mil_cat_pr5(m_c).hpl + Y + Y + Y + + + total_registered.reg_mil_cat_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.reg_mil_cat_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.reg_mil_cat_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.reg_mil_cat_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.reg_mil_cat_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl new file mode 100644 index 0000000..10a37aa --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr1(m_c).hpl @@ -0,0 +1,351 @@ + + + + total_registered.reg_mil_cat_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl new file mode 100644 index 0000000..5b82156 --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr2(m_c).hpl @@ -0,0 +1,351 @@ + + + + total_registered.reg_mil_cat_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl new file mode 100644 index 0000000..dfd56ef --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr3(m_c).hpl @@ -0,0 +1,351 @@ + + + + total_registered.reg_mil_cat_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl new file mode 100644 index 0000000..d3bba44 --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr4(m_c).hpl @@ -0,0 +1,351 @@ + + + + total_registered.reg_mil_cat_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl new file mode 100644 index 0000000..0cd012d --- /dev/null +++ b/map_v1/mil_com/total_registered.reg_mil_cat(m_c)/total_registered.reg_mil_cat_pr5(m_c).hpl @@ -0,0 +1,351 @@ + + + + total_registered.reg_mil_cat_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (person_registry) военком/рег + Insert / update (total_registered.reg_mil_cat) + Y + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + +
+ N + + + 1392 + 288 + +
+ + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +/* +last_status_r as (select recruit_id, + max(date_time) filter (where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13')) max_date_time + from recruits_history + where status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + group by recruit_id +), +registered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_r ls on rh.recruit_id=ls.recruit_id and rh.date_time=ls.max_date_time + where rh.status not in ('1', '1.3', '12', '12.1', '12.2', '12.3', '12.4', '12.5', '13') + --and rh.source is not null +), +*/ +last_status_n as (select recruit_id, + max(date_time) filter (where status in ('1', '12.7', '8.2', '8.3')) max_date_time + from recruits_history + where status in ('1', '12.7', '8.2', '8.3') + group by recruit_id +), +notregistered as ( + select + distinct rh.recruit_id, + rh.id as recruit_history_id + from recruits_history rh + join last_status_n ls on rh.recruit_id=ls. recruit_id and rh.date_time=ls.max_date_time + where rh.status in ('1', '12.7', '8.2', '8.3') +--and rh.source is not null +), +base_data AS ( + -- Основной набор данных с вычислением mil_reg + SELECT + r.registration_reasons, + r.gender, + r.current_recruitment_id AS recruitment_id, + --coalesce (r.current_recruitment_id, rh.current_recruitment_id) AS recruitment_id, + 1 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri + ON ri.recruit_id = r.id + --join public.recruits_history rh on rh.recruit_id=r.id + WHERE r.current_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + /* + r.id in (SELECT recruit_id FROM registered) and + rh.id in (SELECT recruit_history_id FROM registered) + and coalesce(r.current_recruitment_id,rh.current_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + */ + AND jsonb_exists_any(registration_reasons, ARRAY[ + '1', -- Освобождение из мест лишения свободы + '2', -- Приобретение гражданства Российской Федерации + '3', -- Получение военно-учётной специальности гражданином женского пола + '4', -- Отбывание наказания в местах лишения свободы + '5'--, -- Достижение 17 лет в год постановки на воинский учёт + --'6' -- Первоначальная постановка на воинский учет граждан, не состоящих, но обязанных состоять на воинском учёте + ]) + UNION ALL + SELECT + r.registration_reasons, + r.gender, + coalesce (r.target_recruitment_id, rh.target_recruitment_id) AS recruitment_id, + 0 AS is_military_registered + FROM public.recruits AS r + JOIN public.recruits_info AS ri ON ri.recruit_id = r.id + JOIN public.recruits_history rh ON rh.recruit_id=r.id + WHERE + r.id in (SELECT recruit_id FROM notregistered) and + rh.id in (SELECT recruit_history_id FROM notregistered) + and coalesce(r.target_recruitment_id,rh.target_recruitment_id) ::uuid IN (SELECT recruitment_id FROM ids) + AND r.current_recruitment_id is null + AND jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4', '5']) +), +t1 AS ( + -- Первоначальная постановка 17 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_17 + FROM base_data + WHERE registration_reasons @> '"5"' -- Достижение 17 лет в год постановки на воинский учёт + GROUP BY recruitment_id, is_military_registered +), +t2 AS ( + -- Первоначальная постановка 18 лет + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS first_reg_18 + FROM base_data + WHERE jsonb_exists_any(registration_reasons, ARRAY['1', '2', '3', '4']) + GROUP BY recruitment_id, is_military_registered +), +t3 AS ( + -- Женщины, получившие ВУС + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS mil_spec_w + FROM base_data + WHERE registration_reasons @> '"3"' AND gender = 'FEMALE' + GROUP BY recruitment_id, is_military_registered +), +t4 AS ( + -- Возвратившиеся из мест лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS returned_dep_liberty + FROM base_data + WHERE registration_reasons @> '"1"' + GROUP BY recruitment_id, is_military_registered +), +t5 AS ( + -- Отбывающие наказание в местах лишения свободы + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS punished + FROM base_data + WHERE registration_reasons @> '"4"' + GROUP BY recruitment_id, is_military_registered +), +t6 AS ( + -- Получившие гражданство + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS received_citizenship + FROM base_data + WHERE registration_reasons @> '"2"' + GROUP BY recruitment_id, is_military_registered +), +total AS ( + -- Общее количество записей + SELECT + recruitment_id, + is_military_registered, + COUNT(*) AS total_count + FROM base_data + GROUP BY recruitment_id, is_military_registered +), +uniq_ms AS ( + SELECT + distinct + recruitment_id, + is_military_registered + FROM base_data +) +-- Основной запрос +SELECT + current_date AS recording_date, + dc.recruitment_id, + dc.is_military_registered AS mil_reg, + COALESCE(total.total_count, 0) AS total_count, + COALESCE(t1.first_reg_17, 0) AS first_reg_17, + COALESCE(t2.first_reg_18, 0) AS first_reg_18, + COALESCE(t3.mil_spec_w, 0) AS mil_spec_w, + COALESCE(t4.returned_dep_liberty, 0) AS returned_dep_liberty, + COALESCE(t5.punished, 0) AS punished, + COALESCE(t6.received_citizenship, 0) AS received_citizenship, + -- Вычисление процентов + COALESCE(ROUND(COALESCE(t1.first_reg_17, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_17_percent, + COALESCE(ROUND(COALESCE(t2.first_reg_18, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS first_reg_18_percent, + COALESCE(ROUND(COALESCE(t4.returned_dep_liberty, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS returned_dep_liberty_percent, + COALESCE(ROUND(COALESCE(t3.mil_spec_w, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS mil_spec_w_percent, + COALESCE(ROUND(COALESCE(t5.punished, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS punished_percent, + COALESCE(ROUND(COALESCE(t6.received_citizenship, 0) * 100.0 / NULLIF(total.total_count, 0), 2), 0) AS received_citizenship_percent +FROM uniq_ms dc +LEFT JOIN total ON dc.recruitment_id = total.recruitment_id + AND dc.is_military_registered = total.is_military_registered +LEFT JOIN t1 ON dc.recruitment_id = t1.recruitment_id + AND dc.is_military_registered = t1.is_military_registered +LEFT JOIN t2 ON dc.recruitment_id = t2.recruitment_id + AND dc.is_military_registered = t2.is_military_registered +LEFT JOIN t3 ON dc.recruitment_id = t3.recruitment_id + AND dc.is_military_registered = t3.is_military_registered +LEFT JOIN t4 ON dc.recruitment_id = t4.recruitment_id + AND dc.is_military_registered = t4.is_military_registered +LEFT JOIN t5 ON dc.recruitment_id = t5.recruitment_id + AND dc.is_military_registered = t5.is_military_registered +LEFT JOIN t6 ON dc.recruitment_id = t6.recruitment_id + AND dc.is_military_registered = t6.is_military_registered; + Y + + + 736 + 288 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl new file mode 100644 index 0000000..2a0d1b3 --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hpl @@ -0,0 +1,348 @@ + + + + total_registered.removed_registry(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Get variables 2 2 + Select values 2 2 + N + + + Select values 2 2 + Insert / update (total_registered.removed_registry) 2 + N + + + Table input (decision-document-service) регион 2 + Get variables 2 2 + N + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 992 + 464 + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1120 + 464 + + + + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf new file mode 100644 index 0000000..840ccdf --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry(m_c).hwf @@ -0,0 +1,312 @@ + + + total_registered.removed_registry(m_c) + Y + + + + - + 2025/03/31 15:23:08.216 + - + 2025/03/31 15:23:08.216 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 800 + 368 + + + + total_registered.removed_registry_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1312 + 208 + + + + total_registered.removed_registry_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1312 + 288 + + + + total_registered.removed_registry_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1312 + 448 + + + + total_registered.removed_registry_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + Y + + Y + local + N + N + Y + N + 1312 + 368 + + + + total_registered.removed_registry_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl + + + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + + Y + + Y + local + N + N + Y + N + 1312 + 528 + + + + Success + + SUCCESS + + N + 1664 + 208 + + + + Success 2 + + SUCCESS + + N + 1664 + 288 + + + + Success 3 + + SUCCESS + + N + 1664 + 368 + + + + Success 4 + + SUCCESS + + N + 1664 + 448 + + + + Success 5 + + SUCCESS + + N + 1664 + 528 + + + + + + Start + total_registered.removed_registry_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.removed_registry_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.removed_registry_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.removed_registry_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.removed_registry_pr5(m_c).hpl + Y + Y + Y + + + total_registered.removed_registry_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.removed_registry_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.removed_registry_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.removed_registry_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.removed_registry_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl new file mode 100644 index 0000000..ae952b2 --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr1(m_c).hpl @@ -0,0 +1,246 @@ + + + + total_registered.removed_registry_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl new file mode 100644 index 0000000..81d9f8a --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr2(m_c).hpl @@ -0,0 +1,246 @@ + + + + total_registered.removed_registry_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl new file mode 100644 index 0000000..18a8ede --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr3(m_c).hpl @@ -0,0 +1,246 @@ + + + + total_registered.removed_registry_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl new file mode 100644 index 0000000..36e59b5 --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr4(m_c).hpl @@ -0,0 +1,246 @@ + + + + total_registered.removed_registry_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl new file mode 100644 index 0000000..1303b08 --- /dev/null +++ b/map_v1/mil_com/total_registered.removed_registry(m_c)/total_registered.removed_registry_pr5(m_c).hpl @@ -0,0 +1,246 @@ + + + + total_registered.removed_registry_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 904 + 118 + на 12.03.2025 статус 1.3 на тесте рубит все результаты + 303 + + + + + Table input (decision-document-service) регион 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + travel_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + +
+ N + + + 1408 + 320 + +
+ + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +recr AS ( + SELECT + r.id, + r.system_pgs_status + FROM recruits r + WHERE r.system_pgs_status = '1.3' +), +last_decision AS ( + SELECT + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.code + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY d.recruit_id ORDER BY d.created_at DESC) AS rn, + d.recruitment_id, + d.recruit_id, + d.extra_info, + d.created_at, + d.type->>'code' AS code + FROM decision d + WHERE d.recruitment_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год + ) d + WHERE rn = 1 -- ищем последнее решение для рекрута + AND d.code IN ('9', '10') + /*FROM decision d + WHERE EXTRACT(YEAR FROM d.created_at) = EXTRACT(YEAR FROM CURRENT_DATE) -- ищим записи на текущий год*/ +), +total_info AS ( + SELECT + d.recruitment_id, + COUNT(*) AS removed_registry, + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') AS age_limit, -- Количество по причине предельный возраст + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') AS death, -- Количество по причине смерть + --COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'citizenshipLost') AS deprivation_citizenship, -- лишение гражданства + COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) AS other, -- прочее + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'ageLimit') * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' = 'notAlive') * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, + ROUND(COUNT(*) FILTER (WHERE d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive', 'citizenshipLost')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent + FROM last_decision d + JOIN recr AS r ON d.recruit_id = r.id + GROUP BY d.recruitment_id +) +SELECT + current_date AS recording_date, + recruitment_id, + COALESCE(total_info.removed_registry, 0) AS removed_registry, + COALESCE(total_info.age_limit, 0) AS age_limit, + COALESCE(total_info.death, 0) AS death, + COALESCE(total_info.other, 0) AS other, + COALESCE(total_info.age_limit_percent, 0) AS age_limit_percent, + COALESCE(total_info.death_percent, 0) AS death_percent, + COALESCE(total_info.other_percent, 0) AS other_percent, + --deprivation_citizenship, + '0' AS deprivation_citizenship, + '0' AS travel_abroad, + '0' AS living_abroad, + '0' AS deprivation_citizen_percents, + '0' AS travel_abroad_percent, + '0' AS living_abroad_percent +FROM total_info; + Y + + + 752 + 320 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl new file mode 100644 index 0000000..2349dc9 --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hpl @@ -0,0 +1,581 @@ + + + + total_registered.subpoenas(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + N + + + Table input (subpoena) регион/рег + Get variables 4 2 + N + + + Select values 4 2 + Insert / update (total_registered.subpoenas) 3 + N + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REC_ID + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 1040 + 496 + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + REC_ID + REC_ID + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 1216 + 496 + + + + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + ) AS ssi ON ssi.subpoena_id = s.id + WHERE sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/ AND ssi.rn_si = 1 + AND sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(rdi_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(rdi_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL AND ap_date IS NOT NULL + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(rdi_id) AS count_restrictions + FROM subpoena_data ls + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf new file mode 100644 index 0000000..9ed662b --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas(m_c).hwf @@ -0,0 +1,312 @@ + + + total_registered.subpoenas(m_c) + Y + + + + - + 2025/03/31 16:22:00.652 + - + 2025/03/31 16:22:00.652 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 624 + 384 + + + + total_registered.subpoenas_pr1(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl + Basic + + + ARR_PR_1 + PART_RECRUITMENT_1 + + Y + + Y + local + N + N + Y + N + 1040 + 224 + + + + total_registered.subpoenas_pr2(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl + Basic + + + ARR_PR_2 + PART_RECRUITMENT_2 + + Y + + Y + local + N + N + Y + N + 1040 + 304 + + + + total_registered.subpoenas_pr3(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl + + + Basic + + + ARR_PR_3 + PART_RECRUITMENT_3 + + + Y + + Y + local + N + N + Y + N + 1040 + 384 + + + + total_registered.subpoenas_pr4(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl + Basic + + + ARR_PR_4 + PART_RECRUITMENT_4 + + Y + + Y + local + N + N + Y + N + 1040 + 464 + + + + total_registered.subpoenas_pr5(m_c).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl + Basic + + + ARR_PR_5 + PART_RECRUITMENT_5 + + Y + + Y + local + N + N + Y + N + 1040 + 544 + + + + Success + + SUCCESS + + N + 1392 + 224 + + + + Success 2 + + SUCCESS + + N + 1392 + 304 + + + + Success 3 + + SUCCESS + + N + 1392 + 384 + + + + Success 4 + + SUCCESS + + N + 1392 + 464 + + + + Success 5 + + SUCCESS + + N + 1392 + 544 + + + + + + Start + total_registered.subpoenas_pr1(m_c).hpl + Y + Y + Y + + + Start + total_registered.subpoenas_pr2(m_c).hpl + Y + Y + Y + + + Start + total_registered.subpoenas_pr3(m_c).hpl + Y + Y + Y + + + Start + total_registered.subpoenas_pr4(m_c).hpl + Y + Y + Y + + + Start + total_registered.subpoenas_pr5(m_c).hpl + Y + Y + Y + + + total_registered.subpoenas_pr1(m_c).hpl + Success + Y + Y + N + + + total_registered.subpoenas_pr2(m_c).hpl + Success 2 + Y + Y + N + + + total_registered.subpoenas_pr3(m_c).hpl + Success 3 + Y + Y + N + + + total_registered.subpoenas_pr4(m_c).hpl + Success 4 + Y + Y + N + + + total_registered.subpoenas_pr5(m_c).hpl + Success 5 + Y + Y + N + + + + + + diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl new file mode 100644 index 0000000..0622fdc --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr1(m_c).hpl @@ -0,0 +1,490 @@ + + + + total_registered.subpoenas_pr1(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_1}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + rdi.status_applied, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + --WHERE act_number is not null + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1 + --AND + sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +where rn = 1 +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE status_applied = '11' and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct rdi_id) AS count_restrictions + FROM subpoena_data ls + where rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl new file mode 100644 index 0000000..cbeff24 --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr2(m_c).hpl @@ -0,0 +1,490 @@ + + + + total_registered.subpoenas_pr2(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_2}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + rdi.status_applied, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + --WHERE act_number is not null + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1 + --AND + sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +where rn = 1 +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE status_applied = '11' and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct rdi_id) AS count_restrictions + FROM subpoena_data ls + where rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl new file mode 100644 index 0000000..3e661b4 --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr3(m_c).hpl @@ -0,0 +1,490 @@ + + + + total_registered.subpoenas_pr3(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_3}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + rdi.status_applied, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + --WHERE act_number is not null + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1 + --AND + sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +where rn = 1 +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE status_applied = '11' and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct rdi_id) AS count_restrictions + FROM subpoena_data ls + where rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl new file mode 100644 index 0000000..35c168a --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr4(m_c).hpl @@ -0,0 +1,490 @@ + + + + total_registered.subpoenas_pr4(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_4}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + rdi.status_applied, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + --WHERE act_number is not null + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1 + --AND + sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +where rn = 1 +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE status_applied = '11' and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct rdi_id) AS count_restrictions + FROM subpoena_data ls + where rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl new file mode 100644 index 0000000..a929b9f --- /dev/null +++ b/map_v1/mil_com/total_registered.subpoenas(m_c)/total_registered.subpoenas_pr5(m_c).hpl @@ -0,0 +1,490 @@ + + + + total_registered.subpoenas_pr5(m_c) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 + Y + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + +
+ N + + + 1472 + 384 + +
+ + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_PR_5}'), ','))::uuid AS recruitment_id +), +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.recruit_id, + s.department_id::uuid, + s.status_id, + (CASE + WHEN sr.type = '1' THEN 0 + WHEN sr.type != '1' THEN 1 + ELSE NULL + END)::numeric AS mil_reg, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + rdi.restriction_document_cancel_id AS restr_dc, + rdi.applied_date AS ap_date, + rdi.id AS rdi_id, + rdi.status_applied, + ssi.delivery_code AS d_code, + ssi.act_number, + s.visit_date, + sh.rn, + rd.rn_d, + --rdi.rn_di, + ssi.rn_si + FROM subpoena s + JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY date_time DESC) AS rn, + subpoena_id, + status_id, + date_time + FROM subpoena_history sh + ) sh on sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY created_at DESC) AS rn_d, + subpoena_id, + id + FROM restriction_document + ) AS rd ON rd.subpoena_id = s.id + LEFT JOIN ( + SELECT + restriction_document_create_id, + restriction_document_cancel_id, + status_applied, + applied_date, + id + FROM ( + SELECT + ROW_NUMBER() OVER (PARTITION BY restriction_document_create_id ORDER BY created_at DESC) AS rn_di, + * + FROM restriction_document_item + ) sub + WHERE rn_di = 1 + ) AS rdi ON rdi.restriction_document_create_id = rd.id + LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY subpoena_id ORDER BY send_date DESC) AS rn_si, + subpoena_id, + delivery_code, + act_number + FROM subpoena_send_info + --WHERE act_number is not null + ) AS ssi ON ssi.subpoena_id = s.id + WHERE --sh.rn = 1 AND rd.rn_d = 1 /*AND rdi.rn_di = 1*/-- AND ssi.rn_si = 1 + --AND + sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') -- 3.14 снесено от 14.03.2025 + AND s.department_id::uuid IN (SELECT recruitment_id FROM ids) + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +uniq_ls AS ( + SELECT + distinct + department_id, + mil_reg + FROM subpoena_data +), +t1 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_subpoena + FROM subpoena_data ls + WHERE sub_stat_hist IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t2 AS ( +SELECT + ls.mil_reg, + ls.department_id, + ROUND( + AVG( + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + GREATEST(EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)), 0) + ELSE + GREATEST(EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)), 0) + END + ) FILTER (WHERE + CASE + WHEN ls.sub_stat_hist = '4.2' THEN + EXTRACT(DAY FROM (ls.history_date::timestamp - ls.visit_date::timestamp)) + ELSE + EXTRACT(DAY FROM (CURRENT_DATE::timestamp - ls.visit_date::timestamp)) + END > 0 + ), 1 + ) AS average_appeared +FROM subpoena_data ls +where rn = 1 +GROUP BY ls.department_id, ls.mil_reg +), +t3 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_appeared + FROM subpoena_data ls + WHERE sub_stat_hist IN ('4.1', '4.2') and rn = 1 -- снесен 4 статус от 14.03.2025 + GROUP BY ls.department_id, ls.mil_reg +), +t4 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_appeared + FROM subpoena_data ls + WHERE sub_stat_hist = '5' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t5 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_ap_good_reason -- не явились по уважительной причине + FROM subpoena_data ls + WHERE sub_stat_hist = '5.1' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t6 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_ap_not_required -- явка не требуется + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3.8', '5.2') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t7 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_restrictions_applied + FROM subpoena_data ls + WHERE rdi_id IS NOT NULL AND restr_dc IS NULL and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t8 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct recruit_id) AS count_introduced_measures + FROM subpoena_data ls + WHERE status_applied = '11' and rn = 1 and rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t9 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_paper + FROM subpoena_data ls + WHERE d_code != '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t10 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_electron + FROM subpoena_data ls + WHERE d_code = '7' and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t11 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct rdi_id) AS count_restrictions + FROM subpoena_data ls + where rn_d = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t12 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS count_not_delivery + FROM subpoena_data ls + WHERE act_number IS NOT NULL and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +), +t13 AS ( + SELECT + ls.mil_reg, + ls.department_id, + COUNT(distinct subpoena_id) AS appear_date_is_good + FROM subpoena_data ls + WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') and rn = 1 + GROUP BY ls.department_id, ls.mil_reg +) +SELECT + COALESCE(t1.count_subpoena, 0) AS count_subpoena, + COALESCE(t2.average_appeared, 0) AS average_appeared, + COALESCE(t3.count_appeared, 0) AS count_appeared, + COALESCE(t4.count_not_appeared, 0) AS count_not_appeared, + COALESCE(t5.count_not_ap_good_reason, 0) AS count_not_ap_good_reason, + COALESCE(t6.count_ap_not_required, 0) AS count_ap_not_required, + COALESCE(t7.count_restrictions_applied, 0) AS count_restrictions_applied, + COALESCE(t8.count_introduced_measures, 0) AS count_introduced_measures, + COALESCE(t9.count_paper, 0) AS count_paper, + COALESCE(t10.count_electron, 0) AS count_electron, + COALESCE(t11.count_restrictions, 0) AS count_restrictions, + COALESCE(t12.count_not_delivery, 0) AS count_not_delivery, + COALESCE(t13.appear_date_is_good, 0) AS appear_date_is_good, + COALESCE(ROUND(COALESCE(t3.count_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appeared_percent, + COALESCE(ROUND(COALESCE(t4.count_not_appeared, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_appeared_percent, + COALESCE(ROUND(COALESCE(t5.count_not_ap_good_reason, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_ap_good_reason_percent, + COALESCE(ROUND(COALESCE(t6.count_ap_not_required, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS ap_not_required_percent, + COALESCE(ROUND(COALESCE(t10.count_electron, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS electron_percent, + COALESCE(ROUND(COALESCE(t9.count_paper, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS paper_percent, + COALESCE(ROUND(COALESCE(t7.count_restrictions_applied, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS restrictions_applied_percent, + COALESCE(ROUND(COALESCE(t8.count_introduced_measures, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS introduced_measures_percent, + COALESCE(ROUND(COALESCE(t12.count_not_delivery, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS not_delivery_percent, + COALESCE(ROUND(COALESCE(t13.appear_date_is_good, 0) * 100.0 / NULLIF(t1.count_subpoena, 0), 2), 0) AS appear_date_is_good_percent, + ls.department_id AS recruitment_id, + current_date AS recording_date, + ls.mil_reg +FROM uniq_ls ls +LEFT JOIN t1 ON ls.department_id = t1.department_id + AND ls.mil_reg = t1.mil_reg +LEFT JOIN t2 ON ls.department_id = t2.department_id + AND ls.mil_reg = t2.mil_reg +LEFT JOIN t3 ON ls.department_id = t3.department_id + AND ls.mil_reg = t3.mil_reg +LEFT JOIN t4 ON ls.department_id = t4.department_id + AND ls.mil_reg = t4.mil_reg +LEFT JOIN t5 ON ls.department_id = t5.department_id + AND ls.mil_reg = t5.mil_reg +LEFT JOIN t6 ON ls.department_id = t6.department_id + AND ls.mil_reg = t6.mil_reg +LEFT JOIN t7 ON ls.department_id = t7.department_id + AND ls.mil_reg = t7.mil_reg +LEFT JOIN t8 ON ls.department_id = t8.department_id + AND ls.mil_reg = t8.mil_reg +LEFT JOIN t9 ON ls.department_id = t9.department_id + AND ls.mil_reg = t9.mil_reg +LEFT JOIN t10 ON ls.department_id = t10.department_id + AND ls.mil_reg = t10.mil_reg +LEFT JOIN t11 ON ls.department_id = t11.department_id + AND ls.mil_reg = t11.mil_reg +LEFT JOIN t12 ON ls.department_id = t12.department_id + AND ls.mil_reg = t12.mil_reg +LEFT JOIN t13 ON ls.department_id = t13.department_id + AND ls.mil_reg = t13.mil_reg; + Y + + + 816 + 384 + + + + + +
diff --git a/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl b/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl new file mode 100644 index 0000000..c6e04d0 --- /dev/null +++ b/map_v1/mil_district/appeals.reasons_appeal(m_d).hpl @@ -0,0 +1,351 @@ + + + + appeals.reasons_appeal(m_d) + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/28 10:29:54.859 + - + 2025/01/28 10:29:54.859 + + + + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Get variables 3 2 + Select values 3 2 + Y + + + Insert / update (main_dashboard.appeals) 2 + Execute SQL script 2 + Y + + + Select values 3 2 + Insert / update (main_dashboard.appeals) 2 + Y + + + Table input (appeal_document) регионы + Get variables 3 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.reasons_appeal +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 320 + 256 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.reasons_appeal +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1344 + 256 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 752 + 256 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + appeals + reasons_appeal
+ + appeal + appeal + Y + + + incorrect_inf + incorrect_inf + Y + + + incorrect_inf_percent + incorrect_inf_percent + Y + + + sending_documents + sending_documents + Y + + + sending_documents_percent + sending_documents_percent + Y + + + decision_disagreement + decision_disagreement + Y + + + decision_disagreement_persent + decision_disagreement_persent + Y + + + complaint_withdrawal + complaint_withdrawal + Y + + + complaint_withdrawal_percent + complaint_withdrawal_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ Y + + + 1104 + 256 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 896 + 256 + + + + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(appeal), 0) appeal, + COALESCE(SUM(incorrect_inf), 0) incorrect_inf, + COALESCE(SUM(sending_documents), 0) sending_documents, + COALESCE(SUM(decision_disagreement), 0) decision_disagreement, + COALESCE(SUM(complaint_withdrawal), 0) complaint_withdrawal, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(incorrect_inf) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) incorrect_inf_percent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(sending_documents) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) sending_documents_percent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(decision_disagreement) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) decision_disagreement_persent, + COALESCE( + CASE + WHEN SUM(appeal) > 0 + THEN ROUND((SUM(complaint_withdrawal) / SUM(appeal) * 100), 2) + ELSE 0 + END, + 0 + ) complaint_withdrawal_percent, + '${MD_ID}' AS recruitment_id, + 'Region' AS schema +FROM appeals.reasons_appeal +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE; + Y + + + 528 + 256 + + + + + +
diff --git a/map_v1/mil_district/appeals.topic_appeal(m_d).hpl b/map_v1/mil_district/appeals.topic_appeal(m_d).hpl new file mode 100644 index 0000000..03ef672 --- /dev/null +++ b/map_v1/mil_district/appeals.topic_appeal(m_d).hpl @@ -0,0 +1,334 @@ + + + + appeals.topic_appeal(m_d) + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/28 10:29:54.859 + - + 2025/01/28 10:29:54.859 + + + + + + Execute SQL script + Table input (appeals.topic_appeal(m_d)) + Y + + + Get variables 3 2 + Select values 3 2 + Y + + + Insert / update (appeals.topic_appeal) + Execute SQL script 2 + Y + + + Select values 3 2 + Insert / update (appeals.topic_appeal) + Y + + + Table input (appeals.topic_appeal(m_d)) + Get variables 3 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.topic_appeal +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 320 + 256 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.topic_appeal +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1344 + 256 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 752 + 256 + + + + Insert / update (appeals.topic_appeal) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + + = + schema + schema + + + appeals + topic_appeal
+ + recruitment_id + recruitment_id + N + + + schema + schema + N + + + registration + registration + Y + + + registration_percent + registration_percent + Y + + + sabpoena + sabpoena + Y + + + sabpoena_percent + sabpoena_percent + Y + + + temporary_measures + temporary_measures + Y + + + temporary_measures_percent + temporary_measures_percent + Y + + + appear + appear + Y + +
+ Y + + + 1104 + 256 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 896 + 256 + + + + Table input (appeals.topic_appeal(m_d)) + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(appear), 0) appear, + COALESCE(SUM(registration), 0) registration, + COALESCE(SUM(sabpoena), 0) sabpoena, + COALESCE(SUM(temporary_measures), 0) temporary_measures, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(registration) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) registration_percent, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(sabpoena) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) sabpoena_percent, + COALESCE( + CASE + WHEN SUM(appear) > 0 + THEN ROUND((SUM(temporary_measures) / SUM(appear) * 100), 2) + ELSE 0 + END, + 0 + ) temporary_measures_percent, + '${MD_ID}' AS recruitment_id, + 'Region' AS schema +FROM appeals.topic_appeal +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE; + Y + + + 528 + 256 + + + + + +
diff --git a/map_v1/mil_district/array_mildis.hwf b/map_v1/mil_district/array_mildis.hwf new file mode 100644 index 0000000..0f583c3 --- /dev/null +++ b/map_v1/mil_district/array_mildis.hwf @@ -0,0 +1,156 @@ + + + array_mildis + Y + + + + 0 + - + 2024/12/10 09:44:55.162 + - + 2024/12/10 09:44:55.162 + + + ORG_ROW + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 400 + 304 + + + + Success + + SUCCESS + + N + 1152 + 304 + + + + select_recruitments_mildis(m_d)rows.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_district/select_recruitments_mildis(m_d)rows.hpl + Basic + + Y + + N + local + N + N + Y + N + 720 + 304 + + + + select_recruitments_mildis(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/select_recruitments_mildis(m_d).hpl + txt + C:\Users\acer\Desktop\лог + Rowlevel + + + MILDIS_ROW + MIL_DISTRICT_ROW + + Y + + Y + local + N + N + Y + N + 976 + 304 + + + + SQL + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.array_mildis + N + N + N + 560 + 304 + + + + + + select_recruitments_mildis(m_d)rows.hpl + select_recruitments_mildis(m_d).hpl + Y + Y + N + + + select_recruitments_mildis(m_d).hpl + Success + Y + Y + N + + + Start + SQL + Y + Y + Y + + + SQL + select_recruitments_mildis(m_d)rows.hpl + Y + Y + N + + + + + + diff --git a/map_v1/mil_district/job_get_rows_mildis.hwf b/map_v1/mil_district/job_get_rows_mildis.hwf new file mode 100644 index 0000000..4c2d639 --- /dev/null +++ b/map_v1/mil_district/job_get_rows_mildis.hwf @@ -0,0 +1,122 @@ + + + job_get_rows_mildis + Y + + + + - + 2024/12/10 12:37:22.616 + - + 2024/12/10 12:37:22.616 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 432 + 336 + + + + array_mildis.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_district/array_mildis.hwf + Nothing + + Y + + N + local + N + N + Y + N + 592 + 336 + + + + Success + + SUCCESS + + N + 912 + 336 + + + + rows_id-array_mildis.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/mil_district/rows_id-array_mildis.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 768 + 336 + + + + + + Start + array_mildis.hwf + Y + Y + Y + + + array_mildis.hwf + rows_id-array_mildis.hpl + Y + Y + N + + + rows_id-array_mildis.hpl + Success + Y + Y + N + + + + + + diff --git a/map_v1/mil_district/job_recruitments_mildis.hwf b/map_v1/mil_district/job_recruitments_mildis.hwf new file mode 100644 index 0000000..e31db7e --- /dev/null +++ b/map_v1/mil_district/job_recruitments_mildis.hwf @@ -0,0 +1,1091 @@ + + + job_recruitments_mildis + Y + + + + 0 + - + 2024/08/15 16:02:12.821 + - + 2024/08/15 16:02:12.821 + + + MD_ARRAY + + + + + REG_ID + + + + + VK_ARRAY + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 208 + 1152 + + + + main_dashboard.appeals(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/main_dashboard.appeals(m_d).hpl + txt + ${Internal.Entry.Current.Folder}/\logs\appeals + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 688 + + + + Success + + SUCCESS + + N + 1552 + 688 + + + + main_dashboard.recruitment_campaign(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/main_dashboard.recruitment_campaign(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 752 + + + + Success 2 + + SUCCESS + + N + 1552 + 752 + + + + main_dashboard.total_registered(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/main_dashboard.total_registered(m_d).hpl + txt + C:\Users\acer\Desktop\лог + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 816 + + + + Success 3 + + SUCCESS + + N + 1552 + 816 + + + + main_dashboard.waiting_registration(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/main_dashboard.waiting_registration(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 880 + + + + Success 4 + + SUCCESS + + N + 1552 + 880 + + + + recruitment_campaign.subpoenas(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/recruitment_campaign.subpoenas(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 944 + + + + Success 6 + + SUCCESS + + N + 1552 + 944 + + + + total_registered.reg_mil_cat(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.reg_mil_cat(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1008 + + + + Success 7 + + SUCCESS + + N + 1552 + 1008 + + + + total_registered.removed_registry(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.removed_registry(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1072 + + + + Success 8 + + SUCCESS + + N + 1552 + 1072 + + + + total_registered.subpoenas(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.subpoenas(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1136 + + + + Success 9 + + SUCCESS + + N + 1552 + 1136 + + + + total_registered.driver_license(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.driver_license(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1216 + + + + Success 10 + + SUCCESS + + N + 1552 + 1216 + + + + total_registered.child_minor(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.child_minor(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1280 + + + + Success 11 + + SUCCESS + + N + 1552 + 1280 + + + + total_registered.age(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.age(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1360 + + + + Success 12 + + SUCCESS + + N + 1552 + 1360 + + + + total_registered.marital_status(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.marital_status(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1440 + + + + Success 13 + + SUCCESS + + N + 1552 + 1440 + + + + total_registered.education_level(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.education_level(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1520 + + + + Success 14 + + SUCCESS + + N + 1552 + 1520 + + + + total_registered.busyness(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/total_registered.busyness(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1600 + + + + Success 15 + + SUCCESS + + N + 1552 + 1600 + + + + recruitment_campaign.appeals(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/recruitment_campaign.appeals(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 1680 + + + + Success 16 + + SUCCESS + + N + 1552 + 1680 + + + + job_get_rows_mildis.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/mil_district/job_get_rows_mildis.hwf + Nothing + + Y + + N + local + N + N + Y + Y + 416 + 1152 + + + + appeals.reasons_appeal(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/appeals.reasons_appeal(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 624 + + + + Success 5 + + SUCCESS + + N + 1552 + 624 + + + + appeals.topic_appeal(m_d).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/mil_district/appeals.topic_appeal(m_d).hpl + Basic + + + MD_ARRAY + MD_ARRAY_ID + + + MD_ID + RECRUITMENT_MD_ID + + Y + + Y + local + N + N + Y + N + 1296 + 544 + + + + Success 17 + + SUCCESS + + N + 1552 + 544 + + + + + + Start + job_get_rows_mildis.hwf + Y + Y + Y + + + job_get_rows_mildis.hwf + main_dashboard.appeals(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + main_dashboard.total_registered(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + main_dashboard.recruitment_campaign(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + main_dashboard.waiting_registration(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + recruitment_campaign.subpoenas(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.reg_mil_cat(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.removed_registry(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.subpoenas(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.driver_license(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.child_minor(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.age(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.marital_status(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.education_level(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + total_registered.busyness(m_d).hpl + Y + Y + N + + + job_get_rows_mildis.hwf + recruitment_campaign.appeals(m_d).hpl + Y + Y + N + + + main_dashboard.appeals(m_d).hpl + Success + Y + Y + N + + + main_dashboard.recruitment_campaign(m_d).hpl + Success 2 + Y + Y + N + + + main_dashboard.total_registered(m_d).hpl + Success 3 + Y + Y + N + + + main_dashboard.waiting_registration(m_d).hpl + Success 4 + Y + Y + N + + + recruitment_campaign.subpoenas(m_d).hpl + Success 6 + Y + Y + N + + + total_registered.reg_mil_cat(m_d).hpl + Success 7 + Y + Y + N + + + total_registered.removed_registry(m_d).hpl + Success 8 + Y + Y + N + + + total_registered.subpoenas(m_d).hpl + Success 9 + Y + Y + N + + + total_registered.driver_license(m_d).hpl + Success 10 + Y + Y + N + + + total_registered.child_minor(m_d).hpl + Success 11 + Y + Y + N + + + total_registered.age(m_d).hpl + Success 12 + Y + Y + N + + + total_registered.marital_status(m_d).hpl + Success 13 + Y + Y + N + + + total_registered.education_level(m_d).hpl + Success 14 + Y + Y + N + + + total_registered.busyness(m_d).hpl + Success 15 + Y + Y + N + + + recruitment_campaign.appeals(m_d).hpl + Success 16 + Y + Y + N + + + job_get_rows_mildis.hwf + appeals.reasons_appeal(m_d).hpl + Y + Y + N + + + appeals.reasons_appeal(m_d).hpl + Success 5 + Y + Y + N + + + appeals.topic_appeal(m_d).hpl + Success 17 + Y + Y + N + + + job_get_rows_mildis.hwf + appeals.topic_appeal(m_d).hpl + Y + Y + N + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/mil_district/main_dashboard.appeals(m_d).hpl b/map_v1/mil_district/main_dashboard.appeals(m_d).hpl new file mode 100644 index 0000000..5994da9 --- /dev/null +++ b/map_v1/mil_district/main_dashboard.appeals(m_d).hpl @@ -0,0 +1,332 @@ + + + + main_dashboard.appeals(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (main_dashboard.appeals) 2 + Y + + + Table input (appeal_document) регионы + Get variables 3 2 + Y + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) 2 + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.appeals +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 240 + 192 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.appeals +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1264 + 192 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 672 + 192 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + main_dashboard + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + average_rating + average_rating + Y + + + average_to_face + average_to_face + Y + + + "average_EPGU" + average_epgu + Y + + + average_to_face_percent + average_to_face_percent + Y + + + "average_EPGU_percent" + average_epgu_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ Y + + + 1024 + 192 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 816 + 192 + + + + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_appeals), 0) total_appeals, + COALESCE(SUM(resolved), 0) resolved, + COALESCE(ROUND(AVG(average_consideration) FILTER (where average_consideration!=0),1), 0) average_consideration, + COALESCE(ROUND(AVG(average_rating)FILTER (where average_rating!=0),1), 0) average_rating, + COALESCE(SUM(average_to_face), 0) average_to_face, + COALESCE(SUM("average_EPGU"), 0) average_epgu, + COALESCE( + CASE + WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0 + THEN ROUND((SUM(average_to_face) / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2) + ELSE 0 + END, + 0 + ) average_to_face_percent, + COALESCE( + CASE + WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0 + THEN ROUND((SUM("average_EPGU") / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2) + ELSE 0 + END, + 0 + ) average_epgu_percent, + '${MD_ID}' AS recruitment_id, + 'Region' AS schema +FROM main_dashboard.appeals +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE; + Y + + + 448 + 192 + + + + + +
diff --git a/map_v1/mil_district/main_dashboard.recruitment_campaign(m_d).hpl b/map_v1/mil_district/main_dashboard.recruitment_campaign(m_d).hpl new file mode 100644 index 0000000..c7d7ffe --- /dev/null +++ b/map_v1/mil_district/main_dashboard.recruitment_campaign(m_d).hpl @@ -0,0 +1,370 @@ + + + + main_dashboard.recruitment_campaign(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 3 + Select values 4 3 + Y + + + Select values 4 3 + Insert / update (main_dashboard.recruitment_campaign) + Y + + + Table input (subpoena) регион/осень + Get variables 4 3 + Y + + + Execute SQL script + Table input (subpoena) регион/осень + Y + + + Insert / update (main_dashboard.recruitment_campaign) + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 336 + 384 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1520 + 384 + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 784 + 384 + + + + Insert / update (main_dashboard.recruitment_campaign) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + spring_autumn + spring_autumn + + main_dashboard + recruitment_campaign
+ + subpoenas_sent + count_subpoena + Y + + + appeared_on_subpoenas + count_appeared + Y + + + not_appeared_on_subpoenas + count_not_appeared + Y + + + new_recruits + new_recruits + Y + + + postponement_have_right + postponement_have_right + Y + + + postponement_granted + postponement_granted + Y + + + appeared_on_subpoenas_percent + appeared_on_subpoenas_percent + Y + + + not_appeared_on_subpoenas_percent + not_appeared_on_subpoenas_percent + Y + + + postponement_have_right_percent + postponement_have_right_percent + Y + + + postponement_granted_percent + postponement_granted_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1280 + 384 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 960 + 384 + + + + Table input (subpoena) регион/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoenas_sent), 0) count_subpoena, + COALESCE(SUM(appeared_on_subpoenas), 0) count_appeared, + COALESCE(SUM(not_appeared_on_subpoenas), 0) count_not_appeared, + COALESCE(SUM(new_recruits), 0) new_recruits, + COALESCE(SUM(postponement_have_right), 0) postponement_have_right, + COALESCE(SUM(postponement_granted), 0) postponement_granted, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(not_appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_have_right) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_have_right_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_granted) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_granted_percent, + '${MD_ID}' AS recruitment_id, + spring_autumn, + 'Region' AS schema +FROM main_dashboard.recruitment_campaign +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 528 + 384 + + + + + +
diff --git a/map_v1/mil_district/main_dashboard.total_registered(m_d).hpl b/map_v1/mil_district/main_dashboard.total_registered(m_d).hpl new file mode 100644 index 0000000..732607d --- /dev/null +++ b/map_v1/mil_district/main_dashboard.total_registered(m_d).hpl @@ -0,0 +1,357 @@ + + + + main_dashboard.total_registered(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.total_registered) 2 + Y + + + Table input (person_registry) регион + Get variables 2 2 + Y + + + Insert / update (main_dashboard.total_registered) 2 + Execute SQL script 2 + Y + + + Execute SQL script + Table input (person_registry) регион + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 160 + 304 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1280 + 304 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 560 + 304 + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + Y + + + convicts + convicts + N + +
+ N + + + 1024 + 304 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 304 + + + + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_registered), 0) total_count, + COALESCE(SUM("total_registered_M"), 0) male_count, + COALESCE(SUM("total_registered_W"), 0) female_count, + COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion, + COALESCE(SUM(contract_criterion), 0) contract_criterion, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${MD_ID}' AS recruitment_id, + convicts, + 'Region' AS schema +FROM main_dashboard.total_registered +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY convicts; + Y + + + 352 + 304 + + + + + +
diff --git a/map_v1/mil_district/main_dashboard.waiting_registration(m_d).hpl b/map_v1/mil_district/main_dashboard.waiting_registration(m_d).hpl new file mode 100644 index 0000000..69bc685 --- /dev/null +++ b/map_v1/mil_district/main_dashboard.waiting_registration(m_d).hpl @@ -0,0 +1,347 @@ + + + + main_dashboard.waiting_registration(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 5 + Select values 5 + Y + + + Select values 5 + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + Table input 2 (person_registry) регион + Get variables 5 + Y + + + Execute SQL script + Table input 2 (person_registry) регион + Y + + + Insert / update (main_dashboard.waiting_registration) 2 + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 320 + 336 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1504 + 336 + + + + Get variables 5 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 768 + 336 + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + + = + schema + schema + + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1216 + 336 + +
+ + Select values 5 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 912 + 336 + + + + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(waiting_registration), 0) waiting_count, + COALESCE(SUM("waiting_registration_M"), 0) male_count, + COALESCE(SUM("waiting_registration_W"), 0) female_count, + COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion, + COALESCE(SUM(contract_criterion), 0) contract_criterion, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${MD_ID}' AS recruitment_id, + 'Region' AS schema +FROM main_dashboard.waiting_registration +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE; + Y + + + 528 + 336 + + + + + +
diff --git a/map_v1/mil_district/recruitment_campaign.appeals(m_d).hpl b/map_v1/mil_district/recruitment_campaign.appeals(m_d).hpl new file mode 100644 index 0000000..d8827d6 --- /dev/null +++ b/map_v1/mil_district/recruitment_campaign.appeals(m_d).hpl @@ -0,0 +1,335 @@ + + + + recruitment_campaign.appeals(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (main_dashboard.appeals) + Y + + + Table input (appeal_document) регионы + Get variables 3 2 + Y + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 304 + 352 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1360 + 352 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 736 + 352 + + + + Insert / update (main_dashboard.appeals) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + recruitment_campaign + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + not_resolved + not_resolved + Y + + + not_resolved_percent + not_resolved_percent + Y + + + average_rating + average_rating + Y + + + resolved_percent + resolved_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1104 + 352 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 880 + 352 + + + + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_appeals), 0) total_appeals, + coalesce(ROUND(avg(average_consideration) FILTER (where average_consideration!=0),1),0) as average_consideration, + COALESCE(SUM(resolved), 0) resolved, + COALESCE(SUM(not_resolved), 0) not_resolved, + COALESCE( + CASE + WHEN SUM(total_appeals) > 0 + THEN ROUND((SUM(not_resolved) / SUM(total_appeals) * 100), 2) + ELSE 0 + END, + 0 + ) not_resolved_percent, + + coalesce(ROUND(avg(average_rating) FILTER (where average_rating!=0),1),0) as average_rating, + COALESCE( + CASE + WHEN SUM(total_appeals) > 0 + THEN ROUND((SUM(resolved) / SUM(total_appeals) * 100), 2) + ELSE 0 + END, + 0 + ) resolved_percent, + + '${MD_ID}' AS recruitment_id, + spring_autumn, + 'Region' AS schema +FROM recruitment_campaign.appeals +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 512 + 352 + + + + + +
diff --git a/map_v1/mil_district/recruitment_campaign.subpoenas(m_d).hpl b/map_v1/mil_district/recruitment_campaign.subpoenas(m_d).hpl new file mode 100644 index 0000000..c4548f8 --- /dev/null +++ b/map_v1/mil_district/recruitment_campaign.subpoenas(m_d).hpl @@ -0,0 +1,454 @@ + + + + recruitment_campaign.subpoenas(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/09 13:13:59.825 + - + 2024/08/09 13:13:59.825 + + + + + + Get variables 4 3 + Select values 4 3 + Y + + + Select values 4 3 + Insert / update (recruitment_campaign.subpoenas) 3 + Y + + + Table input (subpoena) осень/регионы + Get variables 4 3 + Y + + + Execute SQL script + Table input (subpoena) осень/регионы + Y + + + Insert / update (recruitment_campaign.subpoenas) 3 + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 384 + 320 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1616 + 320 + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 864 + 320 + + + + Insert / update (recruitment_campaign.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + spring_autumn + spring_autumn + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + restrictions_applied + count_restrictions_applied + Y + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + recruitment_id + recruitment_id + N + + + rest + rest + Y + + + spring_autumn + spring_autumn + N + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1344 + 320 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1040 + 320 + + + + Table input (subpoena) осень/регионы + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + COALESCE(SUM(rest), 0) rest, + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${MD_ID}' AS recruitment_id, + spring_autumn, + 'Region' AS schema +FROM recruitment_campaign.subpoenas +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 608 + 320 + + + + + +
diff --git a/map_v1/mil_district/rows_id-array_mildis.hpl b/map_v1/mil_district/rows_id-array_mildis.hpl new file mode 100644 index 0000000..f893561 --- /dev/null +++ b/map_v1/mil_district/rows_id-array_mildis.hpl @@ -0,0 +1,74 @@ + + + + rows_id-array_mildis + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/10 12:40:41.832 + - + 2024/12/10 12:40:41.832 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 672 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +recruitment_dstr_id AS RECRUITMENT_MD_ID, +string_to_array(trim(both '{}' FROM replace(reg_array_id, ' ', '')), ',')::uuid[] AS MD_ARRAY_ID +FROM ervu_dashboard.array_mildis + N + + + 448 + 256 + + + + + + diff --git a/map_v1/mil_district/select_recruitments_mildis(m_d).hpl b/map_v1/mil_district/select_recruitments_mildis(m_d).hpl new file mode 100644 index 0000000..48e805c --- /dev/null +++ b/map_v1/mil_district/select_recruitments_mildis(m_d).hpl @@ -0,0 +1,193 @@ + + + + select_recruitments_mildis(m_d) + Y + + + + Normal + 0 + + + ORG_ROW + + + + + SCM + + + + + N + 1000 + 100 + - + 2024/08/15 14:58:19.728 + - + 2024/08/15 14:58:19.728 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Table input/регион + Get variables 3 2 + Y + + + Select values 3 2 + Insert / update + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MILDIS_ROW + -1 + none + String + + + + + 656 + 208 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_dstr_id + MILDIS_ROW + + + ervu_dashboard + array_mildis
+ + reg_array_id + reg_array_id + Y + + + recruitment_dstr_id + recruitment_dstr_id + Y + +
+ N + + + 992 + 208 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MILDIS_ROW + MILDIS_ROW + String + -2 + -2 + + false + + + false + + + + + + + + + + 800 + 208 + + + + Table input/регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT + '${MILDIS_ROW}' AS recruitment_dstr_id, + ARRAY( + SELECT idm_id + FROM ( + SELECT idm_id + FROM ervu_dashboard.recruitment + WHERE schema = 'Organization' AND parent_id = '${MILDIS_ROW}' + UNION ALL + SELECT idm_id + FROM ervu_dashboard.recruitment + WHERE idm_id = '${MILDIS_ROW}' + ) subquery + ) AS reg_array_id +FROM ervu_dashboard.recruitment +WHERE idm_id = '${MILDIS_ROW}'; + Y + + + 528 + 208 + + + + + +
diff --git a/map_v1/mil_district/select_recruitments_mildis(m_d)rows.hpl b/map_v1/mil_district/select_recruitments_mildis(m_d)rows.hpl new file mode 100644 index 0000000..6420254 --- /dev/null +++ b/map_v1/mil_district/select_recruitments_mildis(m_d)rows.hpl @@ -0,0 +1,82 @@ + + + + select_recruitments_mildis(m_d)rows + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/10 10:43:22.293 + - + 2024/12/10 10:43:22.293 + + + + + + Table input/Военный округ + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 688 + 240 + + + + Table input/Военный округ + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT + idm_id AS MIL_DISTRICT_ROW +FROM + ervu_dashboard.recruitment +WHERE schema = 'Region' +AND idm_id in ( + 'b23f384f-b114-4003-9277-2eaa2d9ae180', -- главный ВК Восточного военного округа (уровень ВО) + '25633423-52e6-45bb-9d54-7f85b74a3f7d', -- главный ВК Ленинградского военного округа (уровень ВО) + '30a01af9-a871-411a-90e3-d81592bb074f', -- главный ВК Московского военного округа (уровень ВО) + '58ef9cdc-8a9d-429e-89a5-1c49e2684a98', -- главный ВК Центрального военного округа (уровень ВО) + 'b00de68d-2e09-4776-9b48-1566a7222dca' -- главный ВК Южного военного округа (уровень ВО) +) + N + + + 512 + 240 + + + + + + diff --git a/map_v1/mil_district/total_registered.age(m_d).hpl b/map_v1/mil_district/total_registered.age(m_d).hpl new file mode 100644 index 0000000..d7d6863 --- /dev/null +++ b/map_v1/mil_district/total_registered.age(m_d).hpl @@ -0,0 +1,463 @@ + + + + total_registered.age(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.age) + Y + + + Table input (person_registry) регион/все + Get variables 3 2 + Y + + + Execute SQL script + Table input (person_registry) регион/все + Y + + + Insert / update (total_registered.age) + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 208 + 624 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1376 + 624 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 672 + 624 + + + + Insert / update (total_registered.age) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 51+_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + schema + schema + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1056 + 624 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 816 + 624 + + + + Table input (person_registry) регион/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM("17_years"), 0) "17_year_count", + COALESCE(SUM("18-26_years"), 0) "18-26_year_count", + COALESCE(SUM("27-30_years"), 0) "27-30_year_count", + COALESCE(SUM("31-35_years"), 0) "31-35_year_count", + COALESCE(SUM("36-40_years"), 0) "36-40_year_count", + COALESCE(SUM("41-45_years"), 0) "41-45_year_count", + COALESCE(SUM("51+_years"), 0) "51+_year_count", + COALESCE(SUM("46-50_years"), 0) "46-50_year_count", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("17_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "17_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("18-26_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "18-26_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("27-30_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "27-30_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("31-35_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "31-35_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("36-40_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "36-40_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("41-45_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "41-45_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("46-50_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "46-50_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("51+_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "51+_year_percent", + + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + registered, + 'Region' AS schema +FROM total_registered.age +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 432 + 624 + + + + + +
diff --git a/map_v1/mil_district/total_registered.busyness(m_d).hpl b/map_v1/mil_district/total_registered.busyness(m_d).hpl new file mode 100644 index 0000000..0c2a07a --- /dev/null +++ b/map_v1/mil_district/total_registered.busyness(m_d).hpl @@ -0,0 +1,371 @@ + + + + total_registered.busyness(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.busyness) + Y + + + Table input (person_registry) РФ/все + Get variables 3 2 + Y + + + Execute SQL script + Table input (person_registry) РФ/все + Y + + + Insert / update (total_registered.busyness) + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + + 368 + 752 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + + 1552 + 752 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 864 + 752 + + + + Insert / update (total_registered.busyness) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + registered + registered + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1264 + 752 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1008 + 752 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(study), 0) study, + COALESCE(SUM(work), 0) work, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) study_percent, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) work_percent, + + COALESCE(SUM(not_work), 0) no_info, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) no_info_percent, + + COALESCE(SUM(busyness), 0) total_people, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered, + convicts, + 'Region' AS schema +FROM total_registered.busyness +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 624 + 752 + + + + + +
diff --git a/map_v1/mil_district/total_registered.child_minor(m_d).hpl b/map_v1/mil_district/total_registered.child_minor(m_d).hpl new file mode 100644 index 0000000..ebb6a49 --- /dev/null +++ b/map_v1/mil_district/total_registered.child_minor(m_d).hpl @@ -0,0 +1,394 @@ + + + + total_registered.child_minor(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + Y + + + Select values 4 2 + Insert / update (total_registered.child_minor) + Y + + + Table input (person_registry)регион/все + Get variables 4 2 + Y + + + Insert / update (total_registered.child_minor) + Execute SQL script 2 + Y + + + Execute SQL script + Table input (person_registry)регион/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 336 + 416 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1488 + 416 + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 800 + 416 + + + + Insert / update (total_registered.child_minor) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ N + + + 1248 + 416 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 992 + 416 + + + + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM(no_child), 0) no_children, + COALESCE(SUM("1_child"), 0) one_child, + COALESCE(SUM("2_child"), 0) two_children, + COALESCE(SUM("3_child"), 0) three_children, + COALESCE(SUM("4_more_child"), 0) four_or_more_children, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(no_child) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) no_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("1_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) one_child_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("2_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) two_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("3_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) three_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("4_more_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) four_or_more_children_percent, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Region' AS schema +FROM total_registered.child_minor +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 560 + 416 + + + + + +
diff --git a/map_v1/mil_district/total_registered.driver_license(m_d).hpl b/map_v1/mil_district/total_registered.driver_license(m_d).hpl new file mode 100644 index 0000000..9e6cbec --- /dev/null +++ b/map_v1/mil_district/total_registered.driver_license(m_d).hpl @@ -0,0 +1,403 @@ + + + + total_registered.driver_license(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.driver_license) 2 + Y + + + Table input (driver_license) регионы/все + Get variables 3 2 + Y + + + Insert / update (total_registered.driver_license) 2 + Execute SQL script 2 + Y + + + Execute SQL script + Table input (driver_license) регионы/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 240 + 480 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1504 + 480 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 752 + 480 + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1152 + 480 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 896 + 480 + + + + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total, + COALESCE(SUM("A"), 0) a, + COALESCE(SUM("B"), 0) b, + COALESCE(SUM("C"), 0) c, + COALESCE(SUM("D"), 0) d, + COALESCE(SUM("E"), 0) e, + COALESCE(SUM(nope), 0) nope, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("A") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) a_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("B") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) b_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("C") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) c_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("D") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) d_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("E") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) e_percent, -- нет такой категории + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(nope) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) nope_percent, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Region' AS schema +FROM total_registered.driver_license +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 528 + 480 + + + + + +
diff --git a/map_v1/mil_district/total_registered.education_level(m_d).hpl b/map_v1/mil_district/total_registered.education_level(m_d).hpl new file mode 100644 index 0000000..759415a --- /dev/null +++ b/map_v1/mil_district/total_registered.education_level(m_d).hpl @@ -0,0 +1,377 @@ + + + + total_registered.education_level(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.education_level) + Y + + + Table input (person_registry) РФ/все + Get variables 3 2 + Y + + + Insert / update (total_registered.education_level) + Execute SQL script 2 + Y + + + Execute SQL script + Table input (person_registry) РФ/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 304 + 416 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1472 + 416 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 784 + 416 + + + + Insert / update (total_registered.education_level) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1184 + 416 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 928 + 416 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(higher), 0) higher, + COALESCE(SUM(average), 0) average_prof, + COALESCE(SUM(only_general), 0) only_general, + COALESCE(SUM(no_data), 0) count_nodata, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(higher) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) higher_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(average) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) average_prof_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(only_general) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) only_general_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(no_data) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) count_nodata_percentage, + + COALESCE(SUM(education_level), 0) total, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Region' AS schema +FROM total_registered.education_level +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 512 + 416 + + + + + +
diff --git a/map_v1/mil_district/total_registered.marital_status(m_d).hpl b/map_v1/mil_district/total_registered.marital_status(m_d).hpl new file mode 100644 index 0000000..d9b0404 --- /dev/null +++ b/map_v1/mil_district/total_registered.marital_status(m_d).hpl @@ -0,0 +1,356 @@ + + + + total_registered.marital_status(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.marital_status) + Y + + + Table input (person_registry) регионы/все + Get variables 3 2 + Y + + + Insert / update (total_registered.marital_status) + Execute SQL script 2 + Y + + + Execute SQL script + Table input (person_registry) регионы/все + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 320 + 416 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1472 + 416 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 784 + 416 + + + + Insert / update (total_registered.marital_status) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + schema + schema + N + + + convicts + convicts + N + + + other + other + Y + + + other_percent + other_percent + Y + +
+ Y + + + 1184 + 416 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 928 + 416 + + + + Table input (person_registry) регионы/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(married), 0) married, + COALESCE(SUM(not_married), 0) not_married, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(not_married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) not_married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(other) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + COALESCE(SUM(marital_status), 0) total, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Region' AS schema +FROM total_registered.marital_status +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 560 + 416 + + + + + +
diff --git a/map_v1/mil_district/total_registered.reg_mil_cat(m_d).hpl b/map_v1/mil_district/total_registered.reg_mil_cat(m_d).hpl new file mode 100644 index 0000000..c93c29e --- /dev/null +++ b/map_v1/mil_district/total_registered.reg_mil_cat(m_d).hpl @@ -0,0 +1,396 @@ + + + + total_registered.reg_mil_cat(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 + Select values 3 + Y + + + Select values 3 + Insert / update (total_registered.reg_mil_cat) + Y + + + Table input (person_registry) военком/рег + Get variables 3 + Y + + + Execute SQL script + Table input (person_registry) военком/рег + Y + + + Insert / update (total_registered.reg_mil_cat) + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 192 + 336 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1312 + 336 + + + + Get variables 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 672 + 336 + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + + + schema + schema + N + +
+ N + + + 1072 + 336 + +
+ + Select values 3 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 816 + 336 + + + + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(COALESCE(SUM(first_reg_17), 0), 0) first_reg_17, + COALESCE(COALESCE(SUM(first_reg_18), 0), 0) first_reg_18, + COALESCE(COALESCE(SUM("mil_spec_W"), 0), 0) mil_spec_w, + COALESCE(COALESCE(SUM(returned_dep_liberty), 0), 0) returned_dep_liberty, + COALESCE(COALESCE(SUM(punished), 0), 0) punished, + COALESCE(COALESCE(SUM(received_citizenship), 0), 0) received_citizenship, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_17) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) first_reg_17_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_18) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) first_reg_18_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(returned_dep_liberty) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) returned_dep_liberty_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM("mil_spec_W") / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) mil_spec_w_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(punished) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) punished_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(received_citizenship) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) received_citizenship_percent, + '${MD_ID}'::uuid AS recruitment_id, + mil_reg, + 'Region' AS schema +FROM total_registered.reg_mil_cat +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 416 + 336 + + + + + +
diff --git a/map_v1/mil_district/total_registered.removed_registry(m_d).hpl b/map_v1/mil_district/total_registered.removed_registry(m_d).hpl new file mode 100644 index 0000000..d005ac1 --- /dev/null +++ b/map_v1/mil_district/total_registered.removed_registry(m_d).hpl @@ -0,0 +1,390 @@ + + + + total_registered.removed_registry(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + Table input (decision-document-service) регион 2 + Get variables 2 2 + Y + + + Execute SQL script + Table input (decision-document-service) регион 2 + Y + + + Insert / update (total_registered.removed_registry) 2 + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 224 + 336 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1392 + 336 + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 752 + 336 + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + living_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1120 + 336 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 880 + 336 + + + + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(age_limit), 0) age_limit, + COALESCE(SUM(death), 0) death, + COALESCE(SUM(removed_registry), 0) removed_registry, + COALESCE(SUM(deprivation_citizenship), 0) deprivation_citizenship, + COALESCE(SUM(travel_abroad), 0) travel_abroad, + COALESCE(SUM(living_abroad), 0) living_abroad, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(deprivation_citizenship) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) deprivation_citizen_percents, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(age_limit) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) age_limit_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(death) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) death_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(travel_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) travel_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(living_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) living_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(other) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + '${MD_ID}' AS recruitment_id, + 'Region' AS schema +FROM total_registered.removed_registry +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE; + Y + + + 464 + 336 + + + + + +
diff --git a/map_v1/mil_district/total_registered.subpoenas(m_d).hpl b/map_v1/mil_district/total_registered.subpoenas(m_d).hpl new file mode 100644 index 0000000..0bb2dd4 --- /dev/null +++ b/map_v1/mil_district/total_registered.subpoenas(m_d).hpl @@ -0,0 +1,486 @@ + + + + total_registered.subpoenas(m_d) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + Y + + + Select values 4 2 + Insert / update (total_registered.subpoenas) 3 + Y + + + Table input (subpoena) регион/рег + Get variables 4 2 + Y + + + Execute SQL script + Table input (subpoena) регион/рег + Y + + + Insert / update (total_registered.subpoenas) 3 + Execute SQL script 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema = 'Region' + AND recruitment_id = '${MD_ID}' + + + 272 + 400 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema = 'MD_LVL' + AND recruitment_id = '${MD_ID}' + + + 1376 + 400 + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + MD_ID + -1 + none + String + + + -1 + MD_ARRAY + -1 + none + String + + + + + 688 + 400 + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + MD_ID + + + = + schema + schema + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1136 + 400 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + MD_ID + MD_ID + String + -2 + -2 + + false + + + false + + + + + + + + MD_ARRAY + MD_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 864 + 400 + + + + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(average_appeared), 0) average_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(electron), 0) count_electron, + COALESCE(SUM(paper), 0) count_paper, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(electron) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) electron_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(paper) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) paper_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${MD_ID}' AS recruitment_id, + mil_reg, + 'Region' AS schema +FROM total_registered.subpoenas +WHERE recruitment_id = ANY ('${MD_ARRAY}') +AND schema = 'Organization' +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 480 + 400 + + + + + +
diff --git a/map_v1/pack.pub_recruitment.hpl b/map_v1/pack.pub_recruitment.hpl new file mode 100644 index 0000000..79aa9ef --- /dev/null +++ b/map_v1/pack.pub_recruitment.hpl @@ -0,0 +1,173 @@ + + + + pack.pub_recruitment + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + + + + + + Table input + Table output + Y + + + Table input + Insert / update + N + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + idm_id + idm_id + + ervu_dashboard + recruitment
+ + id + id + Y + + + parent_id + parent_id + Y + + + schema + schema + Y + + + shortname + shortname + Y + + + updated_at + updated_at + Y + + + idm_id + idm_id + N + +
+ N + + + 512 + 208 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + SELECT + rt.id, + rt.fullname as shortname, + rt.parent_id, + rt.idm_id, + rt.schema, + rt.military_code AS code, + rt.updated_at--, + --ROW_NUMBER() OVER (ORDER BY rt.idm_id) AS rn_recruitment +FROM public.recruitment rt +WHERE + rt.idm_id ~ '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$' + AND (rt.schema = 'Ministry' OR (rt.schema IS NOT NULL AND rt.parent_id IS NOT NULL)) + AND rt.hidden IS NOT TRUE + AND ( + rt.fullname ILIKE '%военный%' + OR + rt.fullname ILIKE '%округ%' + OR + rt.fullname ILIKE '%министерство%' +) + AND rt.fullname NOT ILIKE '%тест%' + N + + + 208 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + recruitment
+ N + Y + N + Y + + + 480 + 320 + +
+ + + +
diff --git a/map_v1/predictive_metrics/data_collection.hpl b/map_v1/predictive_metrics/data_collection.hpl new file mode 100644 index 0000000..068b5da --- /dev/null +++ b/map_v1/predictive_metrics/data_collection.hpl @@ -0,0 +1,203 @@ + + + + data_collection + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/02/27 12:45:14.184 + - + 2025/02/27 12:45:14.184 + + + + + + Table input + Merge join + Y + + + Table input 2 + Merge join + Y + + + Merge join + Table output + Y + + + + Merge join + MergeJoin + + Y + + 1 + + none + + + INNER + + recruitment_id + + + idm_id + + Table input + Table input 2 + + + 768 + 368 + + + + Table input + TableInput + + Y + + 1 + + none + + + postgres.person_registry + N + 0 + WITH year_series AS ( + SELECT generate_series( + date_trunc('year', CURRENT_DATE) - INTERVAL '54 years', + date_trunc('year', CURRENT_DATE) - INTERVAL '1 year', + INTERVAL '1 year' + )::date AS year_date +) +SELECT + COALESCE(r.target_recruitment_id, r.current_recruitment_id) as recruitment_id, + ys.year_date AS year, + COALESCE(COUNT(r.id) FILTER ( + WHERE r.military_registration_date >= ys.year_date + AND r.military_registration_date < ys.year_date + INTERVAL '1 year' + ), 0) AS count_all, + COALESCE(COUNT(r.id) FILTER ( + WHERE r.military_registration_date >= ys.year_date + AND r.military_registration_date < ys.year_date + INTERVAL '1 year' + AND DATE_PART('year', AGE(r.military_registration_date, r.birth_date)) < 18 + ), 0) AS reaching_17_age, + COALESCE(COUNT(r.id) FILTER ( + WHERE r.military_registration_date >= ys.year_date + AND r.military_registration_date < ys.year_date + INTERVAL '1 year' + AND r.gender = 'FEMALE' + ), 0) AS women_military_specialty, + 'Department' as schema +FROM year_series ys +LEFT JOIN recruits r ON 1=1 +GROUP BY ys.year_date, COALESCE(r.target_recruitment_id, r.current_recruitment_id) +ORDER BY recruitment_id, year DESC; + N + + + 544 + 304 + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + -- Берем только записи с максимальной версией для каждого idm_id +SELECT DISTINCT ON (idm_id) idm_id +FROM ervu_dashboard.recruitment +WHERE schema = 'Department' +ORDER BY idm_id, updated_at DESC + + N + + + 544 + 496 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruitment_id + recruitment_id + + + recording_date + year + + + count_all + count_all + + + reaching_17_age + reaching_17_age + + + women_military_specialty + women_military_specialty + + + schema + schema + + + N + N + N + N + Y + N + forecast + Y + registered_citizens
+ N + Y + Y + Y + + + 960 + 368 + +
+ + + +
diff --git a/map_v1/predictive_metrics/next_lvl_org_pm.hpl b/map_v1/predictive_metrics/next_lvl_org_pm.hpl new file mode 100644 index 0000000..d868ab0 --- /dev/null +++ b/map_v1/predictive_metrics/next_lvl_org_pm.hpl @@ -0,0 +1,177 @@ + + + + next_lvl_org_pm + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/02/27 12:55:12.966 + - + 2025/02/27 12:55:12.966 + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH latest_hierarchy AS ( + -- Берем только записи с максимальной версией для каждого idm_id + SELECT DISTINCT ON (idm_id) * + FROM ervu_dashboard.recruitment + ORDER BY idm_id, updated_at DESC +), +hierarchy_cte AS ( + -- Строим связи между уровнями (Department → Organization → Region → Ministry) + SELECT + h.idm_id AS department_id, + h.parent_id AS organization_id, + h2.parent_id AS region_id, + h3.parent_id AS ministry_id + FROM latest_hierarchy h + LEFT JOIN latest_hierarchy h2 ON h.parent_id = h2.idm_id -- Organization + LEFT JOIN latest_hierarchy h3 ON h2.parent_id = h3.idm_id -- Region + WHERE h.schema = 'Department' -- Начинаем с Department +), +aggregated_counts AS ( + -- Агрегируем для Organization + SELECT + h.organization_id AS level_id, + SUM(r.reaching_17_age) AS total_reaching_17_age, + SUM(r.women_military_specialty) AS total_women_military_specialty, + SUM(r.count_all) AS total_count_all, + recording_date AS recording_date, + 'Organization' AS level + FROM forecast.registered_citizens r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.organization_id IS NOT NULL + GROUP BY h.organization_id, recording_date + + UNION ALL + + -- Агрегируем для Region + SELECT + h.region_id AS level_id, + SUM(r.reaching_17_age) AS total_reaching_17_age, + SUM(r.women_military_specialty) AS total_women_military_specialty, + SUM(r.count_all) AS total_count_all, + recording_date AS recording_date, + 'Region' AS level + FROM forecast.registered_citizens r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.region_id IS NOT NULL + GROUP BY h.region_id, recording_date + + UNION ALL + + -- Агрегируем для Ministry + SELECT + h.ministry_id AS level_id, + SUM(r.reaching_17_age) AS total_reaching_17_age, + SUM(r.women_military_specialty) AS total_women_military_specialty, + SUM(r.count_all) AS total_count_all, + recording_date AS recording_date, + 'Ministry' AS level + FROM forecast.registered_citizens r + JOIN hierarchy_cte h ON r.recruitment_id = h.department_id + WHERE h.ministry_id IS NOT NULL + GROUP BY h.ministry_id, recording_date +) +SELECT * FROM aggregated_counts; + N + + + 672 + 304 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruitment_id + level_id + + + reaching_17_age + total_reaching_17_age + + + women_military_specialty + total_women_military_specialty + + + count_all + total_count_all + + + recording_date + recording_date + + + schema + level + + + N + N + N + N + + Y + + N + forecast + Y + registered_citizens
+ + N + Y + N + Y + + + 912 + 304 + +
+ + + +
diff --git a/map_v1/predictive_metrics/predictive.hwf b/map_v1/predictive_metrics/predictive.hwf new file mode 100644 index 0000000..a307c17 --- /dev/null +++ b/map_v1/predictive_metrics/predictive.hwf @@ -0,0 +1,165 @@ + + + predictive + Y + + + + - + 2025/02/27 13:51:40.861 + - + 2025/02/27 13:51:40.861 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 304 + 352 + + + + data_collection.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/predictive_metrics/data_collection.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 448 + 352 + + + + next_lvl_org_pm.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/predictive_metrics/next_lvl_org_pm.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 592 + 352 + + + + predictive_data.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/predictive_metrics/predictive_data.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 736 + 352 + + + + Success + + SUCCESS + + N + 880 + 352 + + + + + + Start + data_collection.hpl + Y + Y + Y + + + data_collection.hpl + next_lvl_org_pm.hpl + Y + Y + N + + + next_lvl_org_pm.hpl + predictive_data.hpl + Y + Y + N + + + predictive_data.hpl + Success + Y + Y + N + + + + + + + debug_plugin + + + diff --git a/map_v1/predictive_metrics/predictive_data.hpl b/map_v1/predictive_metrics/predictive_data.hpl new file mode 100644 index 0000000..14e9197 --- /dev/null +++ b/map_v1/predictive_metrics/predictive_data.hpl @@ -0,0 +1,461 @@ + + + + predictive_data + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/02/27 13:48:40.269 + - + 2025/02/27 13:48:40.269 + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + -- Адаптированный запрос для таблицы forecast.registered_citizens с учетом указанной структуры +-- recording_date - год наблюдения +-- recruitment_id - идентификатор военкомата +-- count_all - всего на учете +-- reaching_17_age - поставлено на учет по достижении 17 лет +-- women_military_specialty - женщины, получившие ВУС +-- schema - уровень военкомата + +-- 1. Проверяем наличие данных за весь необходимый период и создаем полную сетку лет + +WITH RECURSIVE years AS ( -- Теперь синтаксис правильный + SELECT + EXTRACT(YEAR FROM CURRENT_DATE)::int AS year, + 'Текущий год' AS prediction_type + UNION ALL + SELECT + year + 1, + 'Прогнозный год' + FROM years + WHERE year < EXTRACT(YEAR FROM CURRENT_DATE)::int + 49 -- +49, т.к. первый год уже включён +), +year_range AS ( + SELECT + EXTRACT(YEAR FROM CURRENT_DATE) - 54 AS min_year, -- Для первых двух показателей + EXTRACT(YEAR FROM CURRENT_DATE) - 34 AS min_year_females, -- Для женщин с ВУС + EXTRACT(YEAR FROM CURRENT_DATE) AS max_year +), + +all_years AS ( + SELECT generate_series(min_year, max_year) AS year + FROM year_range +), + +all_years_females AS ( + SELECT generate_series(min_year_females, max_year) AS year + FROM year_range +), + +all_regions AS ( + SELECT DISTINCT recruitment_id, schema FROM forecast.registered_citizens +), + +-- 2. Создаем полную сетку регион-год для всех показателей +full_grid_males AS ( + SELECT + r.recruitment_id, + r.schema, + y.year + FROM all_regions r + CROSS JOIN all_years y +), + +full_grid_females AS ( + SELECT + r.recruitment_id, + r.schema, + y.year + FROM all_regions r + CROSS JOIN all_years_females y +), + +-- 3. Объединяем сетку с имеющимися данными, чтобы выявить пропуски +males_data AS ( + SELECT + g.recruitment_id, + g.schema, + g.year, + COALESCE(h.count_all, NULL) AS count_all, + COALESCE(h.reaching_17_age, NULL) AS reaching_17_age + FROM full_grid_males g + LEFT JOIN forecast.registered_citizens h ON g.recruitment_id = h.recruitment_id AND g.year = EXTRACT(YEAR FROM h.recording_date) +), + +females_data AS ( + SELECT + g.recruitment_id, + g.schema, + g.year, + COALESCE(h.women_military_specialty, NULL) AS women_military_specialty + FROM full_grid_females g + LEFT JOIN forecast.registered_citizens h ON g.recruitment_id = h.recruitment_id AND g.year = EXTRACT(YEAR FROM h.recording_date) +), + +-- 4. Рассчитываем статистики для выявления выбросов +males_stats AS ( + SELECT + recruitment_id, + schema, + AVG(count_all) AS avg_count_all, + STDDEV(count_all) AS stddev_count_all, -- σ для фильтрации выбросов + AVG(reaching_17_age) AS avg_reaching_17_age, + STDDEV(reaching_17_age) AS stddev_reaching_17_age -- σ для фильтрации выбросов + FROM males_data + WHERE count_all IS NOT NULL AND reaching_17_age IS NOT NULL + GROUP BY recruitment_id, schema +), + +females_stats AS ( + SELECT + recruitment_id, + schema, + AVG(women_military_specialty) AS avg_women_military_specialty, + STDDEV(women_military_specialty) AS stddev_women_military_specialty -- σ для фильтрации выбросов + FROM females_data + WHERE women_military_specialty IS NOT NULL + GROUP BY recruitment_id, schema +), + +-- 5. Выявляем выбросы и помечаем их для интерполяции +males_outliers AS ( + SELECT + m.recruitment_id, + m.schema, + m.year, + m.count_all, + CASE + WHEN m.count_all IS NULL OR ABS(m.count_all - s.avg_count_all) > s.stddev_count_all + THEN TRUE ELSE FALSE + END AS count_all_is_outlier, + m.reaching_17_age, + CASE + WHEN m.reaching_17_age IS NULL OR ABS(m.reaching_17_age - s.avg_reaching_17_age) > s.stddev_reaching_17_age + THEN TRUE ELSE FALSE + END AS reaching_17_age_is_outlier + FROM males_data m + JOIN males_stats s ON m.recruitment_id = s.recruitment_id AND m.schema = s.schema +), + +females_outliers AS ( + SELECT + f.recruitment_id, + f.schema, + f.year, + f.women_military_specialty, + CASE + WHEN f.women_military_specialty IS NULL OR ABS(f.women_military_specialty - s.avg_women_military_specialty) > s.stddev_women_military_specialty + THEN TRUE ELSE FALSE + END AS women_military_specialty_is_outlier + FROM females_data f + JOIN females_stats s ON f.recruitment_id = s.recruitment_id AND f.schema = s.schema +), + +-- 6. Подготовка данных для интерполяции (находим ближайшие НЕ выбросы) +males_interpolation_prep AS ( + SELECT + mo.recruitment_id, + mo.schema, + mo.year, + mo.count_all, + mo.count_all_is_outlier, + mo.reaching_17_age, + mo.reaching_17_age_is_outlier, + -- Для интерполяции "Всего на учете" ищем ближайшие не-выбросы + (SELECT MAX(year) FROM males_outliers + WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year < mo.year AND NOT count_all_is_outlier) AS prev_year_count_all, + (SELECT MIN(year) FROM males_outliers + WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year > mo.year AND NOT count_all_is_outlier) AS next_year_count_all, + -- Для интерполяции "Поставлено на учет по достижении 17 лет" ищем ближайшие не-выбросы + (SELECT MAX(year) FROM males_outliers + WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year < mo.year AND NOT reaching_17_age_is_outlier) AS prev_year_reaching_17_age, + (SELECT MIN(year) FROM males_outliers + WHERE recruitment_id = mo.recruitment_id AND schema = mo.schema AND year > mo.year AND NOT reaching_17_age_is_outlier) AS next_year_reaching_17_age + FROM males_outliers mo +), + +females_interpolation_prep AS ( + SELECT + fo.recruitment_id, + fo.schema, + fo.year, + fo.women_military_specialty, + fo.women_military_specialty_is_outlier, + -- Для интерполяции "Женщины, получившие ВУС" ищем ближайшие не-выбросы + (SELECT MAX(year) FROM females_outliers + WHERE recruitment_id = fo.recruitment_id AND schema = fo.schema AND year < fo.year AND NOT women_military_specialty_is_outlier) AS prev_year_women_military_specialty, + (SELECT MIN(year) FROM females_outliers + WHERE recruitment_id = fo.recruitment_id AND schema = fo.schema AND year > fo.year AND NOT women_military_specialty_is_outlier) AS next_year_women_military_specialty + FROM females_outliers fo +), + +-- 7. Выполняем линейную интерполяцию для выбросов и отсутствующих значений +males_interpolated AS ( + SELECT + m.recruitment_id, + m.schema, + m.year, + CASE + WHEN m.count_all_is_outlier AND m.prev_year_count_all IS NOT NULL AND m.next_year_count_all IS NOT NULL THEN + -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1) + (SELECT p.count_all FROM males_outliers p + WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_count_all) + + ((m.year - m.prev_year_count_all)::float / (m.next_year_count_all - m.prev_year_count_all)) * + ((SELECT n.count_all FROM males_outliers n + WHERE n.recruitment_id = m.recruitment_id AND n.schema = m.schema AND n.year = m.next_year_count_all) - + (SELECT p.count_all FROM males_outliers p + WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_count_all)) + ELSE m.count_all + END AS count_all, + CASE + WHEN m.reaching_17_age_is_outlier AND m.prev_year_reaching_17_age IS NOT NULL AND m.next_year_reaching_17_age IS NOT NULL THEN + -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1) + (SELECT p.reaching_17_age FROM males_outliers p + WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_reaching_17_age) + + ((m.year - m.prev_year_reaching_17_age)::float / (m.next_year_reaching_17_age - m.prev_year_reaching_17_age)) * + ((SELECT n.reaching_17_age FROM males_outliers n + WHERE n.recruitment_id = m.recruitment_id AND n.schema = m.schema AND n.year = m.next_year_reaching_17_age) - + (SELECT p.reaching_17_age FROM males_outliers p + WHERE p.recruitment_id = m.recruitment_id AND p.schema = m.schema AND p.year = m.prev_year_reaching_17_age)) + ELSE m.reaching_17_age + END AS reaching_17_age + FROM males_interpolation_prep m +), + +females_interpolated AS ( + SELECT + f.recruitment_id, + f.schema, + f.year, + CASE + WHEN f.women_military_specialty_is_outlier AND f.prev_year_women_military_specialty IS NOT NULL AND f.next_year_women_military_specialty IS NOT NULL THEN + -- Linear interpolation formula: y = y1 + ((x - x1) / (x2 - x1)) * (y2 - y1) + (SELECT p.women_military_specialty FROM females_outliers p + WHERE p.recruitment_id = f.recruitment_id AND p.schema = f.schema AND p.year = f.prev_year_women_military_specialty) + + ((f.year - f.prev_year_women_military_specialty)::float / (f.next_year_women_military_specialty - f.prev_year_women_military_specialty)) * + ((SELECT n.women_military_specialty FROM females_outliers n + WHERE n.recruitment_id = f.recruitment_id AND n.schema = f.schema AND n.year = f.next_year_women_military_specialty) - + (SELECT p.women_military_specialty FROM females_outliers p + WHERE p.recruitment_id = f.recruitment_id AND p.schema = f.schema AND p.year = f.prev_year_women_military_specialty)) + ELSE f.women_military_specialty + END AS women_military_specialty + FROM females_interpolation_prep f +), + +-- 8. Объединяем интерполированные данные +combined_data AS ( + SELECT + m.recruitment_id, + m.schema, + m.year, + m.count_all, + m.reaching_17_age, + f.women_military_specialty + FROM males_interpolated m + LEFT JOIN females_interpolated f ON m.recruitment_id = f.recruitment_id AND m.schema = f.schema AND m.year = f.year +), + + + +-- 9. Рассчитываем параметры линейной регрессии +average_values AS ( + SELECT + recruitment_id, + schema, + year, + count_all, + reaching_17_age, + women_military_specialty, + -- Вычисляем средние значения отдельно + AVG(year) FILTER (WHERE count_all IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_count_all, + AVG(count_all) FILTER (WHERE count_all IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_count_all, + AVG(year) FILTER (WHERE reaching_17_age IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_reaching_17_age, + AVG(reaching_17_age) FILTER (WHERE reaching_17_age IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_reaching_17_age, + AVG(year) FILTER (WHERE women_military_specialty IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_x_women_military_specialty, + AVG(women_military_specialty) FILTER (WHERE women_military_specialty IS NOT NULL) OVER (PARTITION BY recruitment_id, schema) AS avg_y_women_military_specialty + FROM combined_data +), +regression_stats AS ( + SELECT + recruitment_id, + schema, + + -- count_all + COUNT(*) FILTER (WHERE count_all IS NOT NULL) AS n_count_all, + AVG(year) FILTER (WHERE count_all IS NOT NULL) AS avg_x_count_all, + AVG(count_all) FILTER (WHERE count_all IS NOT NULL) AS avg_y_count_all, + SUM((year - avg_x_count_all) * (count_all - avg_y_count_all)) FILTER (WHERE count_all IS NOT NULL) AS sum_xy_count_all, + SUM(POWER(year - avg_x_count_all, 2)) FILTER (WHERE count_all IS NOT NULL) AS sum_x_squared_count_all, + + -- reaching_17_age + COUNT(*) FILTER (WHERE reaching_17_age IS NOT NULL) AS n_reaching_17_age, + AVG(year) FILTER (WHERE reaching_17_age IS NOT NULL) AS avg_x_reaching_17_age, + AVG(reaching_17_age) FILTER (WHERE reaching_17_age IS NOT NULL) AS avg_y_reaching_17_age, + SUM((year - avg_x_reaching_17_age) * (reaching_17_age - avg_y_reaching_17_age)) FILTER (WHERE reaching_17_age IS NOT NULL) AS sum_xy_reaching_17_age, + SUM(POWER(year - avg_x_reaching_17_age, 2)) FILTER (WHERE reaching_17_age IS NOT NULL) AS sum_x_squared_reaching_17_age, + + -- women_military_specialty + COUNT(*) FILTER (WHERE women_military_specialty IS NOT NULL) AS n_women_military_specialty, + AVG(year) FILTER (WHERE women_military_specialty IS NOT NULL) AS avg_x_women_military_specialty, + AVG(women_military_specialty) FILTER (WHERE women_military_specialty IS NOT NULL) AS avg_y_women_military_specialty, + SUM((year - avg_x_women_military_specialty) * (women_military_specialty - avg_y_women_military_specialty)) FILTER (WHERE women_military_specialty IS NOT NULL) AS sum_xy_women_military_specialty, + SUM(POWER(year - avg_x_women_military_specialty, 2)) FILTER (WHERE women_military_specialty IS NOT NULL) AS sum_x_squared_women_military_specialty + + FROM average_values + GROUP BY recruitment_id, schema +), + +-- 10. Вычисляем параметры уравнения линейной регрессии +regression_params AS ( + SELECT + recruitment_id, + schema, + -- Параметры для count_all + CASE + WHEN sum_x_squared_count_all <> 0 THEN sum_xy_count_all / sum_x_squared_count_all + ELSE 0 + END AS k_count_all, + avg_y_count_all - (CASE + WHEN sum_x_squared_count_all <> 0 THEN sum_xy_count_all / sum_x_squared_count_all + ELSE 0 + END) * avg_x_count_all AS b_count_all, + + -- Параметры для reaching_17_age + CASE + WHEN sum_x_squared_reaching_17_age <> 0 THEN sum_xy_reaching_17_age / sum_x_squared_reaching_17_age + ELSE 0 + END AS k_reaching_17_age, + avg_y_reaching_17_age - (CASE + WHEN sum_x_squared_reaching_17_age <> 0 THEN sum_xy_reaching_17_age / sum_x_squared_reaching_17_age + ELSE 0 + END) * avg_x_reaching_17_age AS b_reaching_17_age, + + -- Параметры для women_military_specialty + CASE + WHEN sum_x_squared_women_military_specialty <> 0 THEN sum_xy_women_military_specialty / sum_x_squared_women_military_specialty + ELSE 0 + END AS k_women_military_specialty, + avg_y_women_military_specialty - (CASE + WHEN sum_x_squared_women_military_specialty <> 0 THEN sum_xy_women_military_specialty / sum_x_squared_women_military_specialty + ELSE 0 + END) * avg_x_women_military_specialty AS b_women_military_specialty + FROM regression_stats +) + +-- 11. Рассчитываем прогнозные значения на текущий и следующий годы + +SELECT + r.recruitment_id, + r.schema, + MAKE_DATE(y.year, 1, 1) AS prediction_year, + ROUND(r.k_count_all * y.year + r.b_count_all) AS count_all, + ROUND(r.k_reaching_17_age * y.year + r.b_reaching_17_age) AS reaching_17_age, + ROUND(r.k_women_military_specialty * y.year + r.b_women_military_specialty) AS women_military_specialty, + y.prediction_type +FROM years y +CROSS JOIN regression_params r +ORDER BY r.schema, r.recruitment_id, prediction_year; + + N + + + 720 + 304 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruitment_id + recruitment_id + + + schema + schema + + + recording_date + prediction_year + + + count_all + count_all + + + reaching_17_age + reaching_17_age + + + women_military_specialty + women_military_specialty + + + N + N + N + N + + Y + + N + forecast + Y + registered_citizens
+ + N + Y + N + Y + + + 928 + 304 + +
+ + + +
diff --git a/map_v1/project-config.json b/map_v1/project-config.json new file mode 100644 index 0000000..f8d4595 --- /dev/null +++ b/map_v1/project-config.json @@ -0,0 +1,9 @@ +{ + "metadataBaseFolder" : "${PROJECT_HOME}/metadata", + "unitTestsBasePath" : "${PROJECT_HOME}", + "dataSetsCsvFolder" : "${PROJECT_HOME}/datasets", + "enforcingExecutionInHome" : true, + "config" : { + "variables" : [ ] + } +} \ No newline at end of file diff --git a/map_v1/ratings/job_ratings.hwf b/map_v1/ratings/job_ratings.hwf new file mode 100644 index 0000000..fb3352e --- /dev/null +++ b/map_v1/ratings/job_ratings.hwf @@ -0,0 +1,350 @@ + + + job_ratings + Y + + + + 0 + - + 2024/12/24 16:11:59.295 + - + 2024/12/24 16:11:59.295 + + + REG_ID + + + + + VK_ARRAY + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + Y + 464 + 256 + + + + rows_id-array_reg.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/rows_id-array_reg.hpl + Basic + + Y + + N + local + N + N + Y + Y + 704 + 256 + + + + ratings.appear_subpoena.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/ratings/ratings.appear_subpoena.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1104 + 144 + + + + ratings.conscription_info.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/ratings/ratings.conscription_info.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1104 + 256 + + + + ratings.consideration_complaint.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/ratings/ratings.consideration_complaint.hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + N + local + N + N + Y + N + 1104 + 368 + + + + Success + + SUCCESS + + N + 1296 + 144 + + + + Success 2 + + SUCCESS + + N + 1296 + 256 + + + + Success 3 + + SUCCESS + + N + 1296 + 368 + + + + SQL ratings.appear_subppoena + + SQL + + ervu-dashboard + N + delete from ratings.appear_subppoena where recording_date = current_date + N + N + N + 832 + 144 + + + + SQL ratings.conscription_info + + SQL + + ervu-dashboard + N + delete from ratings.conscription_info where recording_date = current_date + N + N + N + 832 + 256 + + + + SQL ratings.consideration_complaint + + SQL + + ervu-dashboard + N + delete from ratings.consideration_complaint where recording_date = current_date + N + N + N + 832 + 368 + + + + + + Start + rows_id-array_reg.hpl + Y + Y + Y + + + ratings.appear_subpoena.hpl + Success + Y + Y + N + + + ratings.consideration_complaint.hpl + Success 3 + Y + Y + N + + + ratings.conscription_info.hpl + Success 2 + Y + Y + N + + + rows_id-array_reg.hpl + SQL ratings.appear_subppoena + Y + Y + N + + + SQL ratings.appear_subppoena + ratings.appear_subpoena.hpl + Y + Y + N + + + rows_id-array_reg.hpl + SQL ratings.conscription_info + Y + Y + N + + + SQL ratings.conscription_info + ratings.conscription_info.hpl + Y + Y + N + + + rows_id-array_reg.hpl + SQL ratings.consideration_complaint + N + Y + N + + + SQL ratings.consideration_complaint + ratings.consideration_complaint.hpl + Y + Y + N + + + Start + SQL ratings.consideration_complaint + Y + Y + Y + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 496 + 48 + запуск после отработки регионов /region/job_recruitments_region + 372 + + + + diff --git a/map_v1/ratings/ratings.appear_subpoena.hpl b/map_v1/ratings/ratings.appear_subpoena.hpl new file mode 100644 index 0000000..1719485 --- /dev/null +++ b/map_v1/ratings/ratings.appear_subpoena.hpl @@ -0,0 +1,228 @@ + + + + ratings.appear_subpoena + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/24 16:15:10.943 + - + 2024/12/24 16:15:10.943 + + + + + + Table input + Get variables + Y + + + Get variables + Select values + Y + + + Select values + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + + + 592 + 256 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id_region + REG_ID + + ratings + appear_subppoena
+ + appear_mil_com + appear_mil_com + Y + + + appear_mil_com_percent + appear_mil_com_percent + Y + + + id_region + region_id + N + +
+ N + + + 976 + 256 + +
+ + Select values + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.create_date, + s.department_id AS recruitment_id, + s.status_id, + sr.type, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date, + ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn + FROM public.subpoena s + JOIN subpoena_status ss ON s.status_id = ss.id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + JOIN subpoena_history AS sh ON sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + WHERE ('${VK_ARRAY}' IS NULL + OR '${VK_ARRAY}' = '' + OR s.department_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + ) + AND sr.type IS NOT NULL + AND ssh.code NOT IN ('3.7','3.72', '3.71') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +last_status AS ( + SELECT * + FROM subpoena_data + WHERE rn = 1 +), +season_separations AS ( + SELECT distinct + ls.recruitment_id, + ls.create_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date + FROM last_status ls + WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) +) +SELECT + '${REG_ID}' AS region_id, + COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2')) AS appear_mil_com, + ROUND( + COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2'))::NUMERIC / NULLIF(COUNT(*), 0) * 100, 2 + ) AS appear_mil_com_percent +FROM season_separations tt +HAVING COUNT(*) FILTER (WHERE tt.sub_stat_hist IN ('4.1', '4.2')) > 0; + + Y + + + 416 + 256 + + + + + +
diff --git a/map_v1/ratings/ratings.conscription_info.hpl b/map_v1/ratings/ratings.conscription_info.hpl new file mode 100644 index 0000000..e967cbc --- /dev/null +++ b/map_v1/ratings/ratings.conscription_info.hpl @@ -0,0 +1,242 @@ + + + + ratings.conscription_info + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/24 16:16:57.706 + - + 2024/12/24 16:16:57.706 + + + + + + Get variables + Select values + Y + + + Select values + Insert / update + Y + + + Table input + Get variables + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + + + 816 + 368 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id_region + REG_ID + + + = + spring_autumn + spring_autumn + + ratings + conscription_info
+ + execution + appear_mil_com + Y + + + execution_percent + appear_mil_com_percent + Y + + + id_region + region_id + N + + + spring_autumn + spring_autumn + N + +
+ N + + + 1200 + 368 + +
+ + Select values + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + + + 992 + 368 + + + + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + WITH +subpoena_data AS ( + SELECT + s.id AS subpoena_id, + s.create_date, + s.department_id AS recruitment_id, + s.status_id, + sr.type, + ssh.code AS sub_stat_hist, + s.send_date, + sh.date_time::timestamp AS history_date--, + --ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn + FROM public.subpoena s + JOIN subpoena_status ss ON s.status_id = ss.id + JOIN subpoena_reason AS sr ON sr.id = s.reason_id + JOIN subpoena_history AS sh ON sh.subpoena_id = s.id + JOIN subpoena_status AS ssh ON ssh.id = sh.status_id + WHERE ('${VK_ARRAY}' IS NULL + OR '${VK_ARRAY}' = '' + OR s.department_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + ) + AND sr.type = '3' + AND ssh.code NOT IN ('3.7','3.72', '3.71') + AND EXISTS ( + SELECT 1 + FROM subpoena_history sh2 + WHERE sh2.subpoena_id = s.id + AND sh2.status_id = (SELECT id FROM subpoena_status WHERE code = '3') + ) +), +/*last_status AS ( + SELECT * + FROM subpoena_data + WHERE rn = 1 +),*/ +season_separations AS ( + SELECT distinct + ls.recruitment_id, + ls.create_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + CASE + WHEN EXTRACT(MONTH FROM ls.create_date) BETWEEN 1 AND 6 THEN 'Весна' + WHEN EXTRACT(MONTH FROM ls.create_date) BETWEEN 7 AND 12 THEN 'Осень' + END AS spring_autumn + FROM subpoena_data ls + --WHERE ls.create_date >= DATE_TRUNC('year', CURRENT_DATE) +) +SELECT + '${REG_ID}' AS region_id, + tt.spring_autumn, + COUNT(distinct tt.subpoena_id) FILTER (WHERE tt.sub_stat_hist IN ('5')) AS appear_mil_com, + ROUND( + COUNT(distinct tt.subpoena_id) FILTER (WHERE tt.sub_stat_hist IN ('5'))::NUMERIC / NULLIF(COUNT(distinct tt.subpoena_id), 0) * 100, 2 + ) AS appear_mil_com_percent +FROM season_separations tt +group by tt.spring_autumn + Y + + + 640 + 368 + + + + + +
diff --git a/map_v1/ratings/ratings.consideration_complaint.hpl b/map_v1/ratings/ratings.consideration_complaint.hpl new file mode 100644 index 0000000..1ea3fb9 --- /dev/null +++ b/map_v1/ratings/ratings.consideration_complaint.hpl @@ -0,0 +1,219 @@ + + + + ratings.consideration_complaint + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/24 16:18:12.882 + - + 2024/12/24 16:18:12.882 + + + + + + Table input + Get variables + N + + + Get variables + Select values + N + + + Select values + Insert / update + N + + + Table input + Insert / update + Y + + + + Get variables + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + + + 624 + 416 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id_region + region_id + + + + = + recording_date + recording_date + + + ratings + consideration_complaint
+ + consideration_complaint + consideration_complaint + Y + + + consideration_complaint_percent + consideration_complaint_percent + Y + + + id_region + region_id + N + + + recording_date + recording_date + N + +
+ N + + + 976 + 224 + +
+ + Select values + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + + + 784 + 416 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + -- '1' - Удовлетворена, '2' - Частично удовлетворена, '3' - Отказано в удовлетворении +--WITH total AS ( +-- SELECT * +-- FROM public.appeal_document ad +-- WHERE extra_info->>'result' IN ('1', '2', '3') +-- AND ( +-- '${VK_ARRAY}' IS NULL +-- OR '${VK_ARRAY}' = '' +-- OR ad.vk_id = ANY ( +-- string_to_array( +-- trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' +-- )::uuid[] +-- ) +-- ) +--) +--SELECT +-- '${REG_ID}' AS region_id, +-- COUNT(*) FILTER (WHERE tt.extra_info->>'result' IN ('1', '2')) AS consideration_complaint, +-- ROUND( +-- COUNT(*) FILTER (WHERE tt.extra_info->>'result' IN ('1', '2'))::NUMERIC / NULLIF(COUNT(*), 0) * 100, 2 +-- ) AS consideration_complaint_percent +--FROM total tt; + +select +count(*) as total_count, +count(*) FILTER (where solution_type='Решено') AS consideration_complaint, +COALESCE(ROUND((count(*) FILTER (where solution_type='Решено'))* 100 / NULLIF(count(*),0), 0),0) as consideration_complaint_percent, +region_id, +current_date as recording_date +from appeals.appeals_list +where region_id is not null +group by region_id + N + + + 400 + 224 + + + + + +
diff --git a/map_v1/recording_date/job_last_recording_date.hwf b/map_v1/recording_date/job_last_recording_date.hwf new file mode 100644 index 0000000..b4f60ab --- /dev/null +++ b/map_v1/recording_date/job_last_recording_date.hwf @@ -0,0 +1,171 @@ + + + job_last_recording_date + Y + + + + - + 2024/08/21 15:46:54.029 + - + 2024/08/21 15:46:54.029 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 208 + 240 + + + + Success + + SUCCESS + + N + 656 + 240 + + + + last_recording_date + + PIPELINE + + N + N + N + N + N + N + ${Internal.Entry.Current.Folder}/last_recording_date.hpl + Basic + + Y + + N + local + N + N + Y + N + 496 + 240 + + + + SQL.delete + + SQL + + ervu-dashboard + N + update public.last_recording_date +set entry = '1', +start_time = now() + + + + N + N + N + 432 + 64 + + + + SQL.delete 2 + + SQL + + ervu-dashboard + N + delete from public.last_recording_date + + + + + N + N + N + 352 + 240 + + + + + + Start + SQL.delete + N + Y + Y + + + SQL.delete + last_recording_date + N + N + Y + + + last_recording_date + Success + Y + Y + N + + + SQL.delete + Success + N + Y + N + + + Start + SQL.delete 2 + Y + Y + Y + + + SQL.delete 2 + last_recording_date + Y + Y + N + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/recording_date/last_recording_date.hpl b/map_v1/recording_date/last_recording_date.hpl new file mode 100644 index 0000000..be0aeb5 --- /dev/null +++ b/map_v1/recording_date/last_recording_date.hpl @@ -0,0 +1,100 @@ + + + last_recording_date + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/10/07 16:03:14.552 + - + 2024/10/07 16:03:14.552 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + ervu-dashboard + 100 + N + + public + last_recording_date
+ + entry + entry + = + + + + entry + entry + Y + +
+ + + + 848 + 128 + Y + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + SELECT +'1' as entry +FROM public.decision_reason +limit 1 + 0 + + N + N + N + + + + 496 + 128 + Y + + + + + +
diff --git a/map_v1/region/appeals.reasons_appeal(reg).hpl b/map_v1/region/appeals.reasons_appeal(reg).hpl new file mode 100644 index 0000000..ca290ca --- /dev/null +++ b/map_v1/region/appeals.reasons_appeal(reg).hpl @@ -0,0 +1,245 @@ + + + + appeals.reasons_appeal(reg) + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/27 11:51:55.468 + - + 2025/01/27 11:51:55.468 + + + + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) 2 + Execute SQL script 2 + Y + + + Table input (appeal_document) регионы + Insert / update (main_dashboard.appeals) 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM appeals.reasons_appeal +WHERE recording_date = current_date + AND schema = 'Organization' + + + 512 + 336 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.reasons_appeal +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + + + 1296 + 336 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + schema + schema + + + = + recording_date + recording_date + + appeals + reasons_appeal
+ + recruitment_id + recruitment_id + N + + + schema + schema + N + + + appeal + appeal + Y + + + incorrect_inf + incorrect_inf + Y + + + incorrect_inf_percent + incorrect_inf_percent + Y + + + sending_documents + sending_documents + Y + + + sending_documents_percent + sending_documents_percent + Y + + + decision_disagreement + decision_disagreement + Y + + + decision_disagreement_persent + decision_disagreement_percent + Y + + + complaint_withdrawal + complaint_withdrawal + Y + + + complaint_withdrawal_percent + complaint_withdrawal_percent + Y + +
+ Y + + + 1056 + 336 + +
+ + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id +), +summary_counts AS ( + SELECT + region_id AS recruitment_id, + COUNT(*) AS total_appeals, + COUNT(*) FILTER (WHERE fact ILIKE 'Внесли изменения%') AS incorrect_inf, -- Некорректные данные + COUNT(*) FILTER (WHERE fact ILIKE 'Досыл%') AS sending_documents, -- Досыл документов + COUNT(*) FILTER (WHERE fact ILIKE 'Не согласен%') AS decision_disagreement, -- Несогласие с решением + COUNT(*) FILTER (WHERE fact ILIKE 'Прошу%') AS complaint_withdrawal -- Отзыв жалобы + FROM appeals.appeals_list + WHERE region_id::uuid IN (SELECT recruitment_id FROM ids) + GROUP BY region_id +) +SELECT + 'Organization' AS schema, + i.recruitment_id, + current_date AS recording_date, + COALESCE(sc.total_appeals, 0) AS appeal, + COALESCE(sc.incorrect_inf, 0) AS incorrect_inf, + COALESCE(sc.sending_documents, 0) AS sending_documents, + COALESCE(sc.decision_disagreement, 0) AS decision_disagreement, + COALESCE(sc.complaint_withdrawal, 0) AS complaint_withdrawal, + COALESCE(ROUND(sc.incorrect_inf * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS incorrect_inf_percent, + COALESCE(ROUND(sc.sending_documents * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS sending_documents_percent, + COALESCE(ROUND(sc.decision_disagreement * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS decision_disagreement_percent, + COALESCE(ROUND(sc.complaint_withdrawal * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS complaint_withdrawal_percent +FROM ids i +LEFT JOIN summary_counts sc ON sc.recruitment_id = i.recruitment_id; + Y + + + 720 + 336 + + + + + +
diff --git a/map_v1/region/appeals.review_rating.hpl b/map_v1/region/appeals.review_rating.hpl new file mode 100644 index 0000000..30e2d79 --- /dev/null +++ b/map_v1/region/appeals.review_rating.hpl @@ -0,0 +1,156 @@ + + + + appeals.review_rating + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/28 14:15:12.495 + - + 2025/01/28 14:15:12.495 + + + + + + Table input + Insert / update + Y + + + Execute SQL script + Table input + Y + + + + Execute SQL script + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + + N + + N + + N + N + N + DELETE FROM appeals.review_rating WHERE recording_date = current_date AND schema = 'Organization' + + + + 416 + 464 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + schema + schema + + appeals + review_rating
+ + schema + schema + N + + + recruitment_id + recruitment_id + N + + + speed + average_consideration + Y + + + rating + average_rating + Y + +
+ N + + + 864 + 464 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + current_date AS recording_date, + 'Organization' AS schema, + ap.average_rating, + ap.average_consideration, + ap.recruitment_id +FROM main_dashboard.appeals ap +WHERE recording_date = current_date AND schema = 'Organization' + + N + + + 640 + 464 + + + + + +
diff --git a/map_v1/region/appeals.topic_appeal(reg).hpl b/map_v1/region/appeals.topic_appeal(reg).hpl new file mode 100644 index 0000000..e1517a2 --- /dev/null +++ b/map_v1/region/appeals.topic_appeal(reg).hpl @@ -0,0 +1,248 @@ + + + + appeals.topic_appeal(reg) + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/25 13:26:59.797 + - + 2025/03/25 13:26:59.797 + + + + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) 2 + Execute SQL script 2 + Y + + + Table input (appeal_document) регионы + Insert / update (main_dashboard.appeals) 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM appeals.topic_appeal +WHERE recording_date = current_date + AND schema = 'Organization' + + + 528 + 320 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + DELETE FROM appeals.topic_appeal +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + + + 1312 + 320 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + + = + schema + schema + + + + = + recording_date + recording_date + + + appeals + topic_appeal
+ + recruitment_id + recruitment_id + N + + + schema + schema + N + + + registration + registration + Y + + + registration_percent + registration_percent + Y + + + sabpoena + sabpoena + Y + + + sabpoena_percent + sabpoena_percent + Y + + + temporary_measures + temporary_measures + Y + + + temporary_measures_percent + temporary_measures_percent + Y + + + recording_date + recording_date + N + + + appear + appeal + Y + +
+ Y + + + 1072 + 320 + +
+ + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id +), +summary_counts AS ( + SELECT + region_id AS recruitment_id, + COUNT(*) AS total_appeals, + SUM( + CASE + WHEN subcategory LIKE 'Решение о постановке на воинский учёт%' + OR subcategory LIKE 'Отзыв ранее направленной жалобы по воинскому учету%' + OR subcategory LIKE 'Досыл документов к ранее направленной жалобе по воинскому учету%' + OR subcategory LIKE 'Решение об отказе во внесении изменений в Реестр воинского учёта%' + THEN 1 ELSE 0 + END + ) AS registration, -- постановка на учет + SUM(CASE WHEN subcategory LIKE 'Решение (заключение) призывной комиссии по призыву граждан на военную службу%' THEN 1 ELSE 0 END) AS sabpoena, -- повестки (призыв на службу) + SUM(CASE WHEN subcategory LIKE 'Решение об установлении ограничительных мер%' THEN 1 ELSE 0 END) AS temporary_measures -- временные меры + FROM appeals.appeals_list + WHERE region_id::uuid IN (SELECT recruitment_id FROM ids) + GROUP BY region_id +) +SELECT + 'Organization' AS schema, + i.recruitment_id, + current_date AS recording_date, + COALESCE(sc.total_appeals, 0) AS appeal, + COALESCE(sc.registration, 0) AS registration, + COALESCE(sc.sabpoena, 0) AS sabpoena, + COALESCE(sc.temporary_measures, 0) AS temporary_measures, + COALESCE(ROUND(sc.registration * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS registration_percent, + COALESCE(ROUND(sc.sabpoena * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS sabpoena_percent, + COALESCE(ROUND(sc.temporary_measures * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS temporary_measures_percent +FROM ids i +LEFT JOIN summary_counts sc ON sc.recruitment_id = i.recruitment_id + Y + + + 736 + 320 + + + + + +
diff --git a/map_v1/region/array_reg.hwf b/map_v1/region/array_reg.hwf new file mode 100644 index 0000000..f0a19d0 --- /dev/null +++ b/map_v1/region/array_reg.hwf @@ -0,0 +1,157 @@ + + + array_reg + Y + + + + 0 + - + 2024/12/10 09:44:55.162 + - + 2024/12/10 09:44:55.162 + + + ORG_ROW + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 400 + 304 + + + + Success + + SUCCESS + + N + 1152 + 304 + + + + select_recruitments_region(reg)rows.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/select_recruitments_region(reg)rows.hpl + Basic + + Y + + N + local + N + N + Y + N + 720 + 304 + + + + select_recruitments_region(reg).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/region/select_recruitments_region(reg).hpl + txt + C:\Users\acer\Desktop\лог + Rowlevel + + + ORG_ROW + ORGANIZATION_ROW + + + Y + + Y + local + N + N + Y + N + 976 + 304 + + + + SQL + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.array_reg + N + N + N + 560 + 304 + + + + + + select_recruitments_region(reg)rows.hpl + select_recruitments_region(reg).hpl + Y + Y + N + + + select_recruitments_region(reg).hpl + Success + Y + Y + N + + + Start + SQL + Y + Y + Y + + + SQL + select_recruitments_region(reg)rows.hpl + Y + Y + Y + + + + + + diff --git a/map_v1/region/auxiliary/array_region.hpl b/map_v1/region/auxiliary/array_region.hpl new file mode 100644 index 0000000..944c416 --- /dev/null +++ b/map_v1/region/auxiliary/array_region.hpl @@ -0,0 +1,73 @@ + + + + array_region + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/27 17:33:33.546 + - + 2025/01/27 17:33:33.546 + + + + + + Table input + Copy rows to result + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT ARRAY_AGG(idm_id) AS ARRAY_REGION +FROM ervu_dashboard.recruitment +WHERE schema = 'Organization' + N + + + 432 + 240 + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 704 + 240 + + + + + + diff --git a/map_v1/region/auxiliary/update_appeal_recruitments.hpl b/map_v1/region/auxiliary/update_appeal_recruitments.hpl new file mode 100644 index 0000000..5ac4250 --- /dev/null +++ b/map_v1/region/auxiliary/update_appeal_recruitments.hpl @@ -0,0 +1,291 @@ + + + + update_appeal_recruitments + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/27 13:36:22.747 + - + 2025/01/27 13:36:22.747 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + region + region + + appeals + appeals_list
+ + region + region + N + + + region_id + idm_id + Y + +
+ N + + + 784 + 144 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH ranked_recruitment AS ( + SELECT + rt.idm_id, + rt.shortname, + al.region, + row_number() OVER (PARTITION BY al.region ORDER BY rt.shortname) AS rn + FROM + appeals.appeals_list al + JOIN + ervu_dashboard.recruitment rt + ON + (al.region ILIKE '%Адыге%' AND rt.shortname ILIKE '%Адыге%') +OR (al.region ILIKE '%Республик%Башк%р%' AND rt.shortname ILIKE '%Республик%Башк%р%') +OR (al.region ILIKE '%Республик%Бурят%' AND rt.shortname ILIKE '%Республик%Бурят%') +OR (al.region ILIKE '%Республик%Алтай%' AND rt.shortname ILIKE '%Республик%Алтай%') +OR (al.region ILIKE '%Дагест%' AND rt.shortname ILIKE '%Дагест%') +OR (al.region ILIKE '%Ингушет%' AND rt.shortname ILIKE '%Ингушет%') +OR (al.region ILIKE '%Кабардино-Балкар%' AND rt.shortname ILIKE '%Кабардино-Балкар%') +OR (al.region ILIKE '%Республик%Калмыки%' AND rt.shortname ILIKE '%Республик%Калмыки%') +OR (al.region ILIKE '%Карачаево-Черкесс%Республик%' AND rt.shortname ILIKE '%Карачаево-Черкесс%Республик%') +OR (al.region ILIKE '%Карел%' AND rt.shortname ILIKE '%Карел%') +OR (al.region ILIKE '%Коми%' AND rt.shortname ILIKE '%Коми%') +OR (al.region ILIKE '%Марий%Эл%' AND rt.shortname ILIKE '%Марий%Эл%') +OR (al.region ILIKE '%Мордови%' AND rt.shortname ILIKE '%Мордови%') +OR (al.region ILIKE '%Саха%(Якутия)%' AND rt.shortname ILIKE '%Саха%(Якутия)%') +OR (al.region ILIKE '%Северн%Осети%Алан%' AND rt.shortname ILIKE '%Северн%Осети%Алан%') +OR (al.region ILIKE '%Татарстан%' AND rt.shortname ILIKE '%Татарстан%') +OR (al.region ILIKE '%Тыва%' AND rt.shortname ILIKE '%Тыва%') +OR (al.region ILIKE '%Удмуртск%' AND rt.shortname ILIKE '%Удмуртск%') +OR (al.region ILIKE '%Хакас%' AND rt.shortname ILIKE '%Хакас%') +OR (al.region ILIKE '%Чеченск%' AND rt.shortname ILIKE '%Чеченск%') +OR (al.region ILIKE '%Чуваш%' AND rt.shortname ILIKE '%Чуваш%') +OR (al.region ILIKE '%Алтайск%кра%' AND rt.shortname ILIKE '%Алтайск%кра%') +OR (al.region ILIKE '%Краснодарск%' AND rt.shortname ILIKE '%Краснодарск%') +OR (al.region ILIKE '%Красноярск%' AND rt.shortname ILIKE '%Красноярск%') +OR (al.region ILIKE '%Приморск%' AND rt.shortname ILIKE '%Приморск%') +OR (al.region ILIKE '%Ставропольск%' AND rt.shortname ILIKE '%Ставропольск%') +OR (al.region ILIKE '%Хабаровск%' AND rt.shortname ILIKE '%Хабаровск%') +OR (al.region ILIKE '%Амурск%' AND rt.shortname ILIKE '%Амурск%') +OR (al.region ILIKE '%Архангельск%' AND rt.shortname ILIKE '%Архангельск%') +OR (al.region ILIKE '%Астраханск%' AND rt.shortname ILIKE '%Астраханск%') +OR (al.region ILIKE '%Белгородск%' AND rt.shortname ILIKE '%Белгородск%') +OR (al.region ILIKE '%Брянск%' AND rt.shortname ILIKE '%Брянск%') +OR (al.region ILIKE '%Владимирск%' AND rt.shortname ILIKE '%Владимирск%') +OR (al.region ILIKE '%Волгоградск%' AND rt.shortname ILIKE '%Волгоградск%') +OR (al.region ILIKE '%Вологодск%' AND rt.shortname ILIKE '%Вологодск%') +OR (al.region ILIKE '%Воронежск%' AND rt.shortname ILIKE '%Воронежск%') +OR (al.region ILIKE '%Ивановск%' AND rt.shortname ILIKE '%Ивановск%') +OR (al.region ILIKE '%Иркутск%' AND rt.shortname ILIKE '%Иркутск%') +OR (al.region ILIKE '%Калининградск%' AND rt.shortname ILIKE '%Калининградск%') +OR (al.region ILIKE '%Калужск%' AND rt.shortname ILIKE '%Калужск%') +OR (al.region ILIKE '%Камчатск%' AND rt.shortname ILIKE '%Камчатск%') +OR (al.region ILIKE '%Кемеровск%' AND rt.shortname ILIKE '%Кемеровск%') +OR (al.region ILIKE '%Кировск%' AND rt.shortname ILIKE '%Кировск%') +OR (al.region ILIKE '%Костромск%' AND rt.shortname ILIKE '%Костромск%') +OR (al.region ILIKE '%Курганск%' AND rt.shortname ILIKE '%Курганск%') +OR (al.region ILIKE '%Курск%' AND rt.shortname ILIKE '%Курск%') +OR (al.region ILIKE '%Ленинградск%' AND rt.shortname ILIKE '%Ленинградск%') +OR (al.region ILIKE '%Липецк%' AND rt.shortname ILIKE '%Липецк%') +OR (al.region ILIKE '%Магаданск%' AND rt.shortname ILIKE '%Магаданск%') +OR (al.region ILIKE '%Московск%' AND rt.shortname ILIKE '%Московск%') +OR (al.region ILIKE '%Мурманск%' AND rt.shortname ILIKE '%Мурманск%') +OR (al.region ILIKE '%Нижегородск%' AND rt.shortname ILIKE '%Нижегородск%') +OR (al.region ILIKE '%Новгородск%' AND rt.shortname ILIKE '%Новгородск%') +OR (al.region ILIKE '%Новосибирск%' AND rt.shortname ILIKE '%Новосибирск%') +OR (al.region ILIKE '%Омск%обл%' AND rt.shortname ILIKE 'ВК Омск%обл%' and rt.shortname NOT ILIKE '%Костромс%' and rt.shortname NOT ILIKE 'Военный комиссариат Томск%') +OR (al.region ILIKE '%Оренбургск%' AND rt.shortname ILIKE '%Оренбургск%') +OR (al.region ILIKE '%Орловск%' AND rt.shortname ILIKE '%Орловск%') +OR (al.region ILIKE '%Пензенск%' AND rt.shortname ILIKE '%Пензенск%') +OR (al.region ILIKE '%Пермск$' AND rt.shortname ILIKE '%Пермск$') +OR (al.region ILIKE '%Псковск%' AND rt.shortname ILIKE '%Псковск%') +OR (al.region ILIKE '%Ростовск%' AND rt.shortname ILIKE '%Ростовск%') +OR (al.region ILIKE '%Рязанск%' AND rt.shortname ILIKE '%Рязанск%') +OR (al.region ILIKE '%Самарск%' AND rt.shortname ILIKE '%Самарск%') +OR (al.region ILIKE '%Саратовск%' AND rt.shortname ILIKE '%Саратовск%') +OR (al.region ILIKE '%Сахалинск%' AND rt.shortname ILIKE '%Сахалинск%') +OR (al.region ILIKE '%Свердловск%' AND rt.shortname ILIKE '%Свердловск%') +OR (al.region ILIKE '%Смоленск%' AND rt.shortname ILIKE '%Смоленск%') +OR (al.region ILIKE '%Тамбовск%' AND rt.shortname ILIKE '%Тамбовск%') +OR (al.region ILIKE '%Тверск%' AND rt.shortname ILIKE '%Тверск%') +OR (al.region ILIKE '%Томск%обл%' AND rt.shortname ILIKE 'Военный комиссариат Томской обл%' and rt.shortname NOT ILIKE '%Костромс%' and rt.shortname NOT ILIKE 'Военный комиссариат Омск%') +OR (al.region ILIKE '%Тульск%' AND rt.shortname ILIKE '%Тульск%') +OR (al.region ILIKE '%Тюменск%' AND rt.shortname ILIKE '%Тюменск%') +OR (al.region ILIKE '%Ульяновск%' AND rt.shortname ILIKE '%Ульяновск%') +OR (al.region ILIKE '%Челябинск%' AND rt.shortname ILIKE '%Челябинск%') +OR (al.region ILIKE '%Забайкальск%' AND rt.shortname ILIKE '%Забайкальск%') +OR (al.region ILIKE '%Ярославск%' AND rt.shortname ILIKE '%Ярославск%') +OR (al.region ILIKE '%г%Москв%' AND rt.shortname ILIKE '%г%Москв%') +OR (al.region ILIKE '%г%Санкт-Петербург%' AND rt.shortname ILIKE '%г%Санкт-Петербург%') +OR (al.region ILIKE '%Еврейск%автономн%' AND rt.shortname ILIKE '%Еврейск%автономн%') +OR (al.region ILIKE '%Ненецк%автономн%' AND rt.shortname ILIKE '%Ненецк%автономн%') +OR (al.region ILIKE '%Хант%Мансийск%' AND rt.shortname ILIKE '%Хант%Мансийск%') +OR (al.region ILIKE '%Чукотск%автономн%' AND rt.shortname ILIKE '%Чукотск%автономн%') +OR (al.region ILIKE '%Ямал%Ненецк%автономн%' AND rt.shortname ILIKE '%Ямал%Ненецк%автономн%') +OR (al.region ILIKE '%Крым%' AND rt.shortname ILIKE '%Крым%') +OR (al.region ILIKE '%г%Севастопол%' AND rt.shortname ILIKE '%г%Севастопол%') +OR (al.region ILIKE '%Запорожск%' AND rt.shortname ILIKE '%Запорожск%') +OR (al.region ILIKE '%Донецк%Народн%' AND rt.shortname ILIKE '%Донецк%Народн%') +OR (al.region ILIKE '%Луганск%Народн%' AND rt.shortname ILIKE '%Луганск%Народн%') +OR (al.region ILIKE '%Херсонск%' AND rt.shortname ILIKE '%Херсонск%') +WHERE + rt.schema = 'Organization' +) +SELECT DISTINCT + idm_id, + shortname, + region +FROM ranked_recruitment rrt +where +(rrt.region ILIKE '%Адыге%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Республик%Башк%р%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Республик%Бурят%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Республик%Алтай' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Дагест%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ингушет%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Кабардино-Балкар%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Республик%Калмыки%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Карачаево-Черкесс%Республик%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Карел%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Коми%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Марий%Эл%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Мордови%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Саха%(Якутия)%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Северн%Осети%Алан%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Татарстан%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Тыва%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Удмуртск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Хакас%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Чеченск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Чуваш%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Алтайск%кра%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Краснодарск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Красноярск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Приморск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ставропольск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Хабаровск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Амурск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Архангельск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Астраханск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Белгородск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Брянск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Владимирск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Волгоградск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Вологодск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Воронежск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ивановск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Иркутск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Калининградск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Калужск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Камчатск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Кемеровск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Кировск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Костромск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Курганск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Курск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ленинградск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Липецк%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Магаданск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Московск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Мурманск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Нижегородск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Новгородск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Новосибирск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Омск%обл%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Оренбургск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Орловск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Пензенск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Пермск$' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Псковск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ростовск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Рязанск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Самарск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Саратовск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Сахалинск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Свердловск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Смоленск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Тамбовск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Тверск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Томск%обл%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Тульск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Тюменск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ульяновск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Челябинск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Забайкальск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ярославск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%г%Москв%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%г%Санкт-Петербург%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Еврейск%автономн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ненецк%автономн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Хант%Мансийск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Чукотск%автономн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Ямал%Ненецк%автономн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Крым%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%г%Севастопол%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Запорожск%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Донецк%Народн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Луганск%Народн%' AND rrt.rn = 1) OR +(rrt.region ILIKE '%Херсонск%' AND rrt.rn = 1); + + N + + + 480 + 144 + + + + + +
diff --git a/map_v1/region/job_get_rows_reg.hwf b/map_v1/region/job_get_rows_reg.hwf new file mode 100644 index 0000000..85eac85 --- /dev/null +++ b/map_v1/region/job_get_rows_reg.hwf @@ -0,0 +1,120 @@ + + + job_get_rows_reg + Y + + + + - + 2024/12/10 12:37:22.616 + - + 2024/12/10 12:37:22.616 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 432 + 336 + + + + array_reg.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/region/array_reg.hwf + Nothing + + Y + + N + local + N + N + Y + N + 592 + 336 + + + + Success + + SUCCESS + + N + 912 + 336 + + + + rows_id-array_reg.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/rows_id-array_reg.hpl + Basic + + Y + + N + local + N + N + Y + N + 768 + 336 + + + + + + Start + array_reg.hwf + Y + Y + Y + + + array_reg.hwf + rows_id-array_reg.hpl + Y + Y + N + + + rows_id-array_reg.hpl + Success + Y + Y + N + + + + + + diff --git a/map_v1/region/job_recruitments_region.hwf b/map_v1/region/job_recruitments_region.hwf new file mode 100644 index 0000000..c7f3efd --- /dev/null +++ b/map_v1/region/job_recruitments_region.hwf @@ -0,0 +1,1771 @@ + + + job_recruitments_region + Y + + + + 0 + - + 2024/08/15 16:02:12.821 + - + 2024/08/15 16:02:12.821 + + + ARR_REG + + + + + PRNT_ID + + + + + REC_ID + + + + + REG_ID + + + + + SCM + + + + + VK_ARRAY + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 688 + 784 + + + + main_dashboard.appeals(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.appeals(reg).hpl + txt + ${Internal.Entry.Current.Folder}/\logs\appeals + Basic + + + ARR_REG + ARRAY_REGION + + Y + + Y + local + N + N + Y + Y + 1696 + 256 + + + + Success + + SUCCESS + + N + 1936 + 256 + + + + main_dashboard.recruitment_campaign(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.recruitment_campaign(reg).hpl + txt + C:\Users\acer\Desktop\лог + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 400 + + + + Success 2 + + SUCCESS + + N + 2224 + 400 + + + + main_dashboard.total_registered(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.total_registered(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 464 + + + + Success 3 + + SUCCESS + + N + 2224 + 464 + + + + main_dashboard.waiting_registration(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/main_dashboard.waiting_registration(reg).hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1696 + 528 + + + + Success 4 + + SUCCESS + + N + 2224 + 528 + + + + recruitment_campaign.subpoenas(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/recruitment_campaign.subpoenas(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 592 + + + + Success 6 + + SUCCESS + + N + 2224 + 592 + + + + total_registered.reg_mil_cat(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.reg_mil_cat(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 656 + + + + Success 7 + + SUCCESS + + N + 2224 + 656 + + + + total_registered.removed_registry(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.removed_registry(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 720 + + + + Success 8 + + SUCCESS + + N + 2224 + 720 + + + + total_registered.subpoenas(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.subpoenas(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 784 + + + + Success 9 + + SUCCESS + + N + 2224 + 784 + + + + total_registered.driver_license(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.driver_license(reg).hpl + Basic + + + REG_ID + RECRUITMENT_REG_ID + + + VK_ARRAY + VK_ARRAY_ID + + Y + + Y + local + N + N + Y + N + 1696 + 864 + + + + Success 10 + + SUCCESS + + N + 2224 + 864 + + + + total_registered.child_minor(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.child_minor(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 944 + + + + Success 11 + + SUCCESS + + N + 2224 + 944 + + + + total_registered.age(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.age(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 1024 + + + + Success 12 + + SUCCESS + + N + 2224 + 1024 + + + + total_registered.marital_status(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.marital_status(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 1104 + + + + Success 13 + + SUCCESS + + N + 2224 + 1104 + + + + total_registered.education_level(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.education_level(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 1184 + + + + Success 14 + + SUCCESS + + N + 2224 + 1184 + + + + total_registered.busyness(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/total_registered.busyness(reg).hpl + Basic + + + VK_ARRAY + VK_ARRAY_ID + + + REG_ID + RECRUITMENT_REG_ID + + Y + + Y + local + N + N + Y + N + 1696 + 1264 + + + + Success 15 + + SUCCESS + + N + 2224 + 1264 + + + + recruitment_campaign.appeals(reg) + + PIPELINE + + N + N + N + N + N + Y + ${Internal.Entry.Current.Folder}/recruitment_campaign.appeals(reg).hpl + Basic + + + ARR_REG + ARRAY_REGION + + Y + + Y + local + N + N + Y + N + 1696 + 16 + + + + Success 16 + + SUCCESS + + N + 2224 + 16 + + + + job_get_rows_reg.hwf + + WORKFLOW + + N + N + N + N + ${PROJECT_HOME}/region/job_get_rows_reg.hwf + Nothing + + Y + + N + local + N + N + Y + Y + 928 + 784 + + + + appeals.reasons_appeal(reg).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/region/appeals.reasons_appeal(reg).hpl + txt + ${PROJECT_HOME}/log + Basic + + + ARR_REG + ARRAY_REGION + + Y + + Y + local + N + N + Y + N + 1696 + 336 + + + + Success 5 + + SUCCESS + + N + 1936 + 336 + + + + update_appeal_recruitments.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/auxiliary/update_appeal_recruitments.hpl + Basic + + Y + + N + local + N + N + Y + N + 1152 + 288 + + + + array_region.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/auxiliary/array_region.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1344 + 288 + + + + appeals.review_rating.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/region/appeals.review_rating.hpl + Basic + + Y + + N + local + N + N + Y + N + 1808 + 176 + + + + Success 17 + + SUCCESS + + N + 1936 + 176 + + + + SQL main_dashboard.recruitment_campaign + + SQL + + ervu-dashboard + N + /*DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1232 + + + + main_dashboard.recruitment_campaign + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.recruitment_campaign +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 400 + + + + SQL recruitment_campaign.subpoenas + + SQL + + ervu-dashboard + N + /*DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1424 + + + + recruitment_campaign.subpoenas + + SQL + + ervu-dashboard + N + DELETE FROM recruitment_campaign.subpoenas +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 592 + + + + SQL main_dashboard.total_registered + + SQL + + ervu-dashboard + N + /*DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1296 + + + + SQL main_dashboard.waiting_registration + + SQL + + ervu-dashboard + N + /*DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1360 + + + + SQL total_registered.reg_mil_cat + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1488 + + + + SQL total_registered.removed_registry + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1552 + + + + SQL total_registered.subpoenas + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1616 + + + + SQL total_registered.driver_license + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1696 + + + + SQL total_registered.child_minor + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1776 + + + + SQL total_registered.age + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1856 + + + + SQL total_registered.marital_status + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 1936 + + + + SQL total_registered.education_level + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 2016 + + + + SQL total_registered.busyness + + SQL + + ervu-dashboard + N + /*DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 2096 + + + + SQL recruitment_campaign.appeals + + SQL + + ervu-dashboard + N + /*DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'Organization'*/ + N + N + N + 976 + 2176 + + + + main_dashboard.total_registered + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.total_registered +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 464 + + + + main_dashboard.waiting_registration + + SQL + + ervu-dashboard + N + DELETE FROM main_dashboard.waiting_registration +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 528 + + + + total_registered.reg_mil_cat + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.reg_mil_cat +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 656 + + + + total_registered.removed_registry + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.removed_registry +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 720 + + + + total_registered.subpoenas + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.subpoenas +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 784 + + + + total_registered.driver_license + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.driver_license +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 864 + + + + total_registered.child_minor + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.child_minor +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 944 + + + + total_registered.age + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.age +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 1024 + + + + total_registered.marital_status + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.marital_status +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 1104 + + + + total_registered.education_level + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.education_level +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 1184 + + + + total_registered.busyness + + SQL + + ervu-dashboard + N + DELETE FROM total_registered.busyness +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + N + N + N + 2016 + 1264 + + + + appeals.topic_appeal(reg).hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/region/appeals.topic_appeal(reg).hpl + Basic + + + ARR_REG + ARRAY_REGION + + Y + + Y + local + N + N + Y + N + 1696 + 96 + + + + Success 18 + + SUCCESS + + N + 1936 + 96 + + + + + + Start + job_get_rows_reg.hwf + Y + Y + Y + + + main_dashboard.appeals(reg) + Success + Y + Y + N + + + appeals.reasons_appeal(reg).hpl + Success 5 + Y + Y + N + + + job_get_rows_reg.hwf + update_appeal_recruitments.hpl + Y + Y + N + + + update_appeal_recruitments.hpl + array_region.hpl + Y + Y + N + + + array_region.hpl + appeals.reasons_appeal(reg).hpl + Y + Y + N + + + array_region.hpl + main_dashboard.appeals(reg) + Y + Y + N + + + appeals.review_rating.hpl + Success 17 + Y + Y + N + + + main_dashboard.appeals(reg) + appeals.review_rating.hpl + Y + Y + N + + + main_dashboard.recruitment_campaign(reg) + main_dashboard.recruitment_campaign + Y + Y + N + + + main_dashboard.recruitment_campaign + Success 2 + Y + Y + Y + + + recruitment_campaign.subpoenas(reg) + recruitment_campaign.subpoenas + Y + Y + N + + + recruitment_campaign.subpoenas + Success 6 + Y + Y + Y + + + main_dashboard.total_registered(reg) + main_dashboard.total_registered + Y + Y + N + + + main_dashboard.total_registered + Success 3 + Y + Y + Y + + + main_dashboard.waiting_registration(reg) + main_dashboard.waiting_registration + Y + Y + N + + + main_dashboard.waiting_registration + Success 4 + Y + Y + Y + + + total_registered.reg_mil_cat(reg) + total_registered.reg_mil_cat + Y + Y + N + + + total_registered.reg_mil_cat + Success 7 + Y + Y + Y + + + total_registered.removed_registry(reg) + total_registered.removed_registry + Y + Y + N + + + total_registered.removed_registry + Success 8 + Y + Y + Y + + + total_registered.subpoenas(reg) + total_registered.subpoenas + Y + Y + N + + + total_registered.subpoenas + Success 9 + Y + Y + Y + + + total_registered.driver_license(reg) + total_registered.driver_license + Y + Y + N + + + total_registered.driver_license + Success 10 + Y + Y + Y + + + total_registered.child_minor(reg) + total_registered.child_minor + Y + Y + N + + + total_registered.child_minor + Success 11 + Y + Y + Y + + + total_registered.age(reg) + total_registered.age + Y + Y + N + + + total_registered.age + Success 12 + Y + Y + Y + + + total_registered.marital_status(reg) + total_registered.marital_status + Y + Y + N + + + total_registered.marital_status + Success 13 + Y + Y + Y + + + total_registered.education_level(reg) + total_registered.education_level + Y + Y + N + + + total_registered.education_level + Success 14 + Y + Y + Y + + + total_registered.busyness(reg) + total_registered.busyness + Y + Y + N + + + total_registered.busyness + Success 15 + Y + Y + Y + + + job_get_rows_reg.hwf + main_dashboard.recruitment_campaign(reg) + Y + Y + N + + + job_get_rows_reg.hwf + main_dashboard.total_registered(reg) + Y + Y + N + + + job_get_rows_reg.hwf + main_dashboard.waiting_registration(reg) + Y + Y + N + + + job_get_rows_reg.hwf + recruitment_campaign.subpoenas(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.reg_mil_cat(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.removed_registry(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.subpoenas(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.driver_license(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.child_minor(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.age(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.marital_status(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.education_level(reg) + Y + Y + N + + + job_get_rows_reg.hwf + total_registered.busyness(reg) + Y + Y + N + + + array_region.hpl + appeals.topic_appeal(reg).hpl + Y + Y + N + + + appeals.topic_appeal(reg).hpl + Success 18 + Y + Y + N + + + recruitment_campaign.appeals(reg) + Success 16 + Y + Y + N + + + array_region.hpl + recruitment_campaign.appeals(reg) + Y + Y + N + + + + + + + METASTORE.pentaho + + Default Run Configuration + {"namespace":"pentaho","id":"Default Run Configuration","name":"Default Run Configuration","description":"Defines a default run configuration","metaStoreName":null} + + + + {"_":"Embedded MetaStore Elements","namespace":"pentaho","type":"Default Run Configuration"} + + Pentaho local + {"children":[{"children":[],"id":"server","value":null},{"children":[],"id":"clustered","value":"N"},{"children":[],"id":"name","value":"Pentaho local"},{"children":[],"id":"description","value":null},{"children":[],"id":"pentaho","value":"N"},{"children":[],"id":"readOnly","value":"Y"},{"children":[],"id":"sendResources","value":"N"},{"children":[],"id":"logRemoteExecutionLocally","value":"N"},{"children":[],"id":"remote","value":"N"},{"children":[],"id":"local","value":"Y"},{"children":[],"id":"showTransformations","value":"N"}],"id":"Pentaho local","value":null,"name":"Pentaho local","owner":null,"ownerPermissionsList":[]} + + + + diff --git a/map_v1/region/main_dashboard.appeals(reg).hpl b/map_v1/region/main_dashboard.appeals(reg).hpl new file mode 100644 index 0000000..99dcdff --- /dev/null +++ b/map_v1/region/main_dashboard.appeals(reg).hpl @@ -0,0 +1,394 @@ + + + + main_dashboard.appeals(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + N + + + Select values 3 2 + Insert / update (main_dashboard.appeals) 2 + N + + + Table input (appeal_document) регионы + Get variables 3 2 + N + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) 2 + Execute SQL script 2 + Y + + + Table input (appeal_document) регионы + Insert / update (main_dashboard.appeals) 2 + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM main_dashboard.appeals +WHERE recording_date = current_date + AND schema = 'Organization' + + + 384 + 192 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM main_dashboard.appeals +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + + + 1152 + 192 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + -1 + SCM + -1 + none + String + + + + + 688 + 256 + + + + Insert / update (main_dashboard.appeals) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + schema + schema + + + = + recording_date + recording_date + + main_dashboard + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + average_rating + average_rating + Y + + + average_to_face + average_to_face + Y + + + "average_EPGU" + average_epgu + Y + + + average_to_face_percent + average_to_face_percent + Y + + + "average_EPGU_percent" + average_epgu_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ Y + + + 912 + 192 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + SCM + SCM + String + -2 + -2 + + false + + + false + + + + + + + + + + 832 + 256 + + + + Table input (appeal_document) регионы + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id +), +base_data AS ( + SELECT + region_id, + solution_type, + CASE + WHEN incoming_date <> '-' THEN incoming_date::date + ELSE NULL + END AS incoming_date, + + CASE + WHEN fact_end_date <> '-' THEN fact_end_date::date + ELSE NULL + END AS fact_end_date, + + CASE + WHEN response_evalution <> '-' THEN response_evalution::NUMERIC -- оценка ответа заявителем + ELSE 0 + END AS response_evalution, + source + FROM appeals.appeals_list al + WHERE region_id::uuid IN (SELECT recruitment_id FROM ids) +), +aggregated_data AS ( + SELECT + region_id AS recruitment_id, + COUNT(*) AS total_appeals, + COUNT(*) FILTER (WHERE solution_type = 'Решено') AS resolved, + -- Среднее время рассмотрения, учитывая возможные NULL для дат + ROUND(AVG(CASE + WHEN fact_end_date IS NOT NULL AND incoming_date IS NOT NULL + THEN fact_end_date::DATE - incoming_date::DATE + ELSE NULL + END), 1) AS average_consideration, + -- Средний рейтинг, учитывая 0 для некорректных значений + ROUND(AVG(response_evalution), 1) AS average_rating, + COUNT(*) FILTER (WHERE source = 'ПОС') AS total_pos, + COUNT(*) FILTER (WHERE source = 'ЕПГУ') AS total_epgu + FROM base_data + GROUP BY region_id +) +SELECT + i.recruitment_id, + current_date AS recording_date, + 'Organization' AS schema, + COALESCE(ad.total_appeals, 0) AS total_appeals, + COALESCE(ad.resolved, 0) AS resolved, + COALESCE(ad.average_consideration, 0) AS average_consideration, + COALESCE(ad.average_rating, 0) AS average_rating, + COALESCE(ad.total_pos, 0) AS average_to_face, + COALESCE(ad.total_epgu, 0) AS average_epgu, + COALESCE(ROUND(ad.total_pos::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS average_to_face_percent, + COALESCE(ROUND(ad.total_epgu::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS average_epgu_percent +FROM ids i +LEFT JOIN aggregated_data ad ON ad.recruitment_id = i.recruitment_id; + Y + + + 592 + 192 + + + + + +
diff --git a/map_v1/region/main_dashboard.recruitment_campaign(reg).hpl b/map_v1/region/main_dashboard.recruitment_campaign(reg).hpl new file mode 100644 index 0000000..307466f --- /dev/null +++ b/map_v1/region/main_dashboard.recruitment_campaign(reg).hpl @@ -0,0 +1,302 @@ + + + + main_dashboard.recruitment_campaign(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 3 + Select values 4 3 + Y + + + Table input (subpoena) регион/осень + Get variables 4 3 + Y + + + Select values 4 3 + Insert / update (main_dashboard.recruitment_campaign) + Y + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 880 + 480 + + + + Insert / update (main_dashboard.recruitment_campaign) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + spring_autumn + spring_autumn + + main_dashboard + recruitment_campaign
+ + subpoenas_sent + count_subpoena + Y + + + appeared_on_subpoenas + count_appeared + Y + + + not_appeared_on_subpoenas + count_not_appeared + Y + + + new_recruits + new_recruits + Y + + + postponement_have_right + postponement_have_right + Y + + + postponement_granted + postponement_granted + Y + + + appeared_on_subpoenas_percent + appeared_on_subpoenas_percent + Y + + + not_appeared_on_subpoenas_percent + not_appeared_on_subpoenas_percent + Y + + + postponement_have_right_percent + postponement_have_right_percent + Y + + + postponement_granted_percent + postponement_granted_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1376 + 480 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1056 + 480 + + + + Table input (subpoena) регион/осень + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoenas_sent), 0) count_subpoena, + COALESCE(SUM(appeared_on_subpoenas), 0) count_appeared, + COALESCE(SUM(not_appeared_on_subpoenas), 0) count_not_appeared, + COALESCE(SUM(new_recruits), 0) new_recruits, + COALESCE(SUM(postponement_have_right), 0) postponement_have_right, + COALESCE(SUM(postponement_granted), 0) postponement_granted, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(subpoenas_sent) > 0 + THEN ROUND((SUM(not_appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_on_subpoenas_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_have_right) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_have_right_percent, + COALESCE( + CASE + WHEN SUM(new_recruits) > 0 + THEN ROUND((SUM(postponement_granted) / SUM(new_recruits) * 100), 2) + ELSE 0 + END, + 0 + ) postponement_granted_percent, + '${REG_ID}' AS recruitment_id, + spring_autumn, + 'Organization' AS schema +FROM main_dashboard.recruitment_campaign +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 624 + 480 + + + + + +
diff --git a/map_v1/region/main_dashboard.total_registered(reg).hpl b/map_v1/region/main_dashboard.total_registered(reg).hpl new file mode 100644 index 0000000..8bd12ad --- /dev/null +++ b/map_v1/region/main_dashboard.total_registered(reg).hpl @@ -0,0 +1,289 @@ + + + + main_dashboard.total_registered(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (main_dashboard.total_registered) 2 + Y + + + Table input (person_registry) регион + Get variables 2 2 + Y + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 560 + 304 + + + + Insert / update (main_dashboard.total_registered) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + convicts + convicts + + main_dashboard + total_registered
+ + total_registered + total_count + Y + + + "total_registered_M" + male_count + Y + + + "total_registered_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + convicts + convicts + N + +
+ N + + + 1024 + 304 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 768 + 304 + + + + Table input (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_registered), 0) total_count, + COALESCE(SUM("total_registered_M"), 0) male_count, + COALESCE(SUM("total_registered_W"), 0) female_count, + COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion, + COALESCE(SUM(contract_criterion), 0) contract_criterion, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(total_registered) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(total_registered) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${REG_ID}' AS recruitment_id, + convicts, + 'Organization' AS schema +FROM main_dashboard.total_registered +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY convicts; + Y + + + 352 + 304 + + + + + +
diff --git a/map_v1/region/main_dashboard.waiting_registration(reg).hpl b/map_v1/region/main_dashboard.waiting_registration(reg).hpl new file mode 100644 index 0000000..4f5fecf --- /dev/null +++ b/map_v1/region/main_dashboard.waiting_registration(reg).hpl @@ -0,0 +1,279 @@ + + + + main_dashboard.waiting_registration(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 5 + Select values 5 + Y + + + Select values 5 + Insert / update (main_dashboard.waiting_registration) 2 + Y + + + Table input 2 (person_registry) регион + Get variables 5 + Y + + + + Get variables 5 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 576 + 240 + + + + Insert / update (main_dashboard.waiting_registration) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + + = + schema + schema + + + main_dashboard + waiting_registration
+ + waiting_registration + waiting_count + Y + + + "waiting_registration_M" + male_count + Y + + + "waiting_registration_W" + female_count + Y + + + mobilization_criterion + mobilization_criterion + Y + + + volunteer_criterion + volunteer_criterion + Y + + + contract_criterion + contract_criterion + Y + + + mobilization_criterion_percent + mobilization_criterion_percent + Y + + + volunteer_criterion_percent + volunteer_criterion_percent + Y + + + contract_criterion_percent + contract_criterion_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1024 + 240 + +
+ + Select values 5 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 720 + 240 + + + + Table input 2 (person_registry) регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(waiting_registration),0) waiting_count, + COALESCE(SUM("waiting_registration_M"),0) male_count, + COALESCE(SUM("waiting_registration_W"),0) female_count, + COALESCE(SUM(mobilization_criterion),0) mobilization_criterion, + COALESCE(SUM(volunteer_criterion),0) volunteer_criterion, + COALESCE(SUM(contract_criterion),0) contract_criterion, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(mobilization_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) mobilization_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(volunteer_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) volunteer_criterion_percent, + COALESCE( + CASE + WHEN SUM(waiting_registration) > 0 + THEN ROUND((SUM(contract_criterion) / SUM(waiting_registration) * 100), 2) + ELSE 0 + END, + 0 + ) contract_criterion_percent, + '${REG_ID}' AS recruitment_id, + 'Organization' AS schema +FROM main_dashboard.waiting_registration +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE; + Y + + + 336 + 240 + + + + + +
diff --git a/map_v1/region/recruitment_campaign.appeals(reg).hpl b/map_v1/region/recruitment_campaign.appeals(reg).hpl new file mode 100644 index 0000000..779a171 --- /dev/null +++ b/map_v1/region/recruitment_campaign.appeals(reg).hpl @@ -0,0 +1,391 @@ + + + + recruitment_campaign.appeals(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + N + + + Table input (appeal_document) регионы + Get variables 3 2 + N + + + Select values 3 2 + Insert / update (main_dashboard.appeals) + N + + + Execute SQL script + Table input (appeal_document) регионы + Y + + + Insert / update (main_dashboard.appeals) + Execute SQL script 2 + Y + + + Table input (appeal_document) регионы + Insert / update (main_dashboard.appeals) + Y + + + + Execute SQL script + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'Organization' + + + 256 + 272 + + + + Execute SQL script 2 + ExecSql + + N + + 1 + + none + + + + + ervu-dashboard + N + N + N + N + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema = 'REG_LVL' + + + 1360 + 272 + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 704 + 416 + + + + Insert / update (main_dashboard.appeals) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + recruitment_id + + + = + schema + schema + + + = + spring_autumn + spring_autumn + + + = + recording_date + recording_date + + recruitment_campaign + appeals
+ + total_appeals + total_appeals + Y + + + average_consideration + average_consideration + Y + + + resolved + resolved + Y + + + not_resolved + not_resolved + Y + + + not_resolved_percent + not_resolved_percent + Y + + + average_rating + average_rating + Y + + + resolved_percent + resolved_percent + Y + + + recruitment_id + recruitment_id + N + + + spring_autumn + spring_autumn + N + + + schema + schema + N + +
+ N + + + 1088 + 272 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 848 + 416 + + + + Table input (appeal_document) регионы + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH +ids AS ( + SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id +), +base_data AS ( + SELECT + region_id, + solution_type, + CASE + WHEN incoming_date <> '-' THEN to_date(incoming_date, 'DD.MM.YYYY') + ELSE NULL + END AS incoming_date, + + CASE + WHEN fact_end_date <> '-' THEN to_date(fact_end_date, 'DD.MM.YYYY') + ELSE NULL + END AS fact_end_date, + + CASE + WHEN response_evalution <> '-' THEN response_evalution::NUMERIC -- оценка ответа заявителем + ELSE 0 + END AS response_evalution, + source + FROM appeals.appeals_list al + WHERE region_id::uuid IN (SELECT recruitment_id FROM ids) +), +aggregated_data AS ( + SELECT + region_id AS recruitment_id, + COUNT(*) AS total_appeals, + COUNT(*) FILTER (WHERE solution_type = 'Решено') AS resolved, + COUNT(*) FILTER (WHERE solution_type != 'Решено') AS not_resolved, + -- Среднее время рассмотрения, учитывая возможные NULL для дат + ROUND(AVG(CASE + WHEN fact_end_date IS NOT NULL AND incoming_date IS NOT NULL + THEN fact_end_date::DATE - incoming_date::DATE + ELSE NULL + END), 1) AS average_consideration, + -- Средний рейтинг, учитывая 0 для некорректных значений + ROUND(AVG(response_evalution), 1) AS average_rating, + CASE WHEN incoming_date between (extract (year from incoming_date)||'-04-01')::date and (extract (year from incoming_date)||'-09-30')::date then 'Весна' + WHEN incoming_date between (extract (year from incoming_date)||'-10-01')::date and (extract (year from incoming_date)+1||'-03-31')::date then 'Осень' + END AS spring_autumn + FROM base_data + GROUP BY region_id, incoming_date +), agr2 as ( +SELECT + i.recruitment_id, + current_date AS recording_date, + COALESCE(spring_autumn, 'undefined') as spring_autumn, + 'Organization' AS schema, + COALESCE(ad.total_appeals, 0) AS total_appeals, + COALESCE(ad.resolved, 0) AS resolved, + COALESCE(ad.not_resolved, 0) AS not_resolved, + COALESCE(ad.average_consideration, 0) AS average_consideration, + COALESCE(ad.average_rating, 0) AS average_rating, + COALESCE(ROUND(ad.resolved::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS resolved_percent, + COALESCE(ROUND(ad.not_resolved::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS not_resolved_percent +FROM ids i +LEFT JOIN aggregated_data ad ON ad.recruitment_id = i.recruitment_id +) +SELECT +recruitment_id, +recording_date, +spring_autumn, +schema, +sum(total_appeals) as total_appeals, +sum(resolved) as resolved, +sum(not_resolved) as not_resolved, +coalesce(ROUND(avg(average_consideration) FILTER (where average_consideration!=0),1),0) as average_consideration, +coalesce(ROUND(avg(average_rating) FILTER (where average_rating!=0),1),0) as average_rating, +COALESCE(ROUND(sum(resolved::NUMERIC) * 100 / NULLIF(sum(total_appeals), 0), 1), 0) AS resolved_percent, +COALESCE(ROUND(sum(not_resolved)::NUMERIC * 100 / NULLIF(sum(total_appeals), 0), 1), 0) AS not_resolved_percent +from agr2 +GROUP BY 1,2,3,4; + Y + + + 496 + 272 + + + + + +
diff --git a/map_v1/region/recruitment_campaign.subpoenas(reg).hpl b/map_v1/region/recruitment_campaign.subpoenas(reg).hpl new file mode 100644 index 0000000..0c505c9 --- /dev/null +++ b/map_v1/region/recruitment_campaign.subpoenas(reg).hpl @@ -0,0 +1,386 @@ + + + + recruitment_campaign.subpoenas(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/09 13:13:59.825 + - + 2024/08/09 13:13:59.825 + + + + + + Get variables 4 3 + Select values 4 3 + Y + + + Table input (subpoena) осень/регионы + Get variables 4 3 + Y + + + Select values 4 3 + Insert / update (recruitment_campaign.subpoenas) 3 + Y + + + + Get variables 4 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1344 + 448 + + + + Insert / update (recruitment_campaign.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + spring_autumn + spring_autumn + + recruitment_campaign + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + restrictions_applied + count_restrictions_applied + Y + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + recruitment_id + recruitment_id + N + + + rest + rest + Y + + + spring_autumn + spring_autumn + N + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1824 + 448 + +
+ + Select values 4 3 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1520 + 448 + + + + Table input (subpoena) осень/регионы + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + COALESCE(SUM(rest), 0) rest, + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${REG_ID}' AS recruitment_id, + spring_autumn, + 'Organization' AS schema +FROM recruitment_campaign.subpoenas +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY spring_autumn; + Y + + + 1088 + 448 + + + + + +
diff --git a/map_v1/region/rows_id-array_reg.hpl b/map_v1/region/rows_id-array_reg.hpl new file mode 100644 index 0000000..5acca11 --- /dev/null +++ b/map_v1/region/rows_id-array_reg.hpl @@ -0,0 +1,74 @@ + + + + rows_id-array_reg + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/10 12:40:41.832 + - + 2024/12/10 12:40:41.832 + + + + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 672 + 256 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +recruitment_reg_id AS RECRUITMENT_REG_ID, +string_to_array(trim(both '{}' FROM replace(vk_array_id, ' ', '')), ',')::uuid[] AS VK_ARRAY_ID +FROM ervu_dashboard.array_reg + N + + + 448 + 256 + + + + + + diff --git a/map_v1/region/select_recruitments_region(reg).hpl b/map_v1/region/select_recruitments_region(reg).hpl new file mode 100644 index 0000000..f7a624c --- /dev/null +++ b/map_v1/region/select_recruitments_region(reg).hpl @@ -0,0 +1,198 @@ + + + + select_recruitments_region(reg) + Y + + + + Normal + 0 + + + ORG_ROW + + + + + SCM + + + + + N + 1000 + 100 + - + 2024/08/15 14:58:19.728 + - + 2024/08/15 14:58:19.728 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Table input/регион + Get variables 3 2 + Y + + + Select values 3 2 + Insert / update + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + + + + + -1 + ORG_ROW + -1 + none + String + + + + + + 656 + 208 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_reg_id + ORG_ROW + + + ervu_dashboard + array_reg
+ + vk_array_id + vk_array_id + Y + + + recruitment_reg_id + recruitment_reg_id + Y + +
+ N + + + 992 + 208 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + ORG_ROW + ORG_ROW + String + -2 + -2 + + false + + + false + + + + + + + + + + 800 + 208 + + + + Table input/регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT + '${ORG_ROW}' AS recruitment_reg_id, + ARRAY( + SELECT idm_id + FROM ( + SELECT idm_id + FROM ervu_dashboard.recruitment + WHERE schema = 'Department' AND parent_id = '${ORG_ROW}' + UNION ALL + SELECT idm_id + FROM ervu_dashboard.recruitment + WHERE idm_id = '${ORG_ROW}' + ) subquery + ) AS vk_array_id +FROM ervu_dashboard.recruitment +WHERE idm_id = '${ORG_ROW}'; + Y + + + 528 + 208 + + + + + +
diff --git a/map_v1/region/select_recruitments_region(reg)rows.hpl b/map_v1/region/select_recruitments_region(reg)rows.hpl new file mode 100644 index 0000000..de91546 --- /dev/null +++ b/map_v1/region/select_recruitments_region(reg)rows.hpl @@ -0,0 +1,76 @@ + + + + select_recruitments_region(reg)rows + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/12/10 10:43:22.293 + - + 2024/12/10 10:43:22.293 + + + + + + Table input/регион + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 688 + 240 + + + + Table input/регион + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT + idm_id AS ORGANIZATION_ROW +FROM + ervu_dashboard.recruitment +WHERE schema = 'Organization' + + N + + + 512 + 240 + + + + + + diff --git a/map_v1/region/total_registered.age(reg).hpl b/map_v1/region/total_registered.age(reg).hpl new file mode 100644 index 0000000..3a74385 --- /dev/null +++ b/map_v1/region/total_registered.age(reg).hpl @@ -0,0 +1,395 @@ + + + + total_registered.age(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Table input (person_registry) регион/все + Get variables 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.age) + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1568 + 752 + + + + Insert / update (total_registered.age) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + registered + registered + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + age
+ + "17_years" + 17_year_count + Y + + + "18-26_years" + 18-26_year_count + Y + + + "27-30_years" + 27-30_year_count + Y + + + "31-35_years" + 31-35_year_count + Y + + + "36-40_years" + 36-40_year_count + Y + + + "41-45_years" + 41-45_year_count + Y + + + "51+_years" + 51+_year_count + Y + + + "all_M_W" + gender + N + + + "46-50_years" + 46-50_year_count + Y + + + "17_years_percent" + 17_year_percent + Y + + + "18-26_years_percent" + 18-26_year_percent + Y + + + "27-30_years_percent" + 27-30_year_percent + Y + + + "31-35_years_percent" + 31-35_year_percent + Y + + + "36-40_years_percent" + 36-40_year_percent + Y + + + "41-45_years_percent" + 41-45_year_percent + Y + + + "46-50_years_percent" + 46-50_year_percent + Y + + + "51+_years_percent" + 51+_year_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + schema + schema + N + + + total_count + total_count + Y + + + convicts + convicts + N + +
+ Y + + + 1952 + 752 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1712 + 752 + + + + Table input (person_registry) регион/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM("17_years"), 0) "17_year_count", + COALESCE(SUM("18-26_years"), 0) "18-26_year_count", + COALESCE(SUM("27-30_years"), 0) "27-30_year_count", + COALESCE(SUM("31-35_years"), 0) "31-35_year_count", + COALESCE(SUM("36-40_years"), 0) "36-40_year_count", + COALESCE(SUM("41-45_years"), 0) "41-45_year_count", + COALESCE(SUM("51+_years"), 0) "51+_year_count", + COALESCE(SUM("46-50_years"), 0) "46-50_year_count", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("17_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "17_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("18-26_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "18-26_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("27-30_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "27-30_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("31-35_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "31-35_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("36-40_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "36-40_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("41-45_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "41-45_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("46-50_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "46-50_year_percent", + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("51+_years") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) "51+_year_percent", + + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + registered, + 'Organization' AS schema +FROM total_registered.age +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 1328 + 752 + + + + + +
diff --git a/map_v1/region/total_registered.busyness(reg).hpl b/map_v1/region/total_registered.busyness(reg).hpl new file mode 100644 index 0000000..a7f97c9 --- /dev/null +++ b/map_v1/region/total_registered.busyness(reg).hpl @@ -0,0 +1,295 @@ + + + + total_registered.busyness(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Table input (person_registry) РФ/все + Get variables 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.busyness) + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 640 + 576 + + + + Insert / update (total_registered.busyness) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + busyness
+ + study + study + Y + + + work + work + Y + + + study_percent + study_percent + Y + + + work_percent + work_percent + Y + + + recruitment_id + recruitment_id + N + + + registered + registered + N + + + "all_M_W" + gender + N + + + not_work + no_info + Y + + + not_work_percent + no_info_percent + Y + + + busyness + total_people + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1040 + 576 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 784 + 576 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(study), 0) study, + COALESCE(SUM(work), 0) work, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) study_percent, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) work_percent, + + COALESCE(SUM(not_work), 0) no_info, + COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) no_info_percent, + + COALESCE(SUM(busyness), 0) total_people, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered, + convicts, + 'Organization' AS schema +FROM total_registered.busyness +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", registered, convicts; + Y + + + 400 + 576 + + + + + +
diff --git a/map_v1/region/total_registered.child_minor(reg).hpl b/map_v1/region/total_registered.child_minor(reg).hpl new file mode 100644 index 0000000..04838e3 --- /dev/null +++ b/map_v1/region/total_registered.child_minor(reg).hpl @@ -0,0 +1,326 @@ + + + + total_registered.child_minor(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + Y + + + Table input (person_registry)регион/все + Get variables 4 2 + Y + + + Select values 4 2 + Insert / update (total_registered.child_minor) + Y + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + VK_ARRAY + -1 + none + String + + + -1 + REG_ID + -1 + none + String + + + + + 1024 + 416 + + + + Insert / update (total_registered.child_minor) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + child_minor
+ + no_child + no_children + Y + + + "1_child" + one_child + Y + + + "2_child" + two_children + Y + + + "3_child" + three_children + Y + + + "4_more_child" + four_or_more_children + Y + + + "all_M_W" + gender + N + + + no_child_percent + no_children_percent + Y + + + "1_child_percent" + one_child_percent + Y + + + "2_child_percent" + two_children_percent + Y + + + "3_child_percent" + three_children_percent + Y + + + "4_more_child_percent" + four_or_more_children_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + total_count + total_count + Y + + + convicts + convicts + Y + +
+ N + + + 1472 + 416 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1216 + 416 + + + + Table input (person_registry)регион/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total_count, + COALESCE(SUM(no_child), 0) no_children, + COALESCE(SUM("1_child"), 0) one_child, + COALESCE(SUM("2_child"), 0) two_children, + COALESCE(SUM("3_child"), 0) three_children, + COALESCE(SUM("4_more_child"), 0) four_or_more_children, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(no_child) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) no_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("1_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) one_child_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("2_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) two_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("3_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) three_children_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("4_more_child") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) four_or_more_children_percent, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Organization' AS schema +FROM total_registered.child_minor +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 784 + 416 + + + + + +
diff --git a/map_v1/region/total_registered.driver_license(reg).hpl b/map_v1/region/total_registered.driver_license(reg).hpl new file mode 100644 index 0000000..3902487 --- /dev/null +++ b/map_v1/region/total_registered.driver_license(reg).hpl @@ -0,0 +1,340 @@ + + + + total_registered.driver_license(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.driver_license) 2 + Y + + + Table input (driver_license) регионы/все + Get variables 3 2 + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1072 + 416 + + + + Insert / update (total_registered.driver_license) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + driver_license
+ + "A" + a + Y + + + "B" + b + Y + + + "C" + c + Y + + + "D" + d + Y + + + "E" + e + Y + + + nope + nope + Y + + + "A_repcent" + a_percent + Y + + + "B_repcent" + b_percent + Y + + + "C_repcent" + c_percent + Y + + + "D_repcent" + d_percent + Y + + + "E_repcent" + e_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + schema + schema + N + + + total_count + total + Y + + + convicts + convicts + N + +
+ Y + + + 1472 + 416 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1216 + 416 + + + + Table input (driver_license) регионы/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(total_count), 0) total, + COALESCE(SUM("A"), 0) a, + COALESCE(SUM("B"), 0) b, + COALESCE(SUM("C"), 0) c, + COALESCE(SUM("D"), 0) d, + COALESCE(SUM("E"), 0) e, + COALESCE(SUM(nope), 0) nope, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("A") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) a_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("B") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) b_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("C") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) c_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("D") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) d_percent, + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM("E") / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) e_percent, -- нет такой категории + COALESCE( + CASE + WHEN SUM(total_count) > 0 + THEN ROUND((SUM(nope) / SUM(total_count) * 100), 2) + ELSE 0 + END, + 0 + ) nope_percent, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Organization' AS schema +FROM total_registered.driver_license +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 848 + 416 + + + + + +
diff --git a/map_v1/region/total_registered.education_level(reg).hpl b/map_v1/region/total_registered.education_level(reg).hpl new file mode 100644 index 0000000..5c923c8 --- /dev/null +++ b/map_v1/region/total_registered.education_level(reg).hpl @@ -0,0 +1,308 @@ + + + + total_registered.education_level(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.education_level) + Y + + + Table input (person_registry) РФ/все + Get variables 3 2 + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1456 + 576 + + + + Insert / update (total_registered.education_level) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + education_level
+ + higher + higher + Y + + + average + average_prof + Y + + + "all_M_W" + gender + N + + + only_general + only_general + Y + + + no_data + count_nodata + Y + + + higher_percent + higher_percentage + Y + + + average_percent + average_prof_percentage + Y + + + only_general_percent + only_general_percentage + Y + + + no_data_percent + count_nodata_percentage + Y + + + recruitment_id + recruitment_id + N + + + education_level + total + Y + + + schema + schema + N + + + convicts + convicts + N + +
+ Y + + + 1856 + 576 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1600 + 576 + + + + Table input (person_registry) РФ/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(higher), 0) higher, + COALESCE(SUM(average), 0) average_prof, + COALESCE(SUM(only_general), 0) only_general, + COALESCE(SUM(no_data), 0) count_nodata, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(higher) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) higher_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(average) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) average_prof_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(only_general) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) only_general_percentage, + COALESCE( + CASE + WHEN SUM(education_level) > 0 + THEN ROUND((SUM(no_data) / SUM(education_level) * 100), 2) + ELSE 0 + END, + 0 + ) count_nodata_percentage, + + COALESCE(SUM(education_level), 0) total, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Organization' AS schema +FROM total_registered.education_level +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 1184 + 576 + + + + + +
diff --git a/map_v1/region/total_registered.marital_status(reg).hpl b/map_v1/region/total_registered.marital_status(reg).hpl new file mode 100644 index 0000000..10fd7a7 --- /dev/null +++ b/map_v1/region/total_registered.marital_status(reg).hpl @@ -0,0 +1,288 @@ + + + + total_registered.marital_status(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 2 + Select values 3 2 + Y + + + Table input (person_registry) регионы/все + Get variables 3 2 + Y + + + Select values 3 2 + Insert / update (total_registered.marital_status) + Y + + + + Get variables 3 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 1344 + 592 + + + + Insert / update (total_registered.marital_status) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + "all_M_W" + gender + + + = + convicts + convicts + + total_registered + marital_status
+ + married + married + Y + + + not_married + not_married + Y + + + married_percent + married_percent + Y + + + not_married_percent + not_married_percent + Y + + + "all_M_W" + gender + N + + + recruitment_id + recruitment_id + N + + + marital_status + total + Y + + + schema + schema + N + + + convicts + convicts + N + + + other + other + Y + + + other_percent + other_percent + Y + +
+ Y + + + 1744 + 592 + +
+ + Select values 3 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1488 + 592 + + + + Table input (person_registry) регионы/все + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(married), 0) married, + COALESCE(SUM(not_married), 0) not_married, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(not_married) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) not_married_percent, + COALESCE( + CASE + WHEN SUM(marital_status) > 0 + THEN ROUND((SUM(other) / SUM(marital_status) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + COALESCE(SUM(marital_status), 0) total, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + convicts, + 'Organization' AS schema +FROM total_registered.marital_status +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY "all_M_W", convicts; + Y + + + 1120 + 592 + + + + + +
diff --git a/map_v1/region/total_registered.reg_mil_cat(reg).hpl b/map_v1/region/total_registered.reg_mil_cat(reg).hpl new file mode 100644 index 0000000..e12e146 --- /dev/null +++ b/map_v1/region/total_registered.reg_mil_cat(reg).hpl @@ -0,0 +1,328 @@ + + + + total_registered.reg_mil_cat(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 3 + Select values 3 + Y + + + Table input (person_registry) военком/рег + Get variables 3 + Y + + + Select values 3 + Insert / update (total_registered.reg_mil_cat) + Y + + + + Get variables 3 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 656 + 352 + + + + Insert / update (total_registered.reg_mil_cat) + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + mil_reg + mil_reg + + total_registered + reg_mil_cat
+ + first_reg_17 + first_reg_17 + Y + + + first_reg_18 + first_reg_18 + Y + + + "mil_spec_W" + mil_spec_w + Y + + + recruitment_id + recruitment_id + N + + + returned_dep_liberty + returned_dep_liberty + Y + + + punished + punished + Y + + + received_citizenship + received_citizenship + Y + + + first_reg_17_percent + first_reg_17_percent + Y + + + first_reg_18_percent + first_reg_18_percent + Y + + + returned_dep_liberty_percent + returned_dep_liberty_percent + Y + + + "mil_spec_W_percent" + mil_spec_w_percent + Y + + + punished_percent + punished_percent + Y + + + received_citizenship_percent + received_citizenship_percent + Y + + + mil_reg + mil_reg + N + + + schema + schema + N + +
+ N + + + 1056 + 352 + +
+ + Select values 3 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 800 + 352 + + + + Table input (person_registry) военком/рег + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(first_reg_17), 0) first_reg_17, + COALESCE(SUM(first_reg_18), 0) first_reg_18, + COALESCE(SUM("mil_spec_W"), 0) mil_spec_w, + COALESCE(SUM(returned_dep_liberty), 0) returned_dep_liberty, + COALESCE(SUM(punished), 0) punished, + COALESCE(SUM(received_citizenship), 0) received_citizenship, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_17) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) first_reg_17_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(first_reg_18) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) first_reg_18_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(returned_dep_liberty) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) returned_dep_liberty_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM("mil_spec_W") / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) mil_spec_w_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(punished) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) punished_percent, + COALESCE( + CASE + WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0 + THEN ROUND((SUM(received_citizenship) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2) + ELSE 0 + END, + 0 + ) received_citizenship_percent, + '${REG_ID}'::uuid AS recruitment_id, + mil_reg, + 'Organization' AS schema +FROM total_registered.reg_mil_cat +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 400 + 352 + + + + + +
diff --git a/map_v1/region/total_registered.removed_registry(reg).hpl b/map_v1/region/total_registered.removed_registry(reg).hpl new file mode 100644 index 0000000..9b0011c --- /dev/null +++ b/map_v1/region/total_registered.removed_registry(reg).hpl @@ -0,0 +1,322 @@ + + + + total_registered.removed_registry(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 2 2 + Select values 2 2 + Y + + + Select values 2 2 + Insert / update (total_registered.removed_registry) 2 + Y + + + Table input (decision-document-service) регион 2 + Get variables 2 2 + Y + + + + Get variables 2 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 688 + 320 + + + + Insert / update (total_registered.removed_registry) 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + total_registered + removed_registry
+ + age_limit + age_limit + Y + + + death + death + Y + + + removed_registry + removed_registry + Y + + + deprivation_citizenship + deprivation_citizenship + Y + + + travel_abroad + travel_abroad + Y + + + living_abroad + living_abroad + Y + + + other + other + Y + + + deprivation_citizen_percents + deprivation_citizen_percents + Y + + + age_limit_percent + age_limit_percent + Y + + + death_percent + death_percent + Y + + + travel_abroad_percent + travel_abroad_percent + Y + + + living_abroad_percent + living_abroad_percent + Y + + + other_percent + other_percent + Y + + + recruitment_id + recruitment_id + N + + + schema + schema + N + +
+ N + + + 1056 + 320 + +
+ + Select values 2 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 816 + 320 + + + + Table input (decision-document-service) регион 2 + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(age_limit), 0) age_limit, + COALESCE(SUM(death), 0) death, + COALESCE(SUM(removed_registry), 0) removed_registry, + COALESCE(SUM(deprivation_citizenship), 0) deprivation_citizenship, + COALESCE(SUM(travel_abroad), 0) travel_abroad, + COALESCE(SUM(living_abroad), 0) living_abroad, + COALESCE(SUM(other), 0) other, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(deprivation_citizenship) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) deprivation_citizen_percents, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(age_limit) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) age_limit_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(death) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) death_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(travel_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) travel_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(living_abroad) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) living_abroad_percent, + COALESCE( + CASE + WHEN SUM(removed_registry) > 0 + THEN ROUND((SUM(other) / SUM(removed_registry) * 100), 2) + ELSE 0 + END, + 0 + ) other_percent, + '${REG_ID}' AS recruitment_id, + 'Organization' AS schema +FROM total_registered.removed_registry +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE; + Y + + + 448 + 320 + + + + + +
diff --git a/map_v1/region/total_registered.subpoenas(reg).hpl b/map_v1/region/total_registered.subpoenas(reg).hpl new file mode 100644 index 0000000..02a85de --- /dev/null +++ b/map_v1/region/total_registered.subpoenas(reg).hpl @@ -0,0 +1,418 @@ + + + + total_registered.subpoenas(reg) + Y + + + + Normal + 0 + + + N + 1000 + 100 + - + 2024/08/02 11:56:22.507 + - + 2024/08/02 11:56:22.507 + + + + + + Get variables 4 2 + Select values 4 2 + Y + + + Table input (subpoena) регион/рег + Get variables 4 2 + Y + + + Select values 4 2 + Insert / update (total_registered.subpoenas) 3 + Y + + + + Get variables 4 2 + GetVariable + + Y + + 1 + + none + + + + + -1 + REG_ID + -1 + none + String + + + -1 + VK_ARRAY + -1 + none + String + + + + + 960 + 496 + + + + Insert / update (total_registered.subpoenas) 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruitment_id + REG_ID + + + = + schema + schema + + + = + mil_reg + mil_reg + + total_registered + subpoenas
+ + subpoena + count_subpoena + Y + + + appeared + count_appeared + Y + + + average_appeared + average_appeared + Y + + + not_appeared + count_not_appeared + Y + + + not_ap_good_reason + count_not_ap_good_reason + Y + + + introduced_measures + count_introduced_measures + Y + + + ap_not_required + count_ap_not_required + Y + + + electron + count_electron + Y + + + paper + count_paper + Y + + + restrictions_applied + count_restrictions_applied + Y + + + recruitment_id + recruitment_id + N + + + mil_reg + mil_reg + N + + + appeared_percent + appeared_percent + Y + + + not_appeared_percent + not_appeared_percent + Y + + + not_ap_good_reason_percent + not_ap_good_reason_percent + Y + + + ap_not_required_percent + ap_not_required_percent + Y + + + electron_percent + electron_percent + Y + + + paper_percent + paper_percent + Y + + + restrictions_applied_percent + restrictions_applied_percent + Y + + + introduced_measures_percent + introduced_measures_percent + Y + + + count_not_delivery + count_not_delivery + Y + + + appear_date_is_good + appear_date_is_good + Y + + + not_delivery_percent + not_delivery_percent + Y + + + appear_date_is_good_percent + appear_date_is_good_percent + Y + + + schema + schema + N + +
+ N + + + 1408 + 496 + +
+ + Select values 4 2 + SelectValues + + Y + + 1 + + none + + + + N + + REG_ID + REG_ID + String + -2 + -2 + + false + + + false + + + + + + + + VK_ARRAY + VK_ARRAY + String + -2 + -2 + + false + + + false + + + + + + + + + + 1136 + 496 + + + + Table input (subpoena) регион/рег + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + COALESCE(SUM(subpoena), 0) count_subpoena, + COALESCE(SUM(appeared), 0) count_appeared, + COALESCE(SUM(average_appeared), 0) average_appeared, + COALESCE(SUM(not_appeared), 0) count_not_appeared, + COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason, + COALESCE(SUM(introduced_measures), 0) count_introduced_measures, + COALESCE(SUM(ap_not_required), 0) count_ap_not_required, + COALESCE(SUM(electron), 0) count_electron, + COALESCE(SUM(paper), 0) count_paper, + COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_appeared_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_ap_good_reason_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) ap_not_required_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(electron) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) electron_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(paper) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) paper_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) restrictions_applied_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) introduced_measures_percent, + + COALESCE(SUM(count_not_delivery), 0) count_not_delivery, + COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good, + + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) not_delivery_percent, + COALESCE( + CASE + WHEN SUM(subpoena) > 0 + THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2) + ELSE 0 + END, + 0 + ) appear_date_is_good_percent, + '${REG_ID}' AS recruitment_id, + mil_reg, + 'Organization' AS schema +FROM total_registered.subpoenas +WHERE recruitment_id = ANY ('${VK_ARRAY}') +AND schema IN ('Department', 'REG_LVL') +AND recording_date = CURRENT_DATE +GROUP BY mil_reg; + Y + + + 752 + 496 + + + + + +
diff --git a/map_v1/supportive_jobs/clearing_logs.hwf b/map_v1/supportive_jobs/clearing_logs.hwf new file mode 100644 index 0000000..2049b82 --- /dev/null +++ b/map_v1/supportive_jobs/clearing_logs.hwf @@ -0,0 +1,83 @@ + + + clearing_logs + Y + + + + - + 2025/03/18 11:52:48.920 + - + 2025/03/18 11:52:48.920 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 512 + 320 + + + + SQL, зачистка таблиц логов workflow_logs, channel_log + + SQL + + ervu-dashboard + N + DELETE FROM public.channel_log +WHERE log_date < DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '4 days'; + +DELETE FROM public.workflow_logs +WHERE workflowstart < DATE_TRUNC('day', CURRENT_DATE) - INTERVAL '4 days'; + + N + N + N + 816 + 320 + + + + Success + + SUCCESS + + N + 1184 + 320 + + + + + + Start + SQL, зачистка таблиц логов workflow_logs, channel_log + Y + Y + Y + + + SQL, зачистка таблиц логов workflow_logs, channel_log + Success + Y + Y + N + + + + + + diff --git a/map_v1/supportive_jobs/percent_for_waiting_reg.hpl b/map_v1/supportive_jobs/percent_for_waiting_reg.hpl new file mode 100644 index 0000000..713d101 --- /dev/null +++ b/map_v1/supportive_jobs/percent_for_waiting_reg.hpl @@ -0,0 +1,111 @@ + + + + percent_for_waiting_reg + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/03/24 11:56:18.982 + - + 2025/03/24 11:56:18.982 + + + + + + Table input + Update + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + current_date AS recording_date, + wr.recruitment_id, + wr.schema, + COALESCE(ROUND(wr.waiting_registration * 100 / NULLIF ((wr.waiting_registration + tr.total_registered), 0), 2), 0) AS waiting_registration_percent--, + --wr.waiting_registration, + --tr.total_registered +FROM main_dashboard.waiting_registration wr +LEFT JOIN main_dashboard.total_registered tr + ON wr.recruitment_id = tr.recruitment_id AND tr.convicts = 'ALL' + AND wr.schema = tr.schema + AND wr.recording_date = tr.recording_date +WHERE wr.recording_date = current_date + N + + + 528 + 288 + + + + Update + Update + + Y + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruitment_id + recruitment_id + + + = + recording_date + recording_date + + + = + schema + schema + + main_dashboard + waiting_registration
+ + waiting_registration_percent + waiting_registration_percent + +
+ N + Y + + + 992 + 288 + +
+ + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..6343877 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl b/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl new file mode 100644 index 0000000..de7e0d2 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_citizen_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'citizen_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf new file mode 100644 index 0000000..b7e58cf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf @@ -0,0 +1,329 @@ + + + citizen_job + Y + + + + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_citizen_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/checkpoints/check_if_citizen_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + citizen_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_citizen_job_exists.hpl + Y + Y + Y + + + check_if_citizen_job_exists.hpl + citizen_job_exists_check + Y + Y + N + + + citizen_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + citizen_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 672 + 128 + citizen_job + 67 + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl b/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl index e5be261..8937b67 100644 --- a/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/delta_citizen.hpl @@ -13,305 +13,14 @@ 1000 100 - - 2025/06/03 16:10:48.509 + 2025/08/05 12:54:02.780 - - 2025/06/03 16:10:48.509 + 2025/08/05 12:54:02.780 - - Table input - Insert / update - Y - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - ervu_dashboard - citizen
- - recruit_id - recruit_id - N - - - system_pgs_status - system_pgs_status - Y - - - full_name - full_name - Y - - - last_name - last_name - Y - - - first_name - first_name - Y - - - middle_name - middle_name - Y - - - gender - gender - Y - - - birth_date - birth_date - Y - - - age - age - Y - - - birth_place - birth_place - Y - - - phone - phone - Y - - - email - email - Y - - - date_registration - date_registration - Y - - - date_deregistration - date_deregistration - Y - - - recruit_create_date - recruit_create_date - Y - - - update_date - update_date - Y - - - vu_current_info - vu_current_info - Y - - - recruitment_id - recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - deferment_liberation - deferment_liberation - Y - - - reason_registration - reason_registration - Y - - - residence - residence - Y - - - start_date_residence - start_date_residence - Y - - - end_date_residence - end_date_residence - Y - - - address_place_stay - address_place_stay - Y - - - start_date_place_stay - start_date_place_stay - Y - - - end_date_place_stay - end_date_place_stay - Y - - - type_place_stay - type_place_stay - Y - - - id_ern - id_ern - Y - -
- N - - - 1104 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - with -adresses as ( -- по одному ли адресу тут должно быть?? -SELECT - r.id as recruit_id, - MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress, - MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart, - MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd, - MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress, - MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart, - MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd, - MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg -FROM - public.recruits AS r -LEFT JOIN - LATERAL jsonb_array_elements(r.addresses) AS addr ON true -WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date - AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp -GROUP BY - r.id -) -SELECT - r.system_pgs_status, - r.full_name, - r.last_name, - r.first_name, - r.middle_name, - r.gender, - --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils, - --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn, - r.birth_date, - EXTRACT(YEAR FROM AGE(r.birth_date)) AS age, - r.birth_place, - r.phone, - r.email, - r.id AS recruit_id, --ri.recruit_id, - --ri.info, - --r.vu_current_info, - r.military_registration_date AS date_registration, - r.vu_unset_date AS date_deregistration, - --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, - --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, - --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, - --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, - r.system_create_date AS recruit_create_date, - r.system_update_date AS update_date, - CASE - WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' - ELSE 'NOTCONVICT' - END AS convicts, - r.current_recruitment_id AS recruitment_id, - r.target_recruitment_id, - CASE - WHEN ddd.hidden IS false then ddd.hidden - ELSE true - END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет - mrr.value AS reason_registration - adr.actualAddress as residence, -- адрес места жительства - adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства - adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства - adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания - adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания - adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания - case - when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица' - when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы' - else null - end as type_place_stay, -- тип регистрации - -- address_actual -- Адрес фактического проживания ***1 - -- source_info_actual -- Источник сведений о месте фактического проживания ***1 - -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1 - -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1 - system_id_ern AS id_ern -- id единого регистра населения -FROM public.recruits AS r -JOIN public.recruits_info AS ri ON ri.recruit_id = r.id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp -LEFT JOIN ( - SELECT - ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, - recruit_id, - hidden - FROM public.decision_deferment_dto - ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false -JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) ---JOIN public.recruits_history rh on rh.recruit_id=r.id ---WHERE r.system_update_date >= '${UP_D}' -join adresses adr ON r.recruit_id=adr.recruit_id - --- ***1 - страница личные сведения есть поле, нет данных - Y - - - 624 - 352 - - diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl new file mode 100644 index 0000000..a7b1ec5 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl @@ -0,0 +1,395 @@ + + + + citizen_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Table input + Table output + Y + + + Table output + Change job status on success + Y + + + Create job execution record + Table input + Y + + + Table output + Change job status on error + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 992 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 992 + 320 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 10 + /* +with +adresses as ( -- по одному ли адресу тут должно быть?? +SELECT + r.id as recruit_id, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg +FROM + public.recruits AS r +LEFT JOIN + LATERAL jsonb_array_elements(r.addresses) AS addr ON true +WHERE '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +GROUP BY + r.id +) +*/ +SELECT + r.system_pgs_status, + r.full_name, + r.last_name, + r.first_name, + r.middle_name, + r.gender, + --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils, + --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn, + r.birth_date, + EXTRACT(YEAR FROM AGE(r.birth_date)) AS age, + r.birth_place, + r.phone, + r.email, + r.id AS recruit_id, --ri.recruit_id, + --ri.info, + r.vu_current_info, + r.military_registration_date AS date_registration, + r.vu_unset_date AS date_deregistration, + --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, + r.system_create_date AS recruit_create_date, + r.system_update_date AS update_date, +/* + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, +*/ + r.current_recruitment_id AS recruitment_id, + r.target_recruitment_id, + CASE + WHEN ddd.hidden IS false then ddd.hidden + ELSE true + END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет + mrr.value AS reason_registration, + --adr.actualAddress as residence, -- адрес места жительства + --adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства + --adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства + --adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания + --adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания + --adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания + --case + -- when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица' + -- when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы' + -- else null + --end as type_place_stay, -- тип регистрации + -- address_actual -- Адрес фактического проживания ***1 + -- source_info_actual -- Источник сведений о месте фактического проживания ***1 + -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1 + -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1 + system_id_ern AS id_ern -- id единого регистра населения +FROM public.recruits AS r +JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, + recruit_id, + hidden + FROM public.decision_deferment_dto + ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false +JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.recruits_history rh on rh.recruit_id=r.id +--WHERE r.system_update_date >= '${UP_D}' +--join adresses adr ON r.recruit_id=adr.recruit_id + +-- ***1 - страница личные сведения есть поле, нет данных + Y + + + 496 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen
+ N + Y + N + Y + + + 720 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl new file mode 100644 index 0000000..86703dc --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl @@ -0,0 +1,396 @@ + + + + citizen_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Table output + Y + + + Table output + Change job status on error + Y + + + Table output + Change job status on success + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + error_code + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ?, + error_code = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 416 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + + Y + + N + + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 224 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 10 + WITH trud_info AS (SELECT ri.info, + ri.recruit_id::uuid, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 + END AS trud_deyat, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL + WHEN + jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = + 'array' THEN + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 + END AS parental_leave_info, + + COALESCE( + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' + ) AS employer, + + CASE + WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL + WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' + THEN + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 + ELSE + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' + END AS reg_ip, + + COALESCE( + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' + ) AS self_employment + + FROM ervu_dashboard.recruits_info ri + +) +SELECT ti.recruit_id::uuid, + (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, + ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, + (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, + ti.trud_deyat ->> 'trudFunkcziya' AS position, + ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, + ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, + CASE + WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' + WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' + END AS employer_category, + COALESCE( + ti.employer -> 'svedYUL' ->> 'innyul', + ti.employer -> 'svedIP' ->> 'innyfl' + ) AS employer_inn, + ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, + COALESCE( + ti.employer -> 'svedIP' ->> 'ogrnip', + ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' + ) AS employer_ogrnip, + ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, + ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, + (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, + (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, + ( + (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND + ( + (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR + (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date + ) + ) AS parental_leave_active, + (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, + (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, + ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, + ti.reg_ip IS NOT NULL AS active_ip, + ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, + ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, + ti.self_employment IS NOT NULL AS active_self_employment +FROM trud_info ti; + + Y + + + 544 + 224 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_work_activity
+ N + Y + N + Y + + + 768 + 224 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl new file mode 100644 index 0000000..9cd673e --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl @@ -0,0 +1,418 @@ + + + + citizen_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Table output + Y + + + Table output + Change job status on error + Y + + + Table output + Change job status on success + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + error_code + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 976 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 976 + 208 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + error_code, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL; + + + 272 + 208 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 10 + /* +with +adresses as ( -- по одному ли адресу тут должно быть?? +SELECT + r.id as recruit_id, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg +FROM + public.recruits AS r +LEFT JOIN + LATERAL jsonb_array_elements(r.addresses) AS addr ON true +WHERE '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +GROUP BY + r.id +) +*/ +SELECT + r.system_pgs_status, + r.full_name, + r.last_name, + r.first_name, + r.middle_name, + r.gender, + --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils, + --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn, + r.birth_date, + EXTRACT(YEAR FROM AGE(r.birth_date)) AS age, + r.birth_place, + r.phone, + r.email, + r.id AS recruit_id, --ri.recruit_id, + --ri.info, + r.vu_current_info, + r.military_registration_date AS date_registration, + r.vu_unset_date AS date_deregistration, + --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, + r.system_create_date AS recruit_create_date, + r.system_update_date AS update_date, +/* + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, +*/ + r.current_recruitment_id AS recruitment_id, + r.target_recruitment_id, + CASE + WHEN ddd.hidden IS false then ddd.hidden + ELSE true + END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет + mrr.value AS reason_registration, + --adr.actualAddress as residence, -- адрес места жительства + --adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства + --adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства + --adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания + --adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания + --adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания + --case + -- when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица' + -- when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы' + -- else null + --end as type_place_stay, -- тип регистрации + -- address_actual -- Адрес фактического проживания ***1 + -- source_info_actual -- Источник сведений о месте фактического проживания ***1 + -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1 + -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1 + system_id_ern AS id_ern -- id единого регистра населения +FROM public.recruits AS r +JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, + recruit_id, + hidden + FROM public.decision_deferment_dto + ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false +JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.recruits_history rh on rh.recruit_id=r.id +--WHERE r.system_update_date >= '${UP_D}' +--join adresses adr ON r.recruit_id=adr.recruit_id + +-- ***1 - страница личные сведения есть поле, нет данных + Y + + + 480 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + current_workplace + current_workplace + + + position + position + + + employer_name + employer_name + + + employer_kpp + employer_kpp + + + employer_category + employer_category + + + employer_inn + employer_inn + + + employer_address + employer_address + + + employer_ogrnip + employer_ogrnip + + + employer_unit_type + employer_unit_type + + + employer_unit_address + employer_unit_address + + + parental_leave_start_date + parental_leave_start_date + + + parental_leave_end_date + parental_leave_end_date + + + parental_leave_active + parental_leave_active + + + reg_ip_date + reg_ip_date + + + dereg_ip_date + dereg_ip_date + + + ogrnip_ip + ogrnip_ip + + + active_ip + active_ip + + + reg_self_employment_date + reg_self_employment_date + + + dereg_self_employment_date + dereg_self_employment_date + + + active_self_employment + active_self_employment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen
+ N + Y + N + Y + + + 704 + 208 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..025cdfe --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + citizen_flow_delta.hpl + Y + + + Table input + citizen_flow_delta.hpl 2 + Y + + + Table input + citizen_flow_delta.hpl 3 + Y + + + Table input + citizen_flow_delta.hpl 4 + Y + + + Table input + citizen_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + citizen_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 128 + + + + citizen_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + citizen_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 288 + + + + citizen_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 368 + + + + citizen_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..ff128c3 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + citizen_flow_repeat.hpl + Y + + + Table input + citizen_flow_repeat.hpl 3 + Y + + + Table input + citizen_flow_repeat.hpl 2 + Y + + + Table input + citizen_flow_repeat.hpl 4 + Y + + + Table input + citizen_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + citizen_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 208 + + + + citizen_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 288 + + + + citizen_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 368 + + + + citizen_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 448 + + + + citizen_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl new file mode 100644 index 0000000..78a6ef5 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + citizen_flow.hpl + Y + + + Get all recruitments ordered by created_date + citizen_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + citizen_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + citizen_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + citizen_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 432 + 304 + + + + citizen_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 144 + + + + citizen_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 224 + + + + citizen_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 304 + + + + citizen_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 384 + + + + citizen_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 464 + + + + + + From fb197926170eb1186b801a3e61d2d8fc8df71a49 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Wed, 13 Aug 2025 17:52:32 +0300 Subject: [PATCH 03/21] / --- mappings/connections/external_to_test1.json | 103 + ..._status_parallel_recruits_info_citizen.hpl | 88 +- .../citizen_tables/citizen/citizen_job.hwf | 36 +- .../citizen/parallel/citizen_flow.hpl | 100 +- .../citizen/parallel/citizen_flow_delta.hpl | 465 +-- .../citizen/parallel/citizen_flow_repeat.hpl | 110 +- .../job_general_info_recruits.hwf | 42 +- .../job_parallel_recruits_info_citizen.hwf | 22 +- .../branching_recruits_info_delta.hpl | 142 - ...status_delta_recruits_info_flow1_error.hpl | 103 - ...atus_delta_recruits_info_flow1_success.hpl | 102 - ...status_delta_recruits_info_flow2_error.hpl | 103 - ...atus_delta_recruits_info_flow2_success.hpl | 102 - ...status_delta_recruits_info_flow3_error.hpl | 103 - ...atus_delta_recruits_info_flow3_success.hpl | 102 - ...status_delta_recruits_info_flow4_error.hpl | 103 - ...atus_delta_recruits_info_flow4_success.hpl | 102 - ...status_delta_recruits_info_flow5_error.hpl | 103 - ...atus_delta_recruits_info_flow5_success.hpl | 102 - ...hange_status_recruits_info_flow1_error.hpl | 249 -- ...nge_status_recruits_info_flow1_success.hpl | 249 -- ...hange_status_recruits_info_flow2_error.hpl | 253 -- ...nge_status_recruits_info_flow2_success.hpl | 253 -- ...hange_status_recruits_info_flow3_error.hpl | 254 -- ...nge_status_recruits_info_flow3_success.hpl | 254 -- ...hange_status_recruits_info_flow4_error.hpl | 255 -- ...nge_status_recruits_info_flow4_success.hpl | 255 -- ...hange_status_recruits_info_flow5_error.hpl | 255 -- ...nge_status_recruits_info_flow5_success.hpl | 255 -- .../change_status_to_processing.hpl | 143 - .../change_status_to_processing_delta.hpl | 142 - .../check_if_job_recruits_info_exists.hpl | 130 - .../checkpoint_job_recruits_info.hpl | 1004 ------ .../checkpoint_job_recruits_info_delta.hpl | 1004 ------ .../checkpoint_recruit_info_error.hpl | 284 -- .../job_check_files_recruits_info.hwf | 330 -- .../job_checkpoints_recruits_info.hwf | 91 - .../job_create_files_recruits_info.hwf | 235 -- .../info_recruits/job_recruits_info.hwf | 2776 ----------------- .../parallel/delta_recruits_info_flow1.hpl | 151 - .../parallel/delta_recruits_info_flow2.hpl | 151 - .../parallel/delta_recruits_info_flow3.hpl | 151 - .../parallel/delta_recruits_info_flow4.hpl | 151 - .../parallel/delta_recruits_info_flow5.hpl | 151 - .../parallel/recruits_info_flow2.hpl | 141 - .../parallel/recruits_info_flow3.hpl | 141 - .../parallel/recruits_info_flow4.hpl | 141 - .../parallel/recruits_info_flow5.hpl | 141 - .../recruitment_rows_five_flow_if_error.hpl | 185 -- .../check_if_need_to_repeat_job.hpl} | 57 +- .../check_if_recruits_info_job_exists.hpl} | 61 +- .../recruits_info/delta_recruits_info.hpl | 27 + .../job_recruit_last_update_date.hwf | 8 +- .../parallel/recruits_info_flow.hpl | 271 ++ .../parallel/recruits_info_flow_delta.hpl} | 204 +- .../parallel/recruits_info_flow_repeat.hpl | 291 ++ .../recruit_update_date_ervu_dashboard.hpl | 0 .../recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../recruits_info/recruitments_five_flow.hpl | 356 +++ .../recruits_info/recruits_info_job.hwf | 353 +++ .../row_last_recruit_update_date.hpl | 0 62 files changed, 2749 insertions(+), 11907 deletions(-) create mode 100644 mappings/connections/external_to_test1.json delete mode 100644 mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf delete mode 100644 mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf delete mode 100644 mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl delete mode 100644 mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl rename mappings/info_recruits/raw_data/{info_recruits/recruits_info_param_create_date.hpl => recruits_info/check_if_need_to_repeat_job.hpl} (60%) rename mappings/info_recruits/raw_data/{info_recruits/branching_recruits_info.hpl => recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl} (71%) create mode 100644 mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl rename mappings/info_recruits/raw_data/{info_recruits => recruits_info}/job_recruit_last_update_date.hwf (93%) create mode 100644 mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl rename mappings/info_recruits/raw_data/{info_recruits/parallel/recruits_info_flow1.hpl => recruits_info/parallel/recruits_info_flow_delta.hpl} (56%) create mode 100644 mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl rename mappings/info_recruits/raw_data/{info_recruits => recruits_info}/recruit_update_date_ervu_dashboard.hpl (100%) create mode 100644 mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf rename mappings/info_recruits/raw_data/{info_recruits => recruits_info}/row_last_recruit_update_date.hpl (100%) diff --git a/mappings/connections/external_to_test1.json b/mappings/connections/external_to_test1.json new file mode 100644 index 0000000..45d636b --- /dev/null +++ b/mappings/connections/external_to_test1.json @@ -0,0 +1,103 @@ +{ + "variables" : [ { + "name" : "DB_PERSON_HOST", + "value" : "172.30.66.35", + "description" : "" + }, { + "name" : "DB_PERSON_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_PERSON_NAME", + "value" : "ervu_person_registry", + "description" : "" + }, { + "name" : "DB_PERSON_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_PERSON_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DASHBOARD_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DASHBOARD_NAME", + "value" : "ervu-dashboard-test1", + "description" : "" + }, { + "name" : "DB_DASHBOARD_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_DASHBOARD_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_APPEAL_HOST", + "value" : "172.30.66.35", + "description" : "" + }, { + "name" : "DB_APPEAL_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_APPEAL_NAME", + "value" : "ervu_appeal_document", + "description" : "" + }, { + "name" : "DB_APPEAL_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_APPEAL_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_HOST", + "value" : "172.30.66.35", + "description" : "" + }, { + "name" : "DB_DECISION_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_DECISION_NAME", + "value" : "ervu_decision_document", + "description" : "" + }, { + "name" : "DB_DECISION_USERNAME", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_DECISION_PASSWORD", + "value" : "readonly", + "description" : "" + }, { + "name" : "DB_SUBPOENA_HOST", + "value" : "10.10.31.119", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PORT", + "value" : "5432", + "description" : "" + }, { + "name" : "DB_SUBPOENA_NAME", + "value" : "ervu_subpoena_registry", + "description" : "" + }, { + "name" : "DB_SUBPOENA_USERNAME", + "value" : "ervu-dashboard", + "description" : "" + }, { + "name" : "DB_SUBPOENA_PASSWORD", + "value" : "ervu-dashboard", + "description" : "" + } ] +} \ No newline at end of file diff --git a/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl b/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl index f686db8..56f3479 100644 --- a/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl +++ b/mappings/info_recruits/checkpoints/check_status_parallel_recruits_info_citizen.hpl @@ -80,50 +80,6 @@ 288
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'job_citizen', - 'job_recruits_info' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'job_citizen', - 'job_recruits_info' - ) - ) = 2 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_parallel_recruits_info_citizen' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 720 - 288 - - Set variables SetVariable @@ -154,6 +110,50 @@ FROM status_check; 288
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + WITH status_check AS ( + SELECT + bool_or(status = 'ERROR' AND job_name IN ( + 'citizen_job', + 'recruits_info_job' + )) AS has_error, + count(*) FILTER ( + WHERE status = 'SUCCESS' AND job_name IN ( + 'citizen_job', + 'recruits_info_job' + ) + ) = 2 AS all_success + FROM etl.job_execution +) +SELECT + 'job_parallel_recruits_info_citizen' as job_name, + CASE + WHEN has_error THEN 'ERROR' + WHEN all_success THEN 'SUCCESS' + ELSE 'ERROR' + END AS status, + current_timestamp AS record_created +FROM status_check; + N + + + 720 + 288 + + Write to log WriteToLog diff --git a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf index b7e58cf..945c14f 100644 --- a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf +++ b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf @@ -5,12 +5,28 @@ + 0 - 2025/08/05 12:45:28.561 - 2025/08/05 12:45:28.561 - + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + Start @@ -318,11 +334,19 @@ N Segoe UI 9 - 26 - 672 - 128 - citizen_job - 67 + 150 + 1200 + 80 + citizen_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl index a7b1ec5..b30d1c2 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl @@ -149,7 +149,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); ervu_person_registry N - 10 /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -210,7 +209,7 @@ SELECT WHEN ddd.hidden IS false then ddd.hidden ELSE true END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет - mrr.value AS reason_registration, + --mrr.value AS reason_registration, --adr.actualAddress as residence, -- адрес места жительства --adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства --adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства @@ -238,12 +237,14 @@ LEFT JOIN ( hidden FROM public.decision_deferment_dto ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false -JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) --JOIN public.recruits_history rh on rh.recruit_id=r.id --WHERE r.system_update_date >= '${UP_D}' --join adresses adr ON r.recruit_id=adr.recruit_id --- ***1 - страница личные сведения есть поле, нет данных +-- ***1 - страница личные сведения есть поле, нет данных + +${LIMIT_FW} Y @@ -270,103 +271,98 @@ JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb recruit_id - personnel_event_date - personnel_event_date + system_pgs_status + system_pgs_status - personnel_event_type - personnel_event_type + full_name + full_name - current_workplace - current_workplace + last_name + last_name - position - position + first_name + first_name - employer_name - employer_name + middle_name + middle_name - employer_kpp - employer_kpp + gender + gender - employer_category - employer_category + birth_date + birth_date - employer_inn - employer_inn + age + age - employer_address - employer_address + birth_place + birth_place - employer_ogrnip - employer_ogrnip + phone + phone - employer_unit_type - employer_unit_type + email + email - employer_unit_address - employer_unit_address + vu_current_info + vu_current_info - parental_leave_start_date - parental_leave_start_date + date_registration + date_registration - parental_leave_end_date - parental_leave_end_date + date_deregistration + date_deregistration - parental_leave_active - parental_leave_active + recruit_create_date + recruit_create_date - reg_ip_date - reg_ip_date + update_date + update_date - dereg_ip_date - dereg_ip_date + recruitment_id + recruitment_id - ogrnip_ip - ogrnip_ip + target_recruitment_id + target_recruitment_id - active_ip - active_ip + deferment_liberation + deferment_liberation - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment + id_ern + id_ern N N N N + Y + N ervu_dashboard Y citizen
+ N Y N diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl index 86703dc..c504f9f 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl @@ -27,19 +27,19 @@ Table input - Table output + Insert / update Y - Table output - Change job status on error - Y - - - Table output + Insert / update Change job status on success Y + + Insert / update + Change job status on error + Y + Change job status on error @@ -61,11 +61,8 @@ ervu-dashboard - Y - N - Y Y N @@ -77,7 +74,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 1040 @@ -98,11 +94,8 @@ and recruitment_id = '${IDM_ID}'; ervu-dashboard - Y - N - Y N N @@ -112,7 +105,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 1040 @@ -152,6 +144,141 @@ and recruitment_id = '${IDM_ID}'; 224 + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen
+ + recruit_id + recruit_id + N + + + system_pgs_status + system_pgs_status + Y + + + full_name + full_name + Y + + + last_name + last_name + Y + + + first_name + first_name + Y + + + middle_name + middle_name + Y + + + gender + gender + Y + + + birth_date + birth_date + Y + + + age + age + Y + + + birth_place + birth_place + Y + + + phone + phone + Y + + + email + email + Y + + + vu_current_info + vu_current_info + Y + + + date_registration + date_registration + Y + + + date_deregistration + date_deregistration + Y + + + recruit_create_date + recruit_create_date + Y + + + update_date + update_date + Y + + + recruitment_id + recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + deferment_liberation + deferment_liberation + Y + + + id_ern + id_ern + Y + +
+ N + + + 784 + 224 + +
Table input TableInput @@ -163,88 +290,104 @@ and recruitment_id = '${IDM_ID}'; none - ervu-dashboard + ervu_person_registry N - 10 - WITH trud_info AS (SELECT ri.info, - ri.recruit_id::uuid, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 - END AS trud_deyat, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN - jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = - 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 - END AS parental_leave_info, - - COALESCE( - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' - ) AS employer, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' - THEN - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 - ELSE - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' - END AS reg_ip, - - COALESCE( - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' - ) AS self_employment - - FROM ervu_dashboard.recruits_info ri - + /* +with +adresses as ( -- по одному ли адресу тут должно быть?? +SELECT + r.id as recruit_id, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd, + MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg +FROM + public.recruits AS r +LEFT JOIN + LATERAL jsonb_array_elements(r.addresses) AS addr ON true +WHERE '${ID_F1}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +GROUP BY + r.id ) -SELECT ti.recruit_id::uuid, - (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, - ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, - (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, - ti.trud_deyat ->> 'trudFunkcziya' AS position, - ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, - ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, - CASE - WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' - WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' - END AS employer_category, - COALESCE( - ti.employer -> 'svedYUL' ->> 'innyul', - ti.employer -> 'svedIP' ->> 'innyfl' - ) AS employer_inn, - ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, - COALESCE( - ti.employer -> 'svedIP' ->> 'ogrnip', - ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' - ) AS employer_ogrnip, - ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, - ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, - (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, - (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, - ( - (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND - ( - (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR - (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date - ) - ) AS parental_leave_active, - (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, - (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, - ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, - ti.reg_ip IS NOT NULL AS active_ip, - ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, - ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, - ti.self_employment IS NOT NULL AS active_self_employment -FROM trud_info ti; - +*/ +SELECT + r.system_pgs_status, + r.full_name, + r.last_name, + r.first_name, + r.middle_name, + r.gender, + --ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils, + --ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn, + r.birth_date, + EXTRACT(YEAR FROM AGE(r.birth_date)) AS age, + r.birth_place, + r.phone, + r.email, + r.id AS recruit_id, --ri.recruit_id, + --ri.info, + r.vu_current_info, + r.military_registration_date AS date_registration, + r.vu_unset_date AS date_deregistration, + --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, + --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, + --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, + r.system_create_date AS recruit_create_date, + r.system_update_date AS update_date, +/* + CASE + WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT' + ELSE 'NOTCONVICT' + END AS convicts, +*/ + r.current_recruitment_id AS recruitment_id, + r.target_recruitment_id, + CASE + WHEN ddd.hidden IS false then ddd.hidden + ELSE true + END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет + --mrr.value AS reason_registration, + --adr.actualAddress as residence, -- адрес места жительства + --adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства + --adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства + --adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания + --adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания + --adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания + --case + -- when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица' + -- when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы' + -- else null + --end as type_place_stay, -- тип регистрации + -- address_actual -- Адрес фактического проживания ***1 + -- source_info_actual -- Источник сведений о месте фактического проживания ***1 + -- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1 + -- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1 + system_id_ern AS id_ern -- id единого регистра населения +FROM public.recruits AS r +JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp +LEFT JOIN ( + SELECT + ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, + recruit_id, + hidden + FROM public.decision_deferment_dto + ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false +--JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.recruits_history rh on rh.recruit_id=r.id +--WHERE r.system_update_date >= '${UP_D}' +--join adresses adr ON r.recruit_id=adr.recruit_id + +-- ***1 - страница личные сведения есть поле, нет данных + +${LIMIT_FW} Y @@ -252,141 +395,15 @@ FROM trud_info ti; 224 - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - recruit_id - recruit_id - - - personnel_event_date - personnel_event_date - - - personnel_event_type - personnel_event_type - - - current_workplace - current_workplace - - - position - position - - - employer_name - employer_name - - - employer_kpp - employer_kpp - - - employer_category - employer_category - - - employer_inn - employer_inn - - - employer_address - employer_address - - - employer_ogrnip - employer_ogrnip - - - employer_unit_type - employer_unit_type - - - employer_unit_address - employer_unit_address - - - parental_leave_start_date - parental_leave_start_date - - - parental_leave_end_date - parental_leave_end_date - - - parental_leave_active - parental_leave_active - - - reg_ip_date - reg_ip_date - - - dereg_ip_date - dereg_ip_date - - - ogrnip_ip - ogrnip_ip - - - active_ip - active_ip - - - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment - - - N - N - N - N - Y - N - ervu_dashboard - Y - citizen_work_activity
- N - Y - N - Y - - - 768 - 224 - -
- Table output + Insert / update Change job status on error Y - error_description + - error_code + diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl index 9cd673e..fb6a4fa 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl @@ -32,12 +32,12 @@ Table output - Change job status on error + Change job status on success Y Table output - Change job status on success + Change job status on error Y @@ -172,7 +172,6 @@ DO UPDATE SET ervu_person_registry N - 10 /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -233,7 +232,7 @@ SELECT WHEN ddd.hidden IS false then ddd.hidden ELSE true END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет - mrr.value AS reason_registration, + -- mrr.value AS reason_registration, --adr.actualAddress as residence, -- адрес места жительства --adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства --adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства @@ -261,12 +260,14 @@ LEFT JOIN ( hidden FROM public.decision_deferment_dto ) ddd ON ddd.recruit_id = r.id and ddd.rn = 1 and ddd.hidden is false -JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) +--JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text) --JOIN public.recruits_history rh on rh.recruit_id=r.id --WHERE r.system_update_date >= '${UP_D}' --join adresses adr ON r.recruit_id=adr.recruit_id --- ***1 - страница личные сведения есть поле, нет данных +-- ***1 - страница личные сведения есть поле, нет данных + +${LIMIT_FW} Y @@ -293,110 +294,105 @@ JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb recruit_id - personnel_event_date - personnel_event_date + system_pgs_status + system_pgs_status - personnel_event_type - personnel_event_type + full_name + full_name - current_workplace - current_workplace + last_name + last_name - position - position + first_name + first_name - employer_name - employer_name + middle_name + middle_name - employer_kpp - employer_kpp + gender + gender - employer_category - employer_category + birth_date + birth_date - employer_inn - employer_inn + age + age - employer_address - employer_address + birth_place + birth_place - employer_ogrnip - employer_ogrnip + phone + phone - employer_unit_type - employer_unit_type + email + email - employer_unit_address - employer_unit_address + vu_current_info + vu_current_info - parental_leave_start_date - parental_leave_start_date + date_registration + date_registration - parental_leave_end_date - parental_leave_end_date + date_deregistration + date_deregistration - parental_leave_active - parental_leave_active + recruit_create_date + recruit_create_date - reg_ip_date - reg_ip_date + update_date + update_date - dereg_ip_date - dereg_ip_date + recruitment_id + recruitment_id - ogrnip_ip - ogrnip_ip + target_recruitment_id + target_recruitment_id - active_ip - active_ip + deferment_liberation + deferment_liberation - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment + id_ern + id_ern N N N N + Y + N ervu_dashboard Y citizen
+ N Y N Y - 704 + 720 208
@@ -406,9 +402,9 @@ JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb Change job status on error Y - error_description + - error_code + diff --git a/mappings/info_recruits/job_general_info_recruits.hwf b/mappings/info_recruits/job_general_info_recruits.hwf index 6835eac..c2a1fb7 100644 --- a/mappings/info_recruits/job_general_info_recruits.hwf +++ b/mappings/info_recruits/job_general_info_recruits.hwf @@ -167,8 +167,8 @@ N Y N - 944 - 672 + 928 + 880 @@ -185,8 +185,8 @@ variable STATUS N - 1280 - 672 + 1264 + 880 @@ -720,18 +720,14 @@ N N ${PROJECT_HOME}/info_recruits/job_info_recruits_from_json.hwf - - Nothing M_R_CR_DATE - ${M_R_CR_DATE} M_R_UP_DATE - ${M_R_UP_DATE} Y @@ -918,6 +914,16 @@ 1408 + + Success + + SUCCESS + + N + 2224 + 560 + + @@ -937,7 +943,7 @@ Start branching_job_general_info_recruits.hpl - Y + N Y Y @@ -951,7 +957,7 @@ IF job_general_info_recruits SUCCESS job_recruitment.hwf - Y + N Y N @@ -1021,7 +1027,7 @@ job_parallel_recruits_info_citizen.hwf check_status_parallel_recruits_info_citizen.hpl - Y + N Y N @@ -1200,6 +1206,20 @@ Y N + + Start + job_recruitment.hwf + Y + Y + Y + + + job_parallel_recruits_info_citizen.hwf + Success + Y + Y + N + diff --git a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf index f0fd3b4..5f88431 100644 --- a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf +++ b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf @@ -31,7 +31,7 @@ - job_citizen.hwf + citizen_job.hwf WORKFLOW @@ -39,7 +39,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/job_citizen.hwf + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/citizen_job.hwf Nothing @@ -67,7 +67,7 @@ - job_recruits_info.hwf + recruits_info_job.hwf WORKFLOW @@ -75,19 +75,15 @@ N N N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruits_info.hwf - - + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruits_info_job.hwf Nothing M_R_CR_DATE - ${M_R_CR_DATE} M_R_UP_DATE - ${M_R_UP_DATE} Y @@ -131,7 +127,7 @@ N N N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf Nothing Y @@ -149,14 +145,14 @@ - job_citizen.hwf + citizen_job.hwf Success job_citizen Y Y N - job_recruits_info.hwf + recruits_info_job.hwf Success job_recruits_info Y Y @@ -171,14 +167,14 @@ job_recruit_last_update_date.hwf - job_citizen.hwf + citizen_job.hwf Y Y Y job_recruit_last_update_date.hwf - job_recruits_info.hwf + recruits_info_job.hwf Y N Y diff --git a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl b/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl deleted file mode 100644 index 2f75a4a..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - branching_recruits_info_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/29 10:09:35.340 - - - 2025/05/29 10:09:35.340 - - - - - - Table input - Set variables 2 - Y - - - Set variables 2 - Write to log - N - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 736 - 192 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_recruits_info_delta') AS PIPELINE, - COALESCE(status, 'ERROR') AS STATUS, - current_timestamp::timestamp as record_created -FROM ( - select - CASE - WHEN status = 'PROCESSING' THEN 'ERROR' - ELSE status - END AS status, - job_name - from public.etl_checkpoints - where job_name = 'job_recruits_info_delta' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_recruits_info_delta' - ) -) t - N - - - 496 - 192 - - - - Write to log - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 944 - 336 - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl deleted file mode 100644 index 9f0cf27..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl +++ /dev/null @@ -1,103 +0,0 @@ - - - - change_status_delta_recruits_info_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow1' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl deleted file mode 100644 index e19c801..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_recruits_info_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow1' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl deleted file mode 100644 index b0b2801..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl +++ /dev/null @@ -1,103 +0,0 @@ - - - - change_status_delta_recruits_info_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow2' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl deleted file mode 100644 index eec52d6..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_recruits_info_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow2' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl deleted file mode 100644 index e2befc8..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl +++ /dev/null @@ -1,103 +0,0 @@ - - - - change_status_delta_recruits_info_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow3' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl deleted file mode 100644 index f1f1510..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_recruits_info_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow3' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl deleted file mode 100644 index 4241b74..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl +++ /dev/null @@ -1,103 +0,0 @@ - - - - change_status_delta_recruits_info_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow4' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl deleted file mode 100644 index a174f35..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_recruits_info_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow4' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl deleted file mode 100644 index 8d4e2a8..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl +++ /dev/null @@ -1,103 +0,0 @@ - - - - change_status_delta_recruits_info_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow5' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl deleted file mode 100644 index a34c584..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_recruits_info_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_recruits_info_flow5' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl deleted file mode 100644 index 51e87c5..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl +++ /dev/null @@ -1,249 +0,0 @@ - - - - change_status_recruits_info_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'recruits_info_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl deleted file mode 100644 index f83ca3d..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl +++ /dev/null @@ -1,249 +0,0 @@ - - - - change_status_recruits_info_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'recruits_info_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl deleted file mode 100644 index 94c5e87..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl +++ /dev/null @@ -1,253 +0,0 @@ - - - - change_status_recruits_info_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl deleted file mode 100644 index b98cc58..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl +++ /dev/null @@ -1,253 +0,0 @@ - - - - change_status_recruits_info_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl deleted file mode 100644 index 39a6d13..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_recruits_info_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl deleted file mode 100644 index 717fd93..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_recruits_info_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl deleted file mode 100644 index 416fe0d..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_recruits_info_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl deleted file mode 100644 index 1400ff4..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_recruits_info_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl deleted file mode 100644 index 105a90e..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_recruits_info_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl deleted file mode 100644 index 440b7de..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_recruits_info_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'recruits_info_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl deleted file mode 100644 index 76e8db7..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl +++ /dev/null @@ -1,143 +0,0 @@ - - - - change_status_to_processing - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 16:14:31.162 - - - 2025/06/11 16:14:31.162 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 784 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'job_recruits_info' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - - N - - - 368 - 352 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl deleted file mode 100644 index 651ddd2..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - change_status_to_processing_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 13:42:26.494 - - - 2025/06/16 13:42:26.494 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1248 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'delta_recruits_info' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_delta_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_delta_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_delta_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_delta_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'recruits_info_delta_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 832 - 352 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl deleted file mode 100644 index 4f73a51..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl +++ /dev/null @@ -1,130 +0,0 @@ - - - - check_if_job_recruits_info_exists - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 15:20:18.267 - - - 2025/06/11 15:20:18.267 - - - - - - Table input - Set variables - Y - - - Set variables - Write to log - N - - - - Set variables - SetVariable - - Y - - 1 - - none - - - - - job_name - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 688 - 352 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_recruits_info') AS job_name, - COALESCE(status, 'NEW') AS status, - current_timestamp::timestamp as record_created -FROM ( - SELECT job_name, status - FROM public.etl_checkpoints - WHERE job_name = 'job_recruits_info' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_recruits_info' - ) -) t - N - - - 400 - 352 - - - - Write to log - WriteToLog - - Y - - 1 - - none - - - Y - - - N - 0 - Basic - ${STATUS} - - - 960 - 240 - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl deleted file mode 100644 index 6bdda91..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl +++ /dev/null @@ -1,1004 +0,0 @@ - - - - checkpoint_job_recruits_info - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/30 10:34:00.239 - - - 2025/05/30 10:34:00.239 - - - - - - JSON input state_recruits_info_flow3.json - Filter rows - N - - - JSON input state_recruits_info_flow4.json - Filter rows - N - - - JSON input state_recruits_info_flow5.json - Filter rows - N - - - JSON input state_recruits_info_flow2.json - Filter rows - N - - - JSON input state_recruits_info_flow1.json - Filter rows - N - - - Set variables - Write to log 3 - Y - - - Set variables 2 - Write to log 3 2 - Y - - - Dummy (do nothing) - Set variables 2 - N - - - Dummy (do nothing) - Set variables - N - - - Filter rows - Abort - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow1.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow2.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow3.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow4.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow5.json - N - - - Table input - Insert / update - Y - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1072 - 784 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 1136 - 608 - - - - Dummy (do nothing) 2 - Dummy - - Y - - 1 - - none - - - - - 208 - 752 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 752 - 784 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 944 - 416 - -
- - JSON input state_recruits_info_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 624 - - - - JSON input state_recruits_info_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 704 - - - - JSON input state_recruits_info_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 784 - - - - JSON input state_recruits_info_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 864 - - - - JSON input state_recruits_info_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 944 - - - - Set variables - SetVariable - - Y - - 1 - - none - - - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1328 - 560 - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1328 - 640 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'recruits_info_flow1', - 'recruits_info_flow2', - 'recruits_info_flow3', - 'recruits_info_flow4', - 'recruits_info_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'recruits_info_flow1', - 'recruits_info_flow2', - 'recruits_info_flow3', - 'recruits_info_flow4', - 'recruits_info_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_recruits_info' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 576 - 416 - - - - Write to log 3 - WriteToLog - - Y - - 1 - - none - - - Y - - - N - 0 - Basic - ${STATUS} - - - 1520 - 560 - - - - Write to log 3 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - N - 0 - Basic - ${STATUS} - - - 1520 - 640 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl deleted file mode 100644 index 0d7b6fd..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl +++ /dev/null @@ -1,1004 +0,0 @@ - - - - checkpoint_job_recruits_info_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/30 10:34:00.239 - - - 2025/05/30 10:34:00.239 - - - - - - JSON input state_recruits_info_flow3.json - Filter rows - N - - - JSON input state_recruits_info_flow4.json - Filter rows - N - - - JSON input state_recruits_info_flow5.json - Filter rows - N - - - JSON input state_recruits_info_flow2.json - Filter rows - N - - - JSON input state_recruits_info_flow1.json - Filter rows - N - - - Set variables - Write to log 3 - Y - - - Set variables 2 - Write to log 3 2 - Y - - - Dummy (do nothing) - Set variables 2 - N - - - Dummy (do nothing) - Set variables - N - - - Filter rows - Abort - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow1.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow2.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow3.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow4.json - N - - - Dummy (do nothing) 2 - JSON input state_recruits_info_flow5.json - N - - - Table input - Insert / update - Y - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1072 - 784 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 1136 - 608 - - - - Dummy (do nothing) 2 - Dummy - - Y - - 1 - - none - - - - - 208 - 752 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 752 - 784 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 944 - 416 - -
- - JSON input state_recruits_info_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 624 - - - - JSON input state_recruits_info_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 704 - - - - JSON input state_recruits_info_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 784 - - - - JSON input state_recruits_info_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 864 - - - - JSON input state_recruits_info_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 448 - 944 - - - - Set variables - SetVariable - - Y - - 1 - - none - - - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1328 - 560 - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1328 - 640 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'delta_recruits_info_flow1', - 'delta_recruits_info_flow2', - 'delta_recruits_info_flow3', - 'delta_recruits_info_flow4', - 'delta_recruits_info_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'delta_recruits_info_flow1', - 'delta_recruits_info_flow2', - 'delta_recruits_info_flow3', - 'delta_recruits_info_flow4', - 'delta_recruits_info_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_recruits_info_delta' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 576 - 416 - - - - Write to log 3 - WriteToLog - - Y - - 1 - - none - - - Y - - - N - 0 - Basic - ${STATUS} - - - 1520 - 560 - - - - Write to log 3 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - N - 0 - Basic - ${STATUS} - - - 1520 - 640 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl b/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl deleted file mode 100644 index 07e1124..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl +++ /dev/null @@ -1,284 +0,0 @@ - - - - checkpoint_recruit_info_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/22 16:34:44.176 - - - 2025/05/22 16:34:44.176 - - - - - - Table input - Select values - N - - - Select values - Table output - N - - - Table input - Table output - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - N - - idm_id - idm_id - String - -2 - -2 - - false - - - false - - - - - - - - - - 624 - 400 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(current_recruitment_id, target_recruitment_id) AS idm_id - FROM ervu_dashboard.recruits_info -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - FROM result_ma -), -for_checkpoints as ( - SELECT - 'job_recruits_info_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_recruits_info_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_recruits_info_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_recruits_info_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_recruits_info_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -) -select * from for_checkpoints - N - - - 352 - 240 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - N - N - N - N - Y - N - public - N - etl_checkpoints
- N - Y - N - Y - - - 864 - 240 - -
- - - Select values - - Y - - - - - - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf b/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf deleted file mode 100644 index 517b401..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf +++ /dev/null @@ -1,330 +0,0 @@ - - - job_check_files_recruits_info - Y - - - - - - 2025/05/26 14:37:00.175 - - - 2025/05/26 14:37:00.175 - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 400 - 512 - - - - state_recruits_info_flow1.json - - FILES_EXIST - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json - - - N - 688 - 224 - - - - state_recruits_info_flow2.json - - FILES_EXIST - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json - - - N - 688 - 368 - - - - state_recruits_info_flow3.json - - FILES_EXIST - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json - - - N - 688 - 512 - - - - state_recruits_info_flow4.json - - FILES_EXIST - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json - - - N - 688 - 656 - - - - state_recruits_info_flow5.json - - FILES_EXIST - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json - - - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json - - - N - 688 - 800 - - - - Success - - SUCCESS - - N - 880 - 224 - - - - Abort workflow - - ABORT - - N - N - 880 - 288 - - - - Success 2 - - SUCCESS - - N - 880 - 368 - - - - Abort workflow 2 - - ABORT - - N - N - 880 - 432 - - - - Success 3 - - SUCCESS - - N - 880 - 512 - - - - Abort workflow 3 - - ABORT - - N - N - 880 - 576 - - - - Success 4 - - SUCCESS - - N - 880 - 656 - - - - Abort workflow 4 - - ABORT - - N - N - 880 - 720 - - - - Success 5 - - SUCCESS - - N - 880 - 800 - - - - Abort workflow 5 - - ABORT - - N - - N - 880 - 864 - - - - - - Start - state_recruits_info_flow1.json - Y - Y - Y - - - Start - state_recruits_info_flow2.json - Y - Y - Y - - - Start - state_recruits_info_flow3.json - Y - Y - Y - - - Start - state_recruits_info_flow4.json - Y - Y - Y - - - Start - state_recruits_info_flow5.json - Y - Y - Y - - - state_recruits_info_flow1.json - Success - Y - Y - N - - - state_recruits_info_flow1.json - Abort workflow - Y - N - N - - - state_recruits_info_flow2.json - Success 2 - Y - Y - N - - - state_recruits_info_flow2.json - Abort workflow 2 - Y - N - N - - - state_recruits_info_flow3.json - Success 3 - Y - Y - N - - - state_recruits_info_flow3.json - Abort workflow 3 - Y - N - N - - - state_recruits_info_flow4.json - Success 4 - Y - Y - N - - - state_recruits_info_flow4.json - Abort workflow 4 - Y - N - N - - - state_recruits_info_flow5.json - Success 5 - Y - Y - N - - - state_recruits_info_flow5.json - Abort workflow 5 - Y - N - N - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf b/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf deleted file mode 100644 index 56e4aac..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf +++ /dev/null @@ -1,91 +0,0 @@ - - - job_checkpoints_recruits_info - Y - - - - - - 2025/05/26 15:38:10.437 - - - 2025/05/26 15:38:10.437 - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 368 - 416 - - - - checkpoint_recruit_info_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_recruit_info_error.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 592 - 416 - - - - Success - - SUCCESS - - N - 784 - 416 - - - - - - Start - checkpoint_recruit_info_error.hpl - Y - Y - Y - - - checkpoint_recruit_info_error.hpl - Success - Y - Y - N - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf b/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf deleted file mode 100644 index 9d9eea2..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/checkpoints/job_create_files_recruits_info.hwf +++ /dev/null @@ -1,235 +0,0 @@ - - - job_create_files_recruits_info - Y - - - - - - 2025/05/26 16:48:00.210 - - - 2025/05/26 16:48:00.210 - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 576 - 496 - - - - state_recruits_info_flow2_new - - WRITE_TO_FILE - - N - { - "status": "NEW", - "pipeline": "recruits_info_flow2" -} - N - UTF-8 - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow2.json - N - 848 - 416 - - - - state_recruits_info_flow1_new - - WRITE_TO_FILE - - N - { - "status": "NEW", - "pipeline": "recruits_info_flow1" -} - N - UTF-8 - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow1.json - N - 848 - 336 - - - - state_recruits_info_flow3_new - - WRITE_TO_FILE - - N - { - "status": "NEW", - "pipeline": "recruits_info_flow3" -} - N - UTF-8 - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow3.json - N - 848 - 496 - - - - state_recruits_info_flow4_new - - WRITE_TO_FILE - - N - { - "status": "NEW", - "pipeline": "recruits_info_flow4" -} - N - UTF-8 - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow4.json - N - 848 - 576 - - - - state_recruits_info_flow5_new - - WRITE_TO_FILE - - N - { - "status": "NEW", - "pipeline": "recruits_info_flow5" -} - N - UTF-8 - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_recruits_info_flow5.json - N - 848 - 656 - - - - Success - - SUCCESS - - N - 1120 - 496 - - - - Delete file state_job_recruits_info - - DELETE_FILE - - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/state_job_recruits_info.json - N - 848 - 256 - - - - - - Start - state_recruits_info_flow3_new - Y - Y - Y - - - Start - state_recruits_info_flow2_new - Y - Y - Y - - - Start - state_recruits_info_flow1_new - Y - Y - Y - - - Start - state_recruits_info_flow4_new - Y - Y - Y - - - Start - state_recruits_info_flow5_new - Y - Y - Y - - - state_recruits_info_flow5_new - Success - Y - Y - N - - - state_recruits_info_flow4_new - Success - Y - Y - N - - - state_recruits_info_flow3_new - Success - Y - Y - N - - - state_recruits_info_flow2_new - Success - Y - Y - N - - - state_recruits_info_flow1_new - Success - Y - Y - N - - - Start - Delete file state_job_recruits_info - Y - Y - Y - - - Delete file state_job_recruits_info - Success - Y - Y - N - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf b/mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf deleted file mode 100644 index c9b5aec..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/job_recruits_info.hwf +++ /dev/null @@ -1,2776 +0,0 @@ - - - job_recruits_info - Y - - - - 0 - - - 2025/05/21 13:39:54.614 - - - 2025/05/21 13:39:54.614 - - - CR_DATE - - - - - M_R_CR_DATE - 3001-01-01 00:00:00 - - - - M_R_UP_DATE - - - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 208 - 1232 - - - - recruitment_rows_five_flow.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl - Basic - - - CR_DATE - CREATE_DATE - - Y - - N - local - N - N - Y - Y - 2128 - 1216 - - - - recruits_info_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2592 - 880 - - - - recruits_info_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2592 - 1040 - - - - recruits_info_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2592 - 1216 - - - - recruits_info_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2592 - 1392 - - - - recruits_info_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2592 - 1568 - - - - recruits_info_param_create_date.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl - Basic - - Y - - N - local - N - N - Y - N - 1888 - 1296 - - - - recruits_info_param_create_date.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl - Basic - - Y - - N - local - N - N - Y - N - 2128 - 1616 - - - - recruitment_rows_five_flow_if_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2144 - 2064 - - - - job_check_files_recruits_info.hwf - - WORKFLOW - - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_check_files_recruits_info.hwf - Nothing - - Y - - N - local - N - N - Y - N - 1584 - 1520 - - - - job_checkpoints_recruits_info.hwf - - WORKFLOW - - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/job_checkpoints_recruits_info.hwf - Nothing - - Y - - N - local - N - N - Y - N - 1984 - 1728 - - - - Simple recruits_info WHERE SUCCESS - - SIMPLE_EVAL - - SUCCESS - string - true - equal - equal - N - variable - STATUS - N - 1392 - 2400 - - - - branching_recruits_info.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl - Basic - - Y - - N - local - N - N - Y - N - 1248 - 1728 - - - - Simple recruits_info WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1472 - 1728 - - - - Simple recruits_info WHERE DELTA - - SIMPLE_EVAL - - DELTA - string - true - equal - equal - N - variable - STATUS - N - 1520 - 3360 - - - - delta_recruits_info_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2544 - 2608 - - - - checkpoint_job_recruits_info.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl - Basic - - Y - - N - local - N - N - Y - N - 1008 - 1728 - - - - Abort workflow - - ABORT - - N - N - 2144 - 1008 - - - - Abort workflow 2 - - ABORT - - N - N - 1984 - 2176 - - - - Simple job_recruits_info check NEW - - SIMPLE_EVAL - - NEW - string - true - equal - equal - N - variable - STATUS - N - 736 - 1232 - - - - check_if_job_recruits_info_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/check_if_job_recruits_info_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 464 - 1232 - - - - change_status_to_processing.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2288 - 1488 - - - - change_status_recruits_info_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 880 - - - - change_status_recruits_info_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 960 - - - - change_status_recruits_info_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1040 - - - - change_status_recruits_info_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1120 - - - - change_status_recruits_info_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1216 - - - - change_status_recruits_info_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1296 - - - - change_status_recruits_info_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1392 - - - - change_status_recruits_info_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1472 - - - - change_status_recruits_info_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1568 - - - - change_status_recruits_info_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1648 - - - - checkpoint_job_recruits_info.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl - Basic - - Y - - N - local - N - N - Y - N - 3312 - 1248 - - - - Success new citizen - - SUCCESS - - N - 3552 - 1248 - - - - recruits_info_flow1.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2592 - 1728 - - - - recruits_info_flow2.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2592 - 1888 - - - - recruits_info_flow3.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2592 - 2064 - - - - recruits_info_flow4.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2592 - 2240 - - - - recruits_info_flow5.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2592 - 2416 - - - - change_status_recruits_info_flow1_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1728 - - - - change_status_recruits_info_flow1_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1808 - - - - change_status_recruits_info_flow2_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1888 - - - - change_status_recruits_info_flow2_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 1968 - - - - change_status_recruits_info_flow3_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2064 - - - - change_status_recruits_info_flow3_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2144 - - - - change_status_recruits_info_flow4_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2240 - - - - change_status_recruits_info_flow4_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2320 - - - - change_status_recruits_info_flow5_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2416 - - - - change_status_recruits_info_flow5_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_recruits_info_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2496 - - - - checkpoint_job_recruits_info.hpl (2) 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info.hpl - Basic - - Y - - N - local - N - N - Y - N - 3312 - 2096 - - - - recruits_info success after error - - SUCCESS - - N - 3552 - 2096 - - - - change_status_to_processing.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2288 - 2320 - - - - change_status_to_processing_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_to_processing_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 2256 - 3200 - - - - change_status_delta_recruits_info_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2608 - - - - change_status_delta_recruits_info_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2688 - - - - recruitment_rows_five_flow.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow.hpl - Basic - - - CR_DATE - CREATE_DATE - - Y - - N - local - N - N - Y - Y - 2128 - 2944 - - - - Abort workflow 2 2 - - ABORT - - N - N - 2096 - 3120 - - - - delta_recruits_info_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2544 - 2768 - - - - change_status_delta_recruits_info_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2768 - - - - change_status_delta_recruits_info_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2848 - - - - delta_recruits_info_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2544 - 2944 - - - - change_status_delta_recruits_info_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 2944 - - - - change_status_delta_recruits_info_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 3024 - - - - delta_recruits_info_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2544 - 3104 - - - - change_status_delta_recruits_info_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 3104 - - - - change_status_delta_recruits_info_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 3184 - - - - delta_recruits_info_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2544 - 3280 - - - - change_status_delta_recruits_info_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 3280 - - - - change_status_delta_recruits_info_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/change_status_delta_recruits_info_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2880 - 3360 - - - - checkpoint_job_recruits_info_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/checkpoints/checkpoint_job_recruits_info_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 3312 - 2944 - - - - recruits_info_delta success - - SUCCESS - - N - 3552 - 2944 - - - - branching_recruits_info_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/branching_recruits_info_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1552 - 2944 - - - - Simple delta_recruits_info WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1824 - 2944 - - - - delta_recruits_info success - - SUCCESS - - N - 2000 - 2768 - - - - - - recruits_info_param_create_date.hpl - recruitment_rows_five_flow.hpl - N - Y - Y - - - recruitment_rows_five_flow.hpl - recruits_info_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl - recruits_info_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl - recruits_info_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl - recruits_info_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl - recruits_info_flow5.hpl - Y - Y - N - - - recruits_info_param_create_date.hpl (2) - recruitment_rows_five_flow_if_error.hpl - N - Y - N - - - job_check_files_recruits_info.hwf - recruits_info_param_create_date.hpl - N - Y - N - - - job_check_files_recruits_info.hwf - job_checkpoints_recruits_info.hwf - N - N - N - - - job_checkpoints_recruits_info.hwf - recruits_info_param_create_date.hpl (2) - N - Y - Y - - - job_checkpoints_recruits_info.hwf - recruitment_rows_five_flow_if_error.hpl - N - Y - N - - - job_check_files_recruits_info.hwf - recruitment_rows_five_flow.hpl - N - Y - N - - - branching_recruits_info.hpl - Simple recruits_info WHERE SUCCESS - Y - Y - Y - - - branching_recruits_info.hpl - Simple recruits_info WHERE ERROR - Y - N - Y - - - Start - job_check_files_recruits_info.hwf - N - Y - Y - - - recruitment_rows_five_flow.hpl - Abort workflow - Y - N - N - - - recruitment_rows_five_flow_if_error.hpl - Abort workflow 2 - Y - N - N - - - Start - check_if_job_recruits_info_exists.hpl - Y - Y - Y - - - check_if_job_recruits_info_exists.hpl - Simple job_recruits_info check NEW - Y - Y - N - - - recruits_info_flow1.hpl - change_status_recruits_info_flow1_success.hpl - Y - Y - N - - - recruits_info_flow1.hpl - change_status_recruits_info_flow1_error.hpl - Y - N - N - - - recruits_info_flow2.hpl - change_status_recruits_info_flow2_success.hpl - Y - Y - N - - - recruits_info_flow2.hpl - change_status_recruits_info_flow2_error.hpl - Y - N - N - - - recruits_info_flow3.hpl - change_status_recruits_info_flow3_success.hpl - Y - Y - N - - - recruits_info_flow3.hpl - change_status_recruits_info_flow3_error.hpl - Y - N - N - - - recruits_info_flow4.hpl - change_status_recruits_info_flow4_success.hpl - Y - Y - N - - - recruits_info_flow4.hpl - change_status_recruits_info_flow4_error.hpl - Y - N - N - - - recruits_info_flow5.hpl - change_status_recruits_info_flow5_success.hpl - Y - Y - N - - - recruits_info_flow5.hpl - change_status_recruits_info_flow5_error.hpl - Y - N - N - - - change_status_recruits_info_flow1_success.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow1_error.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow2_success.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow2_error.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - checkpoint_job_recruits_info.hpl (2) - Success new citizen - Y - Y - N - - - change_status_recruits_info_flow3_success.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow3_error.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow4_success.hpl - checkpoint_job_recruits_info.hpl (2) - Y - Y - Y - - - change_status_recruits_info_flow4_error.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow5_success.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - change_status_recruits_info_flow5_error.hpl - checkpoint_job_recruits_info.hpl (2) - Y - N - Y - - - recruits_info_flow1.hpl 2 - change_status_recruits_info_flow1_success.hpl 2 - Y - Y - N - - - recruits_info_flow1.hpl 2 - change_status_recruits_info_flow1_error.hpl 2 - Y - N - N - - - recruits_info_flow2.hpl 2 - change_status_recruits_info_flow2_success.hpl 2 - Y - Y - N - - - recruits_info_flow2.hpl 2 - change_status_recruits_info_flow2_error.hpl 2 - Y - N - N - - - recruits_info_flow3.hpl 2 - change_status_recruits_info_flow3_success.hpl 2 - Y - Y - N - - - recruits_info_flow3.hpl 2 - change_status_recruits_info_flow3_error.hpl 2 - Y - N - N - - - recruits_info_flow4.hpl 2 - change_status_recruits_info_flow4_success.hpl 2 - Y - Y - N - - - recruits_info_flow4.hpl 2 - change_status_recruits_info_flow4_error.hpl 2 - Y - N - N - - - recruits_info_flow5.hpl 2 - change_status_recruits_info_flow5_success.hpl 2 - Y - Y - N - - - recruits_info_flow5.hpl 2 - change_status_recruits_info_flow5_error.hpl 2 - Y - N - N - - - change_status_recruits_info_flow1_success.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow1_error.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow2_success.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow2_error.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow3_success.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow3_error.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow4_success.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - Y - Y - - - change_status_recruits_info_flow4_error.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow5_success.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - change_status_recruits_info_flow5_error.hpl 2 - checkpoint_job_recruits_info.hpl (2) 2 - Y - N - Y - - - checkpoint_job_recruits_info.hpl (2) 2 - recruits_info success after error - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - recruits_info_flow3.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - recruits_info_flow2.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - recruits_info_flow1.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - recruits_info_flow4.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - recruits_info_flow5.hpl 2 - Y - Y - N - - - Simple job_recruits_info check NEW - checkpoint_job_recruits_info.hpl - Y - N - N - - - checkpoint_job_recruits_info.hpl - branching_recruits_info.hpl - Y - N - Y - - - delta_recruits_info_flow1.hpl - change_status_delta_recruits_info_flow1_success.hpl - Y - Y - N - - - delta_recruits_info_flow1.hpl - change_status_delta_recruits_info_flow1_error.hpl - Y - N - N - - - Simple recruits_info WHERE ERROR - job_checkpoints_recruits_info.hwf - N - Y - N - - - recruitment_rows_five_flow_if_error.hpl - change_status_to_processing.hpl 2 - Y - Y - N - - - Simple job_recruits_info check NEW - recruitment_rows_five_flow.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl - change_status_to_processing.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl 2 - delta_recruits_info_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl 2 - change_status_to_processing_delta.hpl - Y - N - Y - - - recruitment_rows_five_flow.hpl 2 - Abort workflow 2 2 - Y - N - N - - - delta_recruits_info_flow2.hpl - change_status_delta_recruits_info_flow2_success.hpl - Y - Y - N - - - delta_recruits_info_flow2.hpl - change_status_delta_recruits_info_flow2_error.hpl - Y - N - N - - - delta_recruits_info_flow3.hpl - change_status_delta_recruits_info_flow3_success.hpl - Y - Y - N - - - delta_recruits_info_flow3.hpl - change_status_delta_recruits_info_flow3_error.hpl - Y - N - N - - - delta_recruits_info_flow4.hpl - change_status_delta_recruits_info_flow4_success.hpl - Y - Y - N - - - delta_recruits_info_flow4.hpl - change_status_delta_recruits_info_flow4_error.hpl - Y - N - N - - - delta_recruits_info_flow5.hpl - change_status_delta_recruits_info_flow5_success.hpl - Y - Y - N - - - delta_recruits_info_flow5.hpl - change_status_delta_recruits_info_flow5_error.hpl - Y - N - N - - - recruitment_rows_five_flow.hpl 2 - delta_recruits_info_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl 2 - delta_recruits_info_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl 2 - delta_recruits_info_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow.hpl 2 - delta_recruits_info_flow5.hpl - Y - Y - N - - - change_status_delta_recruits_info_flow1_success.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow1_error.hpl - checkpoint_job_recruits_info_delta.hpl - Y - Y - Y - - - change_status_delta_recruits_info_flow2_success.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow2_error.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow3_success.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow3_error.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow4_success.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow4_error.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow5_success.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - change_status_delta_recruits_info_flow5_error.hpl - checkpoint_job_recruits_info_delta.hpl - Y - N - Y - - - checkpoint_job_recruits_info_delta.hpl - recruits_info_delta success - Y - Y - N - - - Simple recruits_info WHERE SUCCESS - branching_recruits_info_delta.hpl - Y - Y - N - - - branching_recruits_info_delta.hpl - Simple delta_recruits_info WHERE ERROR - Y - Y - Y - - - Simple delta_recruits_info WHERE ERROR - recruitment_rows_five_flow.hpl 2 - Y - Y - N - - - Simple delta_recruits_info WHERE ERROR - delta_recruits_info success - Y - N - N - - - Simple recruits_info WHERE ERROR - recruitment_rows_five_flow_if_error.hpl - Y - Y - N - - - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 74 - 1744 - 1792 - тут ищем последний idm_id военкомата упавший -в любом из потоков и записываем в таблицу -public.etl_checkpoints в формате: -наименование пайплайна, id военкомата, текущая дата/время, статус, дата создания военкомата - 546 - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 26 - 2016 - 1152 - лимиты - 54 - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 26 - 2128 - 2128 - лимиты - 54 - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 26 - 2160 - 384 - тут в json файы записываем DELTA - 200 - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 42 - 384 - 1168 - если нет этого файла, значит данные еще не загружались -state_job_recruits_info.json - 331 - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 72 - 800 - 928 - 0001-01-01 00:00:00 - -3001-01-01 00:00:00 - - 114 - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl deleted file mode 100644 index 18c37c6..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow1.hpl +++ /dev/null @@ -1,151 +0,0 @@ - - - - delta_recruits_info_flow1 - Y - - - - Normal - 0 - - - M_R_CR_DATE - - - - - M_R_UP_DATE - - - - - N - 1000 - 100 - - - 2025/05/29 17:05:14.836 - - - 2025/05/29 17:05:14.836 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - info - info - Y - -
- N - - - 848 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - r.system_update_date >= '${M_R_UP_DATE}'::timestamp - '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - Y - - - 432 - 368 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl deleted file mode 100644 index 56fd955..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow2.hpl +++ /dev/null @@ -1,151 +0,0 @@ - - - - delta_recruits_info_flow2 - Y - - - - Normal - 0 - - - M_R_CR_DATE - - - - - M_R_UP_DATE - - - - - N - 1000 - 100 - - - 2025/05/29 17:05:14.836 - - - 2025/05/29 17:05:14.836 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - info - info - Y - -
- N - - - 848 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - r.system_update_date >= '${M_R_UP_DATE}'::timestamp - '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F2}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - Y - - - 432 - 368 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl deleted file mode 100644 index a9d4a9e..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow3.hpl +++ /dev/null @@ -1,151 +0,0 @@ - - - - delta_recruits_info_flow3 - Y - - - - Normal - 0 - - - M_R_CR_DATE - - - - - M_R_UP_DATE - - - - - N - 1000 - 100 - - - 2025/05/29 17:05:14.836 - - - 2025/05/29 17:05:14.836 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - info - info - Y - -
- N - - - 848 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - r.system_update_date >= '${M_R_UP_DATE}'::timestamp - '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F3}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - Y - - - 432 - 368 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl deleted file mode 100644 index 39dc059..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow4.hpl +++ /dev/null @@ -1,151 +0,0 @@ - - - - delta_recruits_info_flow4 - Y - - - - Normal - 0 - - - M_R_CR_DATE - - - - - M_R_UP_DATE - - - - - N - 1000 - 100 - - - 2025/05/29 17:05:14.836 - - - 2025/05/29 17:05:14.836 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - info - info - Y - -
- N - - - 848 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - r.system_update_date >= '${M_R_UP_DATE}'::timestamp - '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F4}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - Y - - - 432 - 368 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl deleted file mode 100644 index 3bfe18d..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/delta_recruits_info_flow5.hpl +++ /dev/null @@ -1,151 +0,0 @@ - - - - delta_recruits_info_flow5 - Y - - - - Normal - 0 - - - M_R_CR_DATE - - - - - M_R_UP_DATE - - - - - N - 1000 - 100 - - - 2025/05/29 17:05:14.836 - - - 2025/05/29 17:05:14.836 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - info - info - Y - -
- N - - - 848 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - r.system_update_date >= '${M_R_UP_DATE}'::timestamp - '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F5}' - AND '${M_R_CR_DATE}'::timestamp >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - Y - - - 432 - 368 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl deleted file mode 100644 index 068d2c1..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow2.hpl +++ /dev/null @@ -1,141 +0,0 @@ - - - - recruits_info_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - info - info - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - -
- N - - - 896 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name--, - --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F2}' - AND '${M_R_CR_DATE}' >= r.system_create_date ---AND '${CR_DATE}' < ri.created_at ---order by ri.created_at asc - Y - - - 352 - 288 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl deleted file mode 100644 index 78ca857..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow3.hpl +++ /dev/null @@ -1,141 +0,0 @@ - - - - recruits_info_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - info - info - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - -
- N - - - 896 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name--, - --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F3}' - AND '${M_R_CR_DATE}' >= r.system_create_date ---AND '${CR_DATE}' < ri.created_at ---order by ri.created_at asc - Y - - - 352 - 288 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl deleted file mode 100644 index 1201625..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow4.hpl +++ /dev/null @@ -1,141 +0,0 @@ - - - - recruits_info_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - info - info - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - -
- N - - - 896 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name--, - --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F4}' - AND '${M_R_CR_DATE}' >= r.system_create_date ---AND '${CR_DATE}' < ri.created_at ---order by ri.created_at asc - Y - - - 352 - 288 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl b/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl deleted file mode 100644 index 332bc6e..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow5.hpl +++ /dev/null @@ -1,141 +0,0 @@ - - - - recruits_info_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - ervu_dashboard - recruits_info
- - recruit_id - recruit_id - N - - - created_at - created_at - Y - - - updated_at - updated_at - Y - - - info - info - Y - - - gir_import_data_version_id - gir_import_data_version_id - Y - - - current_recruitment_id - current_recruitment_id - Y - - - target_recruitment_id - target_recruitment_id - Y - - - full_name - full_name - Y - -
- N - - - 896 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu_person_registry - N - 0 - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name--, - --'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id,target_recruitment_id) = '${ID_F5}' - AND '${M_R_CR_DATE}' >= r.system_create_date ---AND '${CR_DATE}' < ri.created_at ---order by ri.created_at asc - Y - - - 352 - 288 - - - - - -
diff --git a/mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl deleted file mode 100644 index 4501519..0000000 --- a/mappings/info_recruits/raw_data/info_recruits/recruitment_rows_five_flow_if_error.hpl +++ /dev/null @@ -1,185 +0,0 @@ - - - - recruitment_rows_five_flow_if_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/23 14:28:22.572 - - - 2025/05/23 14:28:22.572 - - - - - - Table input - Copy rows to result - Y - - - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 880 - 288 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -fr_check AS ( - SELECT - last_recruitment_id AS recruitment_id, - recruitment_created_date, - status, - job_name - FROM public.etl_checkpoints - WHERE status = 'ERROR' AND job_name IN ('recruits_info_flow1', 'recruits_info_flow2', 'recruits_info_flow3', 'recruits_info_flow4', 'recruits_info_flow5') -), -ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, - ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position - FROM ordered -), -pivoted AS ( - SELECT - position, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow1') THEN created_at END) AS cr_flow1, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow1') THEN idm_id::text END) AS idm_flow1, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow2') THEN created_at END) AS cr_flow2, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow2') THEN idm_id::text END) AS idm_flow2, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow3') THEN created_at END) AS cr_flow3, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow3') THEN idm_id::text END) AS idm_flow3, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow4') THEN created_at END) AS cr_flow4, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow4') THEN idm_id::text END) AS idm_flow4, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow5') THEN created_at END) AS cr_flow5, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'recruits_info_flow5') THEN idm_id::text END) AS idm_flow5 - FROM splitted - GROUP BY position -), -remains as ( - SELECT - position, - cr_flow1, - idm_flow1::uuid, - cr_flow2, - idm_flow2::uuid, - cr_flow3, - idm_flow3::uuid, - cr_flow4, - idm_flow4::uuid, - cr_flow5, - idm_flow5::uuid - FROM pivoted - WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) - OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) - OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) - OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) - OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) - order by position -), -idm1 as ( - select - cr_flow1, - idm_flow1 - from remains - where cr_flow1 is not null and idm_flow1 is not null -), -idm2 as ( - select - cr_flow2, - idm_flow2 - from remains - where cr_flow2 is not null and idm_flow2 is not null -), -idm3 as ( - select - cr_flow3, - idm_flow3 - from remains - where cr_flow3 is not null and idm_flow3 is not null -), -idm4 as ( - select - cr_flow4, - idm_flow4 - from remains - where cr_flow4 is not null and idm_flow4 is not null -), -idm5 as ( - select - cr_flow5, - idm_flow5 - from remains - where cr_flow5 is not null and idm_flow5 is not null -) -select - i1.*, - i2.*, - i3.*, - i4.*, - i5.* -FROM - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn -ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) -limit 2 - N - - - 512 - 288 - - - - - - diff --git a/mappings/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl b/mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl similarity index 60% rename from mappings/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl rename to mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl index ec0d770..406fb97 100644 --- a/mappings/info_recruits/raw_data/info_recruits/recruits_info_param_create_date.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl @@ -1,54 +1,31 @@ - recruits_info_param_create_date + check_if_need_to_repeat_job Y Normal - 0 N 1000 100 - - 2025/05/22 14:04:44.129 + 2025/08/08 12:27:51.630 - - 2025/05/22 14:04:44.129 + 2025/08/08 12:27:51.630 Table input - Copy rows to result - Y - - - Copy rows to result Set variables Y - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 848 - 288 - - Set variables SetVariable @@ -62,16 +39,15 @@ - - create_date - CR_DATE - PARENT_WORKFLOW + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW Y - 1088 + 624 288 @@ -89,19 +65,18 @@ ervu-dashboard N 0 - SELECT -/* - CASE - WHEN count(*)>0 THEN max(created_at)::timestamp - ELSE '0001-01-01 00:00:00'::timestamp - END AS CREATE_DATE -*/ -'0001-01-01 00:00:00'::timestamp AS CREATE_DATE -FROM ervu_person_registry_raw.recruits_info + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'recruits_info_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; N - 576 + 336 288 diff --git a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl b/mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl similarity index 71% rename from mappings/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl rename to mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl index 99dbf12..566d553 100644 --- a/mappings/info_recruits/raw_data/info_recruits/branching_recruits_info.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl @@ -1,7 +1,7 @@ - branching_recruits_info + check_if_recruits_info_job_exists Y @@ -13,26 +13,26 @@ 1000 100 - - 2025/05/29 10:09:35.340 + 2025/08/05 13:28:46.661 - - 2025/05/29 10:09:35.340 + 2025/08/05 13:28:46.661 - Table input - Set variables 2 - Y - - - Set variables 2 + Set variables Write to log N + + Table input + Set variables + Y + - Set variables 2 + Set variables SetVariable Y @@ -44,21 +44,16 @@ - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW Y - 736 - 192 + 672 + 336 @@ -75,16 +70,17 @@ ervu-dashboard N 0 - select - status as STATUS, - job_name AS PIPELINE -from public.etl_checkpoints -where job_name = 'job_recruits_info' + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'recruits_info_job' + limit 1 + ) AS job_executed_flag; N - 496 - 192 + 384 + 336 @@ -100,22 +96,15 @@ where job_name = 'job_recruits_info' Y - - pipeline - - - status - - + N 0 Basic - ${PIPE} -${STATUS} + ${STATUS} 944 - 336 + 224 diff --git a/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl b/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl new file mode 100644 index 0000000..9bf2453 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/delta_recruits_info.hpl @@ -0,0 +1,27 @@ + + + + delta_recruits_info + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:02.780 + - + 2025/08/05 12:54:02.780 + + + + + + + + + diff --git a/mappings/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf b/mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf similarity index 93% rename from mappings/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf rename to mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf index fe4c912..317a0d9 100644 --- a/mappings/info_recruits/raw_data/info_recruits/job_recruit_last_update_date.hwf +++ b/mappings/info_recruits/raw_data/recruits_info/job_recruit_last_update_date.hwf @@ -41,9 +41,7 @@ N N N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl - - + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl Basic Y @@ -69,7 +67,9 @@ N N N - ${PROJECT_HOME}/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl + + Basic Y diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl new file mode 100644 index 0000000..9c60ae5 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl @@ -0,0 +1,271 @@ + + + + recruits_info_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Table input + Table output + Y + + + Table output + Change job status on success + Y + + + Create job execution record + Table input + Y + + + Table output + Change job status on error + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 992 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 992 + 320 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + info + info + + + gir_import_data_version_id + gir_import_data_version_id + + + current_recruitment_id + current_recruitment_id + + + target_recruitment_id + target_recruitment_id + + + full_name + full_name + + + addresses + addresses + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + recruits_info
+ + N + Y + N + Y + + + 720 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl similarity index 56% rename from mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl rename to mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl index 71a7b98..4475ed7 100644 --- a/mappings/info_recruits/raw_data/info_recruits/parallel/recruits_info_flow1.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl @@ -1,35 +1,29 @@ - recruits_info_flow1 + recruits_info_flow_delta Y Normal - 0 N 1000 100 - - 2025/05/21 14:05:02.260 + 2025/08/11 13:22:56.048 - - 2025/05/21 14:05:02.260 + 2025/08/11 13:22:56.048 - Table input - Select values 4 2 - N - - - Select values 4 2 - Insert / update - N + Create job execution record + Table input + Y Table input @@ -37,14 +31,19 @@ Y - Select values 4 2 - Get variables - N + Insert / update + Change job status on success + Y + + + Insert / update + Change job status on error + Y - Get variables - GetVariable + Change job status on error + ExecSql Y @@ -53,20 +52,100 @@ none - - - -1 - recruitment_id - -1 - none - String - ID_F1 - - + + + error_description + + + error_code + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ?, + error_code = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + - 976 - 400 + 1040 + 416 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 224 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 @@ -131,49 +210,17 @@ full_name Y + + addresses + addresses + Y + N - 992 - 288 - - - - Select values 4 2 - SelectValues - - Y - - 1 - - none - - - - N - - ID_F1 - ID_F1 - String - -2 - -2 - - false - - - false - - - - - - - - - - 720 - 400 + 784 + 224 @@ -189,7 +236,6 @@ ervu_person_registry N - 0 SELECT r.system_create_date AS created_at, r.system_update_date AS updated_at, @@ -198,26 +244,30 @@ ri.gir_import_data_version_id, r.current_recruitment_id, r.target_recruitment_id, - r.full_name + r.full_name, + r.addresses FROM recruits_info ri JOIN recruits r ON r.id = ri.recruit_id WHERE - '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id::text, target_recruitment_id::text) = '${ID_F1}' + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' AND '${M_R_CR_DATE}' >= r.system_create_date + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} Y - 448 - 288 + 544 + 224 - Select values 4 2 - Get variables + Insert / update + Change job status on error Y diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl new file mode 100644 index 0000000..fe599e2 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl @@ -0,0 +1,291 @@ + + + + recruits_info_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Table output + Y + + + Table output + Change job status on success + Y + + + Table output + Change job status on error + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + error_code + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 976 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 976 + 208 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + error_code, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL; + + + 272 + 208 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 480 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + info + info + + + gir_import_data_version_id + gir_import_data_version_id + + + current_recruitment_id + current_recruitment_id + + + target_recruitment_id + target_recruitment_id + + + full_name + full_name + + + addresses + addresses + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + recruits_info
+ + N + Y + N + Y + + + 736 + 208 + +
+ + + Table output + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl b/mappings/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl similarity index 100% rename from mappings/info_recruits/raw_data/info_recruits/recruit_update_date_ervu_dashboard.hpl rename to mappings/info_recruits/raw_data/recruits_info/recruit_update_date_ervu_dashboard.hpl diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..a839742 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + recruits_info_flow_delta.hpl + Y + + + Table input + recruits_info_flow_delta.hpl 2 + Y + + + Table input + recruits_info_flow_delta.hpl 3 + Y + + + Table input + recruits_info_flow_delta.hpl 4 + Y + + + Table input + recruits_info_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'recruits_info_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + recruits_info_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 128 + + + + recruits_info_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 208 + + + + recruits_info_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 288 + + + + recruits_info_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 368 + + + + recruits_info_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 448 + + + + + + diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..21c9f3d --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + recruits_info_flow_repeat.hpl + Y + + + Table input + recruits_info_flow_repeat.hpl 2 + Y + + + Table input + recruits_info_flow_repeat.hpl 3 + Y + + + Table input + recruits_info_flow_repeat.hpl 4 + Y + + + Table input + recruits_info_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'recruits_info_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + recruits_info_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 208 + + + + recruits_info_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 288 + + + + recruits_info_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 368 + + + + recruits_info_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 448 + + + + recruits_info_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 464 + 528 + + + + + + diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl new file mode 100644 index 0000000..7826784 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + recruits_info_flow.hpl + Y + + + Get all recruitments ordered by created_date + recruits_info_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + recruits_info_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + recruits_info_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + recruits_info_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 432 + 304 + + + + recruits_info_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 144 + + + + recruits_info_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 224 + + + + recruits_info_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 304 + + + + recruits_info_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 384 + + + + recruits_info_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + recruits_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 464 + + + + + + diff --git a/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf new file mode 100644 index 0000000..d67afe8 --- /dev/null +++ b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf @@ -0,0 +1,353 @@ + + + recruits_info_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_recruits_info_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/checkpoints/check_if_recruits_info_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + recruits_info_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_recruits_info_job_exists.hpl + Y + Y + Y + + + check_if_recruits_info_job_exists.hpl + recruits_info_job_exists_check + Y + Y + N + + + recruits_info_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + recruits_info_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + recruits_info_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl b/mappings/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl similarity index 100% rename from mappings/info_recruits/raw_data/info_recruits/row_last_recruit_update_date.hpl rename to mappings/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl From 85cb3819e664ff10eb67ec17327438fd11bb7b0a Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Thu, 14 Aug 2025 13:27:15 +0300 Subject: [PATCH 04/21] fix --- .../citizen_tables/citizen/citizen_job.hwf | 5 + .../citizen/parallel/citizen_flow.hpl | 52 ++- .../citizen/parallel/job_citizen_flow.hwf | 142 ++++++++ .../citizen/recruitments_five_flow.hpl | 337 +++++++++++++++++- .../job_parallel_recruits_info_citizen.hwf | 6 +- .../parallel/recruits_info_flow.hpl | 69 +++- 6 files changed, 569 insertions(+), 42 deletions(-) create mode 100644 mappings/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf diff --git a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf index 945c14f..9048856 100644 --- a/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf +++ b/mappings/info_recruits/citizen_tables/citizen/citizen_job.hwf @@ -11,6 +11,11 @@ - 2025/08/05 12:45:28.561 + + COMMENT + + + LIMIT_FW ; diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl index b30d1c2..80cdd00 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl @@ -25,22 +25,51 @@ Table output Y
- - Table output - Change job status on success - Y - Create job execution record Table input Y + + Table output + Block until transforms finish + N + Table output Change job status on error Y + + Block until transforms finish + Change job status on success + N + + + Table output + Change job status on success + N + + + Block until transforms finish + BlockUntilTransformsFinish + + Y + + 1 + + none + + + + + + + 944 + 160 + + Change job status on error ExecSql @@ -58,8 +87,11 @@ ervu-dashboard + Y + N + Y Y N @@ -70,10 +102,11 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; + - 992 - 512 + 944 + 448 @@ -103,7 +136,7 @@ and recruitment_id = '${IDM_ID}'; - 992 + 1200 320 @@ -355,14 +388,11 @@ ${LIMIT_FW} N N N - Y - N ervu_dashboard Y citizen
- N Y N diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf b/mappings/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf new file mode 100644 index 0000000..1febb31 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf @@ -0,0 +1,142 @@ + + + job_citizen_flow + Y + + + + 0 + - + 2025/08/14 11:18:41.368 + - + 2025/08/14 11:18:41.368 + + + IDM_ID + + + + + JOB_NAME + + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 368 + 304 + + + + citizen_flow.hpl + + PIPELINE + + N + N + N + N + N + Y + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl + Basic + + + IDM_ID + recruitment + + + JOB_NAME + citizen_job + + Y + + N + local + N + N + Y + N + 624 + 304 + + + + Change job status on success + + SQL + + ervu-dashboard + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + N + Y + N + 896 + 304 + + + + Change job status on error + + SQL + + ervu-dashboard + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + N + N + N + 896 + 416 + + + + + + citizen_flow.hpl + Change job status on success + Y + Y + N + + + citizen_flow.hpl + Change job status on error + N + N + N + + + Start + citizen_flow.hpl + Y + Y + Y + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl index 78a6ef5..9be90a8 100644 --- a/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl @@ -23,26 +23,51 @@ Get all recruitments ordered by created_date citizen_flow.hpl - Y + N Get all recruitments ordered by created_date citizen_flow.hpl 2 - Y + N Get all recruitments ordered by created_date citizen_flow.hpl 3 - Y + N Get all recruitments ordered by created_date citizen_flow.hpl 4 - Y + N Get all recruitments ordered by created_date citizen_flow.hpl 5 + N + + + Get all recruitments ordered by created_date + job_citizen_flow.hwf + Y + + + Get all recruitments ordered by created_date + job_citizen_flow.hwf 2 + Y + + + Get all recruitments ordered by created_date + job_citizen_flow.hwf 3 + Y + + + Get all recruitments ordered by created_date + job_citizen_flow.hwf 4 + Y + + + Get all recruitments ordered by created_date + job_citizen_flow.hwf 5 Y @@ -62,14 +87,84 @@ 0 SELECT idm_id AS recruitment -FROM ervu_dashboard.recruitment; - N +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y 432 304 + + job_citizen_flow.hwf + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 + 144 + + citizen_flow.hpl PipelineExecutor @@ -122,8 +217,8 @@ FROM ervu_dashboard.recruitment; - 704 - 144 + 736 + 608 @@ -178,8 +273,8 @@ FROM ervu_dashboard.recruitment; - 704 - 224 + 736 + 688 @@ -234,8 +329,8 @@ FROM ervu_dashboard.recruitment; - 704 - 304 + 736 + 768 @@ -290,8 +385,8 @@ FROM ervu_dashboard.recruitment; - 704 - 384 + 736 + 848 @@ -346,7 +441,219 @@ FROM ervu_dashboard.recruitment; - 704 + 736 + 928 + + + + job_citizen_flow.hwf 2 + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 + 224 + + + + job_citizen_flow.hwf 3 + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 + 304 + + + + job_citizen_flow.hwf 4 + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 + 384 + + + + job_citizen_flow.hwf 5 + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 464 diff --git a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf index 5f88431..3c0135a 100644 --- a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf +++ b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf @@ -40,18 +40,14 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/citizen_job.hwf - - Nothing M_R_CR_DATE - ${M_R_CR_DATE} M_R_UP_DATE - ${M_R_UP_DATE} Y @@ -175,7 +171,7 @@ job_recruit_last_update_date.hwf recruits_info_job.hwf - Y + N N Y diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl index 9c60ae5..950dba4 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl @@ -28,7 +28,7 @@ Table output Change job status on success - Y + N Create job execution record @@ -38,6 +38,16 @@ Table output Change job status on error + N + + + Table output + Identify last row in a stream + N + + + Identify last row in a stream + Filter rows Y @@ -58,11 +68,8 @@ ervu-dashboard - Y - N - Y Y N @@ -73,11 +80,10 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 992 - 512 + 1328 + 496 @@ -107,7 +113,7 @@ and recruitment_id = '${IDM_ID}'; - 992 + 1328 320 @@ -235,14 +241,11 @@ ${LIMIT_FW} N N N - Y - N ervu_dashboard Y recruits_info
- N Y N @@ -253,6 +256,50 @@ ${LIMIT_FW} 320
+ + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 880 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + N + - + + + + + 1056 + 208 + + Table output From 48ce1f9ad067771838c9cfb9c1fa64af68ffeafc Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Thu, 14 Aug 2025 13:55:36 +0300 Subject: [PATCH 05/21] / --- .../parallel/recruits_info_flow.hpl | 139 +++++++++++++----- 1 file changed, 103 insertions(+), 36 deletions(-) diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl index 950dba4..c629160 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl @@ -20,16 +20,6 @@ - - Table input - Table output - Y - - - Table output - Change job status on success - N - Create job execution record Table input @@ -38,18 +28,43 @@ Table output Change job status on error - N + Y - Table output + Table input Identify last row in a stream - N + Y Identify last row in a stream + Table output + Y + + + Table output Filter rows Y + + Filter rows + Change job status on success + Y + + + Table output + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + Change job status on error @@ -82,8 +97,8 @@ and recruitment_id = '${IDM_ID}'; - 1328 - 496 + 1024 + 512 @@ -100,8 +115,11 @@ and recruitment_id = '${IDM_ID}'; ervu-dashboard + Y + N + Y N N @@ -111,10 +129,11 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; + - 1328 - 320 + 1632 + 160 @@ -146,6 +165,60 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); 320
+ + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + N + - + + N + -1 + + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 736 + 320 + + Table input TableInput @@ -252,13 +325,13 @@ ${LIMIT_FW} Y - 720 + 1024 320 - Identify last row in a stream - DetectLastRow + Detect empty stream + DetectEmptyStream Y @@ -267,16 +340,15 @@ ${LIMIT_FW} none - result - 880 - 208 + 1632 + 320 - Filter rows - FilterRows + Abort + Abort Y @@ -285,19 +357,14 @@ ${LIMIT_FW} none - - - - - = - N - - - - + ABORT_WITH_ERROR + Y + + 0 - 1056 - 208 + 1376 + 512 From 19ddc6cf7555ee1660bf7d871e710d638f8205c6 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Thu, 14 Aug 2025 14:32:13 +0300 Subject: [PATCH 06/21] ri --- .../job_parallel_recruits_info_citizen.hwf | 4 +- .../parallel/recruits_info_flow.hpl | 104 +++++++++--------- 2 files changed, 52 insertions(+), 56 deletions(-) diff --git a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf index 3c0135a..4db745f 100644 --- a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf +++ b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf @@ -164,14 +164,14 @@ job_recruit_last_update_date.hwf citizen_job.hwf - Y + N Y Y job_recruit_last_update_date.hwf recruits_info_job.hwf - N + Y N Y diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl index c629160..87d8cea 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl @@ -30,16 +30,6 @@ Change job status on error Y - - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - Table output Filter rows @@ -65,7 +55,38 @@ Abort Y + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + + 0 + + + 1376 + 512 + + Change job status on error ExecSql @@ -115,11 +136,8 @@ and recruitment_id = '${IDM_ID}'; ervu-dashboard - Y - N - Y N N @@ -129,7 +147,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 1632 @@ -165,6 +182,23 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); 320 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + Filter rows FilterRows @@ -181,12 +215,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); = + last_row N - N -1 - constant -1 Y @@ -212,7 +246,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - result + last_row 736 @@ -329,44 +363,6 @@ ${LIMIT_FW} 320 - - Detect empty stream - DetectEmptyStream - - Y - - 1 - - none - - - - - 1632 - 320 - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - - 0 - - - 1376 - 512 - - Table output From 2834c3e2a109e170bbb1b3b584c1e02b200855ae Mon Sep 17 00:00:00 2001 From: "adel.kalimullin" Date: Thu, 14 Aug 2025 14:53:17 +0300 Subject: [PATCH 07/21] =?UTF-8?q?ERVU-504:=20=D0=BF=D1=80=D0=B8=D0=B2?= =?UTF-8?q?=D0=B5=D0=BB=20=D0=BF=D0=BE=D0=B4=D0=BA=D0=B0=D1=87=D0=BA=D1=83?= =?UTF-8?q?=20=D0=B2=20citizen=20marital=5Fstatus=20=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=D0=B2=D0=B5=D0=BB=20=D0=B5=D0=B5=20=D0=BA=20=D0=B8=D0=BD?= =?UTF-8?q?=D1=82=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../citizen/parallel/citizen_flow.hpl | 14 +++++++++----- .../citizen/parallel/citizen_flow_delta.hpl | 8 +++++++- .../citizen/parallel/citizen_flow_repeat.hpl | 7 ++++++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl index 80cdd00..7ea9022 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow.hpl @@ -87,11 +87,8 @@ ervu-dashboard - Y - N - Y Y N @@ -102,7 +99,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 944 @@ -182,6 +178,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); ervu_person_registry N + /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -224,7 +221,7 @@ SELECT r.vu_current_info, r.military_registration_date AS date_registration, r.vu_unset_date AS date_deregistration, - --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, @@ -383,16 +380,23 @@ ${LIMIT_FW} id_ern id_ern + + marital_status + marital_status + N N N N + Y + N ervu_dashboard Y citizen
+ N Y N diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl index c504f9f..b95a663 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl @@ -271,6 +271,11 @@ and recruitment_id = '${IDM_ID}'; id_ern Y + + marital_status + marital_status + Y + N @@ -292,6 +297,7 @@ and recruitment_id = '${IDM_ID}'; ervu_person_registry N + /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -334,7 +340,7 @@ SELECT r.vu_current_info, r.military_registration_date AS date_registration, r.vu_unset_date AS date_deregistration, - --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl index fb6a4fa..c61cd51 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl @@ -172,6 +172,7 @@ DO UPDATE SET ervu_person_registry N + /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -214,7 +215,7 @@ SELECT r.vu_current_info, r.military_registration_date AS date_registration, r.vu_unset_date AS date_deregistration, - --ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status, + NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number, --ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series, --ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date, @@ -373,6 +374,10 @@ ${LIMIT_FW} id_ern id_ern + + marital_status + marital_status + N N From 1214865018cd794824d2f9288775852c04864feb Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Fri, 15 Aug 2025 09:29:48 +0300 Subject: [PATCH 08/21] ri fix --- .../recruitment_five_flow_on_error.hpl | 2 +- .../citizen/recruitments_five_flow.hpl | 106 ++++---- .../parallel/recruits_info_flow.hpl | 37 ++- .../parallel/recruits_info_flow_delta.hpl | 140 ++++++++-- .../parallel/recruits_info_flow_repeat.hpl | 239 ++++++++++++++++-- .../recruitment_five_flow_delta.hpl | 2 +- .../recruitment_five_flow_on_error.hpl | 2 +- .../recruits_info/recruitments_five_flow.hpl | 21 +- .../recruits_info/recruits_info_job.hwf | 5 + 9 files changed, 439 insertions(+), 115 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl index ff128c3..4375dcd 100644 --- a/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/recruitment_five_flow_on_error.hpl @@ -63,7 +63,7 @@ SELECT r.idm_id as recruitment_id FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'citizen_job' where je.status is null or je.status in('ERROR', 'PROCESSING'); diff --git a/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl index 9be90a8..bee8f5b 100644 --- a/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/recruitments_five_flow.hpl @@ -112,59 +112,6 @@ ${COMMENT}*/ 304
- - job_citizen_flow.hwf - WorkflowExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf - 1 - - - - - IDM_ID - recruitment - - - - JOB_NAME - - citizen_job - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - 736 - 144 - - citizen_flow.hpl PipelineExecutor @@ -445,6 +392,59 @@ ${COMMENT}*/ 928 + + job_citizen_flow.hwf + WorkflowExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen/parallel/job_citizen_flow.hwf + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + 736 + 144 + + job_citizen_flow.hwf 2 WorkflowExecutor diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl index 87d8cea..18b9556 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow.hpl @@ -25,26 +25,11 @@ Table input Y - - Table output - Change job status on error - Y - - - Table output - Filter rows - Y - Filter rows Change job status on success Y - - Table output - Detect empty stream - Y - Detect empty stream Change job status on success @@ -65,6 +50,21 @@ Table output Y + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + Abort @@ -79,7 +79,6 @@ ABORT_WITH_ERROR Y - 0 @@ -249,7 +248,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 736 + 752 320 @@ -257,7 +256,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Table input TableInput - Y + N 1 @@ -297,7 +296,7 @@ ${LIMIT_FW} Table output TableOutput - Y + N 1 diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl index 4475ed7..ba2390e 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl @@ -27,11 +27,31 @@ Table input + Identify last row in a stream + Y + + + Identify last row in a stream Insert / update Y Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows Change job status on success Y @@ -40,7 +60,32 @@ Change job status on error Y + + Change job status on error + Abort + Y + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + Change job status on error ExecSql @@ -56,9 +101,6 @@ error_description - - error_code - ervu-dashboard @@ -71,8 +113,7 @@ N UPDATE etl.job_execution SET status = 'DELTA_ERROR', - error_description = ?, - error_code = ? + error_description = ? WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; @@ -80,8 +121,8 @@ and recruitment_id = '${IDM_ID}'; - 1040 - 416 + 944 + 400 @@ -111,8 +152,8 @@ and recruitment_id = '${IDM_ID}'; - 1040 - 224 + 1248 + 64 @@ -138,8 +179,7 @@ and recruitment_id = '${IDM_ID}'; SET status = 'DELTA_PROCESSING', execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL + error_description = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; @@ -148,11 +188,82 @@ and recruitment_id = '${IDM_ID}'; 224 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + Insert / update InsertUpdate - Y + N 1 @@ -166,7 +277,6 @@ and recruitment_id = '${IDM_ID}'; = recruit_id recruit_id - ervu_dashboard recruits_info
@@ -219,7 +329,7 @@ and recruitment_id = '${IDM_ID}'; N - 784 + 944 224
@@ -227,7 +337,7 @@ and recruitment_id = '${IDM_ID}'; Table input TableInput - Y + N 1 diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl index fe599e2..a1a0dda 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_repeat.hpl @@ -27,20 +27,65 @@ Table input - Table output + Identify last row in a stream Y - Table output + Filter rows Change job status on success Y - Table output + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update Change job status on error Y + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + Change job status on error ExecSql @@ -56,9 +101,6 @@ error_description - - error_code - ervu-dashboard Y @@ -75,7 +117,7 @@ and recruitment_id = '${IDM_ID}'; - 976 + 960 400 @@ -106,8 +148,8 @@ and recruitment_id = '${IDM_ID}'; - 976 - 208 + 1440 + 48
@@ -135,7 +177,6 @@ and recruitment_id = '${IDM_ID}'; status, execution_datetime, error_description, - error_code, recruitment_id ) VALUES ( @@ -144,15 +185,14 @@ VALUES ( 'PROCESSING', DEFAULT, NULL, - NULL, '${IDM_ID}' ) ON CONFLICT (job_name, recruitment_id) DO UPDATE SET status = 'PROCESSING', execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL; + error_description = NULL + 272 @@ -160,8 +200,8 @@ DO UPDATE SET - Table input - TableInput + Detect empty stream + DetectEmptyStream Y @@ -170,9 +210,153 @@ DO UPDATE SET none + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + addresses + addresses + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + ervu_person_registry N - SELECT r.system_create_date AS created_at, r.system_update_date AS updated_at, @@ -204,7 +388,7 @@ ${LIMIT_FW} Table output TableOutput - Y + N 1 @@ -255,27 +439,24 @@ ${LIMIT_FW} N N N - Y - N ervu_dashboard Y recruits_info
- N Y N Y - 736 - 208 + 816 + 544
- Table output + Insert / update Change job status on error Y @@ -286,6 +467,18 @@ ${LIMIT_FW} + + Table output + Change job status on error + N + + + + + + + + diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl index a839742..5dd9e93 100644 --- a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_delta.hpl @@ -63,7 +63,7 @@ SELECT r.idm_id as recruitment_id FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'recruits_info_job' where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl index 21c9f3d..1f5fdb4 100644 --- a/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/recruitment_five_flow_on_error.hpl @@ -63,7 +63,7 @@ SELECT r.idm_id as recruitment_id FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'recruits_info_job' where je.status is null or je.status in('ERROR', 'PROCESSING'); diff --git a/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl index 7826784..a378bca 100644 --- a/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/recruitments_five_flow.hpl @@ -62,8 +62,25 @@ 0 SELECT idm_id AS recruitment -FROM ervu_dashboard.recruitment; - N +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y 432 diff --git a/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf index d67afe8..650cb43 100644 --- a/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf +++ b/mappings/info_recruits/raw_data/recruits_info/recruits_info_job.hwf @@ -11,6 +11,11 @@ - 2025/08/05 12:45:28.561 + + COMMENT + + + LIMIT_FW ; From aee4854a8cdbda631f252ab7a828370d590eb519 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Mon, 18 Aug 2025 15:17:35 +0300 Subject: [PATCH 09/21] fz53 --- .../citizen/parallel/citizen_flow_delta.hpl | 147 +- .../citizen/parallel/citizen_flow_repeat.hpl | 307 +- ...hing_citizen_appealing_violations_fz53.hpl | 124 - ...itizen_appealing_violations_fz53_delta.hpl | 142 - ...ta.hpl => check_if_need_to_repeat_job.hpl} | 68 +- ..._appealing_violations_fz53_flow1_error.hpl | 250 -- ...ppealing_violations_fz53_flow1_success.hpl | 250 -- ..._appealing_violations_fz53_flow2_error.hpl | 254 -- ...ppealing_violations_fz53_flow2_success.hpl | 254 -- ..._appealing_violations_fz53_flow3_error.hpl | 255 -- ...ppealing_violations_fz53_flow3_success.hpl | 255 -- ..._appealing_violations_fz53_flow4_error.hpl | 256 -- ...ppealing_violations_fz53_flow4_success.hpl | 256 -- ..._appealing_violations_fz53_flow5_error.hpl | 256 -- ...ppealing_violations_fz53_flow5_success.hpl | 256 -- ..._appealing_violations_fz53_flow1_error.hpl | 101 - ...ppealing_violations_fz53_flow1_success.hpl | 101 - ..._appealing_violations_fz53_flow2_error.hpl | 102 - ...ppealing_violations_fz53_flow2_success.hpl | 101 - ..._appealing_violations_fz53_flow3_error.hpl | 101 - ...ppealing_violations_fz53_flow3_success.hpl | 101 - ..._appealing_violations_fz53_flow4_error.hpl | 101 - ...ppealing_violations_fz53_flow4_success.hpl | 101 - ..._appealing_violations_fz53_flow5_error.hpl | 101 - ...ppealing_violations_fz53_flow5_success.hpl | 101 - .../change_status_to_processing.hpl | 142 - ..._appealing_violations_fz53_job_exists.hpl} | 61 +- ...itizen_appealing_violations_fz53_error.hpl | 273 -- ..._job_citizen_appealing_violations_fz53.hpl | 869 ------ ...itizen_appealing_violations_fz53_delta.hpl | 869 ------ .../citizen_appealing_violations_fz53_job.hwf | 362 +++ .../job_citizen_appealing_violations_fz53.hwf | 2478 ---------------- ...citizen_appealing_violations_fz53_flow.hpl | 389 +++ ...itizen_appealing_violations_fz53_flow1.hpl | 161 -- ...itizen_appealing_violations_fz53_flow2.hpl | 158 -- ...itizen_appealing_violations_fz53_flow3.hpl | 158 -- ...itizen_appealing_violations_fz53_flow4.hpl | 158 -- ...itizen_appealing_violations_fz53_flow5.hpl | 158 -- ...n_appealing_violations_fz53_flow_delta.hpl | 402 +++ ..._appealing_violations_fz53_flow_repeat.hpl | 417 +++ ...itizen_appealing_violations_fz53_flow1.hpl | 158 -- ...itizen_appealing_violations_fz53_flow2.hpl | 158 -- ...itizen_appealing_violations_fz53_flow3.hpl | 158 -- ...itizen_appealing_violations_fz53_flow4.hpl | 158 -- ...itizen_appealing_violations_fz53_flow5.hpl | 158 -- .../recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../recruitment_rows_five_flow_if_error.hpl | 185 -- .../recruitments_five_flow.hpl | 373 +++ ...nching_citizen_criminal_liability_fz53.hpl | 124 - ..._citizen_criminal_liability_fz53_delta.hpl | 142 - .../check_if_need_to_repeat_job.hpl} | 68 +- ...en_criminal_liability_fz53_flow1_error.hpl | 250 -- ..._criminal_liability_fz53_flow1_success.hpl | 250 -- ...en_criminal_liability_fz53_flow2_error.hpl | 254 -- ..._criminal_liability_fz53_flow2_success.hpl | 254 -- ...en_criminal_liability_fz53_flow3_error.hpl | 255 -- ..._criminal_liability_fz53_flow3_success.hpl | 255 -- ...en_criminal_liability_fz53_flow4_error.hpl | 256 -- ..._criminal_liability_fz53_flow4_success.hpl | 256 -- ...en_criminal_liability_fz53_flow5_error.hpl | 256 -- ..._criminal_liability_fz53_flow5_success.hpl | 256 -- ...en_criminal_liability_fz53_flow1_error.hpl | 101 - ..._criminal_liability_fz53_flow1_success.hpl | 101 - ...en_criminal_liability_fz53_flow2_error.hpl | 102 - ..._criminal_liability_fz53_flow2_success.hpl | 101 - ...en_criminal_liability_fz53_flow3_error.hpl | 101 - ..._criminal_liability_fz53_flow3_success.hpl | 101 - ...en_criminal_liability_fz53_flow4_error.hpl | 101 - ..._criminal_liability_fz53_flow4_success.hpl | 101 - ...en_criminal_liability_fz53_flow5_error.hpl | 101 - ..._criminal_liability_fz53_flow5_success.hpl | 101 - .../change_status_to_processing.hpl | 142 - .../change_status_to_processing_delta.hpl | 102 - ...en_criminal_liability_fz53_job_exists.hpl} | 61 +- ..._citizen_criminal_liability_fz53_error.hpl | 273 -- ...nt_job_citizen_criminal_liability_fz53.hpl | 869 ------ ..._citizen_criminal_liability_fz53_delta.hpl | 869 ------ .../citizen_criminal_liability_fz53_job.hwf | 358 +++ .../job_citizen_criminal_liability_fz53.hwf | 2482 ---------------- .../citizen_criminal_liability_fz53_flow.hpl | 407 +++ .../citizen_criminal_liability_fz53_flow1.hpl | 183 -- .../citizen_criminal_liability_fz53_flow2.hpl | 180 -- .../citizen_criminal_liability_fz53_flow3.hpl | 180 -- .../citizen_criminal_liability_fz53_flow4.hpl | 180 -- .../citizen_criminal_liability_fz53_flow5.hpl | 180 -- ...zen_criminal_liability_fz53_flow_delta.hpl | 422 +++ ...en_criminal_liability_fz53_flow_repeat.hpl | 437 +++ ..._citizen_criminal_liability_fz53_flow1.hpl | 180 -- ..._citizen_criminal_liability_fz53_flow2.hpl | 180 -- ..._citizen_criminal_liability_fz53_flow3.hpl | 180 -- ..._citizen_criminal_liability_fz53_flow4.hpl | 180 -- ..._citizen_criminal_liability_fz53_flow5.hpl | 180 -- .../recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../recruitment_rows_five_flow_if_error.hpl | 185 -- .../recruitments_five_flow.hpl | 373 +++ .../branching_citizen_liability_fz53.hpl | 124 - ...branching_citizen_liability_fz53_delta.hpl | 142 - .../check_if_need_to_repeat_job.hpl} | 67 +- ...tus_citizen_liability_fz53_flow1_error.hpl | 250 -- ...s_citizen_liability_fz53_flow1_success.hpl | 250 -- ...tus_citizen_liability_fz53_flow2_error.hpl | 254 -- ...s_citizen_liability_fz53_flow2_success.hpl | 254 -- ...tus_citizen_liability_fz53_flow3_error.hpl | 255 -- ...s_citizen_liability_fz53_flow3_success.hpl | 255 -- ...tus_citizen_liability_fz53_flow4_error.hpl | 256 -- ...s_citizen_liability_fz53_flow4_success.hpl | 256 -- ...tus_citizen_liability_fz53_flow5_error.hpl | 256 -- ...s_citizen_liability_fz53_flow5_success.hpl | 256 -- ...lta_citizen_liability_fz53_flow1_error.hpl | 101 - ...a_citizen_liability_fz53_flow1_success.hpl | 101 - ...lta_citizen_liability_fz53_flow2_error.hpl | 102 - ...a_citizen_liability_fz53_flow2_success.hpl | 101 - ...lta_citizen_liability_fz53_flow3_error.hpl | 101 - ...a_citizen_liability_fz53_flow3_success.hpl | 101 - ...lta_citizen_liability_fz53_flow4_error.hpl | 101 - ...a_citizen_liability_fz53_flow4_success.hpl | 101 - ...lta_citizen_liability_fz53_flow5_error.hpl | 101 - ...a_citizen_liability_fz53_flow5_success.hpl | 101 - .../change_status_to_processing.hpl | 142 - .../change_status_to_processing_delta.hpl | 102 - ..._if_citizen_liability_fz53_job_exists.hpl} | 61 +- ...heckpoint_citizen_liability_fz53_error.hpl | 273 -- .../checkpoint_job_citizen_liability_fz53.hpl | 869 ------ ...point_job_citizen_liability_fz53_delta.hpl | 869 ------ .../citizen_liability_fz53_job.hwf | 358 +++ .../job_citizen_liability_fz53.hwf | 2480 ---------------- .../parallel/citizen_liability_fz53_flow.hpl | 425 +++ .../parallel/citizen_liability_fz53_flow1.hpl | 205 -- .../parallel/citizen_liability_fz53_flow2.hpl | 202 -- .../parallel/citizen_liability_fz53_flow3.hpl | 202 -- .../parallel/citizen_liability_fz53_flow4.hpl | 202 -- .../parallel/citizen_liability_fz53_flow5.hpl | 202 -- .../citizen_liability_fz53_flow_delta.hpl | 443 +++ .../citizen_liability_fz53_flow_repeat.hpl | 459 +++ .../delta_citizen_liability_fz53_flow1.hpl | 202 -- .../delta_citizen_liability_fz53_flow2.hpl | 202 -- .../delta_citizen_liability_fz53_flow3.hpl | 202 -- .../delta_citizen_liability_fz53_flow4.hpl | 202 -- .../delta_citizen_liability_fz53_flow5.hpl | 202 -- .../recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../recruitment_rows_five_flow_if_error.hpl | 185 -- .../recruitments_five_flow.hpl | 373 +++ .../snils_inn/branching_snils_inn.hpl | 124 - .../snils_inn/branching_snils_inn_delta.hpl | 142 - ...or.hpl => check_if_need_to_repeat_job.hpl} | 67 +- ...e_status_delta_snils_inn_flow1_success.hpl | 101 - ...nge_status_delta_snils_inn_flow2_error.hpl | 102 - ...e_status_delta_snils_inn_flow2_success.hpl | 101 - ...nge_status_delta_snils_inn_flow3_error.hpl | 101 - ...e_status_delta_snils_inn_flow3_success.hpl | 101 - ...e_status_delta_snils_inn_flow4_success.hpl | 101 - ...nge_status_delta_snils_inn_flow5_error.hpl | 101 - ...e_status_delta_snils_inn_flow5_success.hpl | 101 - .../change_status_snils_inn_flow1_error.hpl | 250 -- .../change_status_snils_inn_flow1_success.hpl | 250 -- .../change_status_snils_inn_flow2_error.hpl | 254 -- .../change_status_snils_inn_flow2_success.hpl | 254 -- .../change_status_snils_inn_flow3_error.hpl | 255 -- .../change_status_snils_inn_flow3_success.hpl | 255 -- .../change_status_snils_inn_flow4_error.hpl | 256 -- .../change_status_snils_inn_flow4_success.hpl | 256 -- .../change_status_snils_inn_flow5_error.hpl | 256 -- .../change_status_snils_inn_flow5_success.hpl | 256 -- .../change_status_to_processing.hpl | 142 - .../check_if_snils_inn_job_exists.hpl} | 61 +- .../checkpoints/checkpoint_job_snils_inn.hpl | 869 ------ .../checkpoint_job_snils_inn_delta.hpl | 869 ------ .../checkpoint_snils_inn_error.hpl | 273 -- .../snils_inn/job_snils_inn.hwf | 2516 ----------------- .../parallel/delta_snils_inn_flow1.hpl | 202 -- .../parallel/delta_snils_inn_flow2.hpl | 202 -- .../parallel/delta_snils_inn_flow3.hpl | 202 -- .../parallel/delta_snils_inn_flow4.hpl | 202 -- .../parallel/delta_snils_inn_flow5.hpl | 202 -- .../snils_inn/parallel/snils_inn_flow.hpl | 440 +++ .../snils_inn/parallel/snils_inn_flow1.hpl | 208 -- .../snils_inn/parallel/snils_inn_flow2.hpl | 201 -- .../snils_inn/parallel/snils_inn_flow3.hpl | 201 -- .../snils_inn/parallel/snils_inn_flow4.hpl | 201 -- .../snils_inn/parallel/snils_inn_flow5.hpl | 201 -- .../parallel/snils_inn_flow_delta.hpl | 445 +++ .../parallel/snils_inn_flow_repeat.hpl | 458 +++ .../snils_inn/recruitment_five_flow_delta.hpl | 360 +++ .../recruitment_five_flow_on_error.hpl | 360 +++ .../recruitment_rows_five_flow_if_error.hpl | 185 -- .../snils_inn/recruitments_five_flow.hpl | 373 +++ .../snils_inn/snils_inn_job.hwf | 366 +++ .../job_parallel_recruits_info_citizen.hwf | 2 +- .../parallel/recruits_info_flow_delta.hpl | 7 +- 192 files changed, 11568 insertions(+), 42386 deletions(-) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl rename mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/{checkpoints/change_status_to_processing_delta.hpl => check_if_need_to_repeat_job.hpl} (56%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl rename mappings/info_recruits/citizen_tables/{snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl => citizen_appealing_violations_fz53/checkpoints/check_if_citizen_appealing_violations_fz53_job_exists.hpl} (70%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/citizen_appealing_violations_fz53_job.hwf delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_on_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitments_five_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl rename mappings/info_recruits/citizen_tables/{snils_inn/checkpoints/change_status_to_processing_delta.hpl => citizen_criminal_liability_fz53/check_if_need_to_repeat_job.hpl} (56%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl rename mappings/info_recruits/citizen_tables/{citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl => citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl} (69%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/citizen_criminal_liability_fz53_job.hwf delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_on_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitments_five_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl rename mappings/info_recruits/citizen_tables/{snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl => citizen_liability_fz53/check_if_need_to_repeat_job.hpl} (56%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl rename mappings/info_recruits/citizen_tables/{citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl => citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl} (68%) delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_on_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitments_five_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl rename mappings/info_recruits/citizen_tables/snils_inn/{checkpoints/change_status_delta_snils_inn_flow1_error.hpl => check_if_need_to_repeat_job.hpl} (56%) delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl rename mappings/info_recruits/citizen_tables/{citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl => snils_inn/checkpoints/check_if_snils_inn_job_exists.hpl} (68%) delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_on_error.hpl delete mode 100644 mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/snils_inn/snils_inn_job.hwf diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl index b95a663..85e6b57 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_delta.hpl @@ -27,11 +27,31 @@ Table input + Identify last row in a stream + Y + + + Identify last row in a stream Insert / update Y Insert / update + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + Insert / update + Detect empty stream + Y + + + Detect empty stream Change job status on success Y @@ -40,7 +60,32 @@ Change job status on error Y + + Change job status on error + Abort + Y + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1056 + 384 + + Change job status on error ExecSql @@ -56,9 +101,6 @@ error_description - - error_code - ervu-dashboard Y @@ -68,16 +110,15 @@ N UPDATE etl.job_execution SET status = 'DELTA_ERROR', - error_description = ?, - error_code = ? + error_description = ? WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 1040 - 416 + 832 + 384 @@ -107,8 +148,8 @@ and recruitment_id = '${IDM_ID}'; - 1040 - 224 + 1056 + 80 @@ -134,13 +175,83 @@ and recruitment_id = '${IDM_ID}'; SET status = 'DELTA_PROCESSING', execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL + error_description = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 + 272 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1056 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 832 + 80 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 640 224 @@ -148,7 +259,7 @@ and recruitment_id = '${IDM_ID}'; Insert / update InsertUpdate - Y + N 1 @@ -162,7 +273,6 @@ and recruitment_id = '${IDM_ID}'; = recruit_id recruit_id - ervu_dashboard citizen
@@ -280,7 +390,7 @@ and recruitment_id = '${IDM_ID}'; N - 784 + 832 224 @@ -288,7 +398,7 @@ and recruitment_id = '${IDM_ID}'; Table input TableInput - Y + N 1 @@ -378,7 +488,8 @@ SELECT FROM public.recruits AS r JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' - AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp + --AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp LEFT JOIN ( SELECT ROW_NUMBER() OVER (PARTITION BY recruit_id ORDER BY created_at DESC) as rn, @@ -397,7 +508,7 @@ ${LIMIT_FW} Y - 544 + 464 224 diff --git a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl index c61cd51..5bf8781 100644 --- a/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen/parallel/citizen_flow_repeat.hpl @@ -27,20 +27,65 @@ Table input - Table output + Identify last row in a stream Y - Table output + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Detect empty stream Change job status on success Y - Table output + Filter rows + Change job status on success + Y + + + Insert / update Change job status on error Y + + Change job status on error + Abort + Y + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1152 + 352 + + Change job status on error ExecSql @@ -56,13 +101,13 @@ error_description - - error_code - ervu-dashboard + Y + N + Y Y N @@ -73,10 +118,11 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; + - 976 - 400 + 896 + 352 @@ -106,8 +152,8 @@ and recruitment_id = '${IDM_ID}'; - 976 - 208 + 1216 + 96 @@ -135,7 +181,6 @@ and recruitment_id = '${IDM_ID}'; status, execution_datetime, error_description, - error_code, recruitment_id ) VALUES ( @@ -144,15 +189,13 @@ VALUES ( 'PROCESSING', DEFAULT, NULL, - NULL, '${IDM_ID}' ) ON CONFLICT (job_name, recruitment_id) DO UPDATE SET status = 'PROCESSING', execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL; + error_description = NULL 272 @@ -160,8 +203,8 @@ DO UPDATE SET - Table input - TableInput + Detect empty stream + DetectEmptyStream Y @@ -170,9 +213,218 @@ DO UPDATE SET none + + + 1216 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 896 + 96 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 688 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + recruit_id + recruit_id + N + + + system_pgs_status + system_pgs_status + Y + + + full_name + full_name + Y + + + last_name + last_name + Y + + + first_name + first_name + Y + + + middle_name + middle_name + Y + + + gender + gender + Y + + + birth_date + birth_date + Y + + + age + age + Y + + + birth_place + birth_place + Y + + + phone + phone + Y + + + email + email + Y + + + vu_current_info + vu_current_info + Y + + + date_registration + date_registration + Y + + + date_deregistration + date_deregistration + Y + + + marital_status + marital_status + Y + + + recruit_create_date + recruit_create_date + Y + + + update_date + update_date + Y + + + recruitment_id + recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + deferment_liberation + deferment_liberation + Y + + + id_ern + id_ern + Y + +
+ N + + + 896 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + ervu_person_registry N - /* with adresses as ( -- по одному ли адресу тут должно быть?? @@ -383,27 +635,24 @@ ${LIMIT_FW} N N N - Y - N ervu_dashboard Y citizen
- N Y N Y - 720 - 208 + 576 + 528
- Table output + Insert / update Change job status on error Y @@ -414,6 +663,18 @@ ${LIMIT_FW} + + Table output + Change job status on error + N + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl deleted file mode 100644 index 894af88..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl +++ /dev/null @@ -1,124 +0,0 @@ - - - - branching_citizen_appealing_violations_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - select - status as STATUS, - job_name AS PIPELINE -from public.etl_checkpoints -where job_name = 'job_citizen_appealing_violations_fz53' - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl deleted file mode 100644 index 35eb784..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - branching_citizen_appealing_violations_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_citizen_appealing_violations_fz53_delta') AS PIPELINE, - COALESCE(status, 'ERROR') AS STATUS, - current_timestamp::timestamp as record_created -FROM ( - select - CASE - WHEN status = 'PROCESSING' THEN 'ERROR' - ELSE status - END AS status, - job_name - from public.etl_checkpoints - where job_name = 'job_citizen_appealing_violations_fz53_delta' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_appealing_violations_fz53_delta' - ) -) t - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/check_if_need_to_repeat_job.hpl similarity index 56% rename from mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl rename to mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/check_if_need_to_repeat_job.hpl index 6ace1f9..feafe81 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/check_if_need_to_repeat_job.hpl @@ -1,7 +1,7 @@ - change_status_to_processing_delta + check_if_need_to_repeat_job Y @@ -13,22 +13,22 @@ 1000 100 - - 2025/06/16 13:42:26.494 + 2025/08/08 12:27:51.630 - - 2025/06/16 13:42:26.494 + 2025/08/08 12:27:51.630 Table input - Insert / update + Set variables Y - Insert / update - InsertUpdate + Set variables + SetVariable Y @@ -37,37 +37,18 @@ none
- 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y - 1248 - 352 + 624 + 288 @@ -84,16 +65,19 @@ ervu-dashboard N 0 - SELECT - 'PROCESSING' AS status, - 'delta_snils_inn' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_appealing_violations_fz53_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; N - 832 - 352 + 336 + 288 diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl deleted file mode 100644 index 17b638f..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_appealing_violations_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl deleted file mode 100644 index 7cca14e..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_appealing_violations_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl deleted file mode 100644 index 20d3515..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl deleted file mode 100644 index 4c86e09..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl deleted file mode 100644 index eff6309..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl deleted file mode 100644 index dde1f6c..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl deleted file mode 100644 index b8ea516..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl deleted file mode 100644 index d615e08..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl deleted file mode 100644 index 25d529e..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl deleted file mode 100644 index 64c33fa..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_appealing_violations_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_appealing_violations_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_appealing_violations_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl deleted file mode 100644 index 57bec30..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow1' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl deleted file mode 100644 index 5a31b60..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow1' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl deleted file mode 100644 index 2bb7cb2..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow2' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl deleted file mode 100644 index 02f1d71..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow2' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl deleted file mode 100644 index bad8452..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow3' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl deleted file mode 100644 index c52e330..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow3' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl deleted file mode 100644 index e5b0f66..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow4' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl deleted file mode 100644 index ed8c6b6..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow4' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl deleted file mode 100644 index b368dc1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow5' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl deleted file mode 100644 index 5f711e1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_appealing_violations_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow5' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl deleted file mode 100644 index 6e63a1c..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - change_status_to_processing - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 16:14:31.162 - - - 2025/06/11 16:14:31.162 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 784 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'job_citizen_appealing_violations_fz53' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_appealing_violations_fz53_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_appealing_violations_fz53_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_appealing_violations_fz53_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_appealing_violations_fz53_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_appealing_violations_fz53_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 368 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_citizen_appealing_violations_fz53_job_exists.hpl similarity index 70% rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl rename to mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_citizen_appealing_violations_fz53_job_exists.hpl index 8d7a204..374bbbf 100644 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_citizen_appealing_violations_fz53_job_exists.hpl @@ -1,7 +1,7 @@ - check_if_job_snils_inn_exists + check_if_citizen_appealing_violations_fz53_job_exists Y @@ -13,23 +13,23 @@ 1000 100 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - Table input - Set variables - Y - Set variables Write to log N + + Table input + Set variables + Y + Set variables @@ -44,21 +44,16 @@ - job_name - PIPE - PARENT_WORKFLOW - - - status - STATUS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW Y - 688 - 352 + 672 + 336 @@ -75,29 +70,17 @@ ervu-dashboard N 0 - SELECT - COALESCE(job_name, 'job_snils_inn') AS job_name, - COALESCE(status, 'NEW') AS status, - current_timestamp::timestamp as record_created -FROM ( - SELECT job_name, status - FROM public.etl_checkpoints - WHERE job_name = 'job_snils_inn' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_snils_inn' - ) -) t + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'citizen_appealing_violations_fz53_job' + limit 1 + ) AS job_executed_flag; N - 400 - 352 + 384 + 336 @@ -120,8 +103,8 @@ FROM ( ${STATUS} - 960 - 240 + 944 + 224 diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl deleted file mode 100644 index c4c46a7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_citizen_appealing_violations_fz53_error.hpl +++ /dev/null @@ -1,273 +0,0 @@ - - - - checkpoint_citizen_appealing_violations_fz53_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 10:01:04.895 - - - 2025/06/09 10:01:04.895 - - - - - - Select values - Table output - N - - - Table input - Select values - N - - - Table input - Table output - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - N - - idm_id - idm_id - String - -2 - -2 - - false - - - false - - - - - - - - - - 1008 - 608 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - FROM result_ma -), -for_checkpoints as ( - SELECT - 'job_child_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -) -select * from for_checkpoints - N - - - 736 - 448 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - N - N - N - N - Y - N - public - N - etl_checkpoints
- N - Y - N - Y - - - 1248 - 448 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl deleted file mode 100644 index 5483bad..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_appealing_violations_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'citizen_appealing_violations_fz53_flow1', - 'citizen_appealing_violations_fz53_flow2', - 'citizen_appealing_violations_fz53_flow3', - 'citizen_appealing_violations_fz53_flow4', - 'citizen_appealing_violations_fz53_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'citizen_appealing_violations_fz53_flow1', - 'citizen_appealing_violations_fz53_flow2', - 'citizen_appealing_violations_fz53_flow3', - 'citizen_appealing_violations_fz53_flow4', - 'citizen_appealing_violations_fz53_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_citizen_appealing_violations_fz53' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl deleted file mode 100644 index 6c9fc6a..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_appealing_violations_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'delta_snils_inn_flow1', - 'delta_snils_inn_flow2', - 'delta_snils_inn_flow3', - 'delta_snils_inn_flow4', - 'delta_snils_inn_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'delta_snils_inn_flow1', - 'delta_snils_inn_flow2', - 'delta_snils_inn_flow3', - 'delta_snils_inn_flow4', - 'delta_snils_inn_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_snils_inn_delta' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/citizen_appealing_violations_fz53_job.hwf b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/citizen_appealing_violations_fz53_job.hwf new file mode 100644 index 0000000..fbff1c8 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/citizen_appealing_violations_fz53_job.hwf @@ -0,0 +1,362 @@ + + + citizen_appealing_violations_fz53_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 96 + 304 + + + + check_if_citizen_appealing_violations_fz53_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_citizen_appealing_violations_fz53_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + citizen_appealing_violations_fz53_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 832 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1296 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_on_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 1296 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 832 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 832 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 832 + 800 + + + + + + Start + check_if_citizen_appealing_violations_fz53_job_exists.hpl + Y + Y + Y + + + check_if_citizen_appealing_violations_fz53_job_exists.hpl + citizen_appealing_violations_fz53_job_exists_check + Y + Y + N + + + citizen_appealing_violations_fz53_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + citizen_appealing_violations_fz53_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 944 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 944 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 752 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + citizen_appealing_violations_fz53_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 206 + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf deleted file mode 100644 index 7151cc4..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_citizen_appealing_violations_fz53.hwf +++ /dev/null @@ -1,2478 +0,0 @@ - - - job_citizen_appealing_violations_fz53 - Y - - - - 0 - - - 2025/06/05 14:27:15.055 - - - 2025/06/05 14:27:15.055 - - - M_R_CR_DATE - 3001-01-01 00:00:00 - - - - M_R_UP_DATE - - - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 272 - 400 - - - - checkpoint_job_citizen_appealing_violations_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1136 - 1280 - - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2832 - 400 - - - - citizen_appealing_violations_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 3344 - 80 - - - - citizen_appealing_violations_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 3344 - 240 - - - - citizen_appealing_violations_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 3344 - 400 - - - - citizen_appealing_violations_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 3344 - 560 - - - - citizen_appealing_violations_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 3344 - 720 - - - - Abort workflow - - ABORT - - N - N - 2816 - 208 - - - - Success new citizen_appealing_violations_fz53 - - SUCCESS - - N - 4720 - 432 - - - - branching_citizen_appealing_violations_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1584 - 1280 - - - - Simple citizen_appealing_violations_fz53 WHERE SUCCESS - - SIMPLE_EVAL - - SUCCESS - string - true - equal - equal - N - variable - STATUS - N - 1696 - 1680 - - - - Simple citizen_appealing_violations_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 2048 - 1280 - - - - recruitment_rows_five_flow_if_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2864 - 1280 - - - - Abort workflow 2 - - ABORT - - N - N - 2768 - 1040 - - - - delta_citizen_appealing_violations_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 3344 - 1792 - - - - check_if_job_citizen_appealing_violations_fz53_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 528 - 400 - - - - Simple job_citizen_appealing_violations_fz53_exists check NEW - - SIMPLE_EVAL - - NEW - string - true - equal - equal - N - variable - STATUS - N - 992 - 400 - - - - change_status_to_processing.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2848 - 560 - - - - change_status_citizen_appealing_violations_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 80 - - - - change_status_citizen_appealing_violations_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 160 - - - - change_status_citizen_appealing_violations_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 240 - - - - change_status_citizen_appealing_violations_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 320 - - - - change_status_citizen_appealing_violations_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 400 - - - - change_status_citizen_appealing_violations_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 480 - - - - change_status_citizen_appealing_violations_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 560 - - - - change_status_citizen_appealing_violations_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 640 - - - - change_status_citizen_appealing_violations_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 720 - - - - change_status_citizen_appealing_violations_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 800 - - - - checkpoint_job_citizen_appealing_violations_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 4320 - 432 - - - - change_status_to_processing.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2848 - 1424 - - - - change_status_to_processing_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_to_processing_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 2864 - 2304 - - - - change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1792 - - - - change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1872 - - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2832 - 2112 - - - - Abort workflow 2 2 - - ABORT - - N - N - 2816 - 1952 - - - - delta_citizen_appealing_violations_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 3344 - 1952 - - - - change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1952 - - - - change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2032 - - - - delta_citizen_appealing_violations_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 3344 - 2112 - - - - change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2112 - - - - change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2192 - - - - delta_citizen_appealing_violations_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 3344 - 2272 - - - - change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2272 - - - - change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2352 - - - - delta_citizen_appealing_violations_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 3344 - 2432 - - - - change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2432 - - - - change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 2512 - - - - branching_citizen_appealing_violations_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/branching_citizen_appealing_violations_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1824 - 2112 - - - - Simple delta_citizen_appealing_violations_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 2256 - 2112 - - - - delta_citizen_appealing_violations_fz53 success - - SUCCESS - - N - 2368 - 1904 - - - - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 4384 - 2112 - - - - Success delta_citizen_appealing_violations_fz53 - - SUCCESS - - N - 4784 - 2112 - - - - citizen_appealing_violations_fz53_flow1.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 3344 - 960 - - - - citizen_appealing_violations_fz53_flow2.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 3344 - 1120 - - - - citizen_appealing_violations_fz53_flow3.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 3344 - 1280 - - - - citizen_appealing_violations_fz53_flow4.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 3344 - 1440 - - - - citizen_appealing_violations_fz53_flow5.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 3344 - 1600 - - - - Success citizen_appealing_violations_fz53 after error - - SUCCESS - - N - 4720 - 1312 - - - - change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 960 - - - - change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1040 - - - - change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1120 - - - - change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1200 - - - - change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1280 - - - - change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1360 - - - - change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1440 - - - - change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1520 - - - - change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1600 - - - - change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/change_status_citizen_appealing_violations_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3856 - 1680 - - - - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/checkpoint_job_citizen_appealing_violations_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 4320 - 1312 - - - - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - citizen_appealing_violations_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - citizen_appealing_violations_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - citizen_appealing_violations_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - citizen_appealing_violations_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - citizen_appealing_violations_fz53_flow5.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - Abort workflow - Y - N - N - - - branching_citizen_appealing_violations_fz53.hpl - Simple citizen_appealing_violations_fz53 WHERE ERROR - Y - N - Y - - - branching_citizen_appealing_violations_fz53.hpl - Simple citizen_appealing_violations_fz53 WHERE SUCCESS - Y - N - Y - - - recruitment_rows_five_flow_if_error.hpl - Abort workflow 2 - Y - N - N - - - Start - check_if_job_citizen_appealing_violations_fz53_exists.hpl - Y - Y - Y - - - check_if_job_citizen_appealing_violations_fz53_exists.hpl - Simple job_citizen_appealing_violations_fz53_exists check NEW - Y - Y - N - - - citizen_appealing_violations_fz53_flow1.hpl - change_status_citizen_appealing_violations_fz53_flow1_success.hpl - Y - Y - N - - - citizen_appealing_violations_fz53_flow1.hpl - change_status_citizen_appealing_violations_fz53_flow1_error.hpl - Y - N - N - - - citizen_appealing_violations_fz53_flow2.hpl - change_status_citizen_appealing_violations_fz53_flow2_success.hpl - Y - Y - N - - - citizen_appealing_violations_fz53_flow2.hpl - change_status_citizen_appealing_violations_fz53_flow2_error.hpl - Y - N - N - - - citizen_appealing_violations_fz53_flow3.hpl - change_status_citizen_appealing_violations_fz53_flow3_success.hpl - Y - Y - N - - - citizen_appealing_violations_fz53_flow3.hpl - change_status_citizen_appealing_violations_fz53_flow3_error.hpl - Y - N - N - - - citizen_appealing_violations_fz53_flow4.hpl - change_status_citizen_appealing_violations_fz53_flow4_success.hpl - Y - Y - N - - - citizen_appealing_violations_fz53_flow4.hpl - change_status_citizen_appealing_violations_fz53_flow4_error.hpl - Y - N - N - - - citizen_appealing_violations_fz53_flow5.hpl - change_status_citizen_appealing_violations_fz53_flow5_success.hpl - Y - Y - N - - - citizen_appealing_violations_fz53_flow5.hpl - change_status_citizen_appealing_violations_fz53_flow5_error.hpl - Y - N - N - - - change_status_citizen_appealing_violations_fz53_flow5_error.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow5_success.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow4_error.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow4_success.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow3_error.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow3_success.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow2_error.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow2_success.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow1_error.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow1_success.hpl - checkpoint_job_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - checkpoint_job_citizen_appealing_violations_fz53.hpl - Success new citizen_appealing_violations_fz53 - Y - Y - N - - - checkpoint_job_citizen_appealing_violations_fz53.hpl (2) - branching_citizen_appealing_violations_fz53.hpl - Y - N - Y - - - Simple job_citizen_appealing_violations_fz53_exists check NEW - checkpoint_job_citizen_appealing_violations_fz53.hpl (2) - Y - N - N - - - delta_citizen_appealing_violations_fz53_flow1.hpl - change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl - Y - Y - N - - - delta_citizen_appealing_violations_fz53_flow1.hpl - change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - change_status_to_processing.hpl - Y - Y - N - - - Simple job_citizen_appealing_violations_fz53_exists check NEW - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - change_status_to_processing.hpl (2) - Y - Y - N - - - Simple citizen_appealing_violations_fz53 WHERE ERROR - recruitment_rows_five_flow_if_error.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - delta_citizen_appealing_violations_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - change_status_to_processing_delta.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - Abort workflow 2 2 - Y - N - N - - - delta_citizen_appealing_violations_fz53_flow2.hpl - change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl - Y - Y - N - - - delta_citizen_appealing_violations_fz53_flow2.hpl - change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl - Y - N - N - - - delta_citizen_appealing_violations_fz53_flow3.hpl - change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl - Y - Y - N - - - delta_citizen_appealing_violations_fz53_flow3.hpl - change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl - Y - N - N - - - delta_citizen_appealing_violations_fz53_flow4.hpl - change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl - Y - Y - N - - - delta_citizen_appealing_violations_fz53_flow4.hpl - change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl - Y - N - N - - - delta_citizen_appealing_violations_fz53_flow5.hpl - change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl - Y - Y - N - - - delta_citizen_appealing_violations_fz53_flow5.hpl - change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - delta_citizen_appealing_violations_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - delta_citizen_appealing_violations_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - delta_citizen_appealing_violations_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - delta_citizen_appealing_violations_fz53_flow5.hpl - Y - Y - N - - - Simple citizen_appealing_violations_fz53 WHERE SUCCESS - branching_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - Simple delta_citizen_appealing_violations_fz53 WHERE ERROR - delta_citizen_appealing_violations_fz53 success - Y - N - N - - - branching_citizen_appealing_violations_fz53_delta.hpl - Simple delta_citizen_appealing_violations_fz53 WHERE ERROR - Y - Y - N - - - Simple delta_citizen_appealing_violations_fz53 WHERE ERROR - recruitment_rows_five_flow_citizen_appealing_violations_fz53.hpl (2) - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow1_success.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow3_success.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow2_error.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow2_success.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow1_error.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow3_error.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow4_success.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow4_error.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow5_success.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_appealing_violations_fz53_flow5_error.hpl - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Y - Y - N - - - checkpoint_job_citizen_appealing_violations_fz53_delta.hpl - Success delta_citizen_appealing_violations_fz53 - Y - Y - N - - - citizen_appealing_violations_fz53_flow1.hpl 2 - change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 - Y - Y - N - - - citizen_appealing_violations_fz53_flow1.hpl 2 - change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 - Y - N - N - - - citizen_appealing_violations_fz53_flow2.hpl 2 - change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 - Y - Y - N - - - citizen_appealing_violations_fz53_flow2.hpl 2 - change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 - Y - N - N - - - citizen_appealing_violations_fz53_flow3.hpl 2 - change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 - Y - Y - N - - - citizen_appealing_violations_fz53_flow3.hpl 2 - change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 - Y - N - N - - - citizen_appealing_violations_fz53_flow4.hpl 2 - change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 - Y - Y - N - - - citizen_appealing_violations_fz53_flow4.hpl 2 - change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 - Y - N - N - - - citizen_appealing_violations_fz53_flow5.hpl 2 - change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 - Y - Y - N - - - citizen_appealing_violations_fz53_flow5.hpl 2 - change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 - Y - N - N - - - change_status_citizen_appealing_violations_fz53_flow1_success.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow1_error.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow2_success.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow2_error.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow3_success.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow3_error.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow4_success.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow4_error.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow5_success.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_appealing_violations_fz53_flow5_error.hpl 2 - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Y - N - Y - - - checkpoint_job_citizen_appealing_violations_fz53.hpl 2 - Success citizen_appealing_violations_fz53 after error - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_appealing_violations_fz53_flow3.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_appealing_violations_fz53_flow2.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_appealing_violations_fz53_flow1.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_appealing_violations_fz53_flow4.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_appealing_violations_fz53_flow5.hpl 2 - Y - Y - N - - - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 72 - 1088 - 176 - 0001-01-01 00:00:00 - -3001-01-01 00:00:00 - - 114 - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl new file mode 100644 index 0000000..53da516 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl @@ -0,0 +1,389 @@ + + + + citizen_appealing_violations_fz53_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= ad.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + create_date + create_date + + + number_appealed + number_appealed + + + date_appealed + date_appealed + + + case_number + case_number + + + decision_date + decision_date + + + result_appeal + result_appeal + + + name_commission + name_commission + + + grounds + grounds + + + hidden + hidden + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_appealing_violations_fz53
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl deleted file mode 100644 index d1ca18f..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow1.hpl +++ /dev/null @@ -1,161 +0,0 @@ - - - - citizen_appealing_violations_fz53_flow1 - Y - - - - Normal - 0 - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 448 - 288 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - - = - create_date - create_date - - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 864 - 288 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl deleted file mode 100644 index 1b5d294..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow2.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - citizen_appealing_violations_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 928 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 512 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl deleted file mode 100644 index 8ce8203..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow3.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - citizen_appealing_violations_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 992 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 576 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl deleted file mode 100644 index 1446dc1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow4.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - citizen_appealing_violations_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 896 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 480 - 368 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl deleted file mode 100644 index 5614a92..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow5.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - citizen_appealing_violations_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 1104 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 688 - 368 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl new file mode 100644 index 0000000..94e22da --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl @@ -0,0 +1,402 @@ + + + + citizen_appealing_violations_fz53_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND ad.create_date >= '${M_R_UP_DATE}'::timestamp + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl new file mode 100644 index 0000000..d48295e --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl @@ -0,0 +1,417 @@ + + + + citizen_appealing_violations_fz53_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + create_date + create_date + + ervu_dashboard + citizen_appealing_violations_fz53
+ + recruit_id + recruit_id + N + + + create_date + create_date + N + + + number_appealed + number_appealed + Y + + + date_appealed + date_appealed + Y + + + case_number + case_number + Y + + + decision_date + decision_date + Y + + + result_appeal + result_appeal + Y + + + name_commission + name_commission + Y + + + grounds + grounds + Y + + + hidden + hidden + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + ad.recruit_id, + ad.create_date, -- дата создания обжалования + ad.appeal_number AS number_appealed, -- номер обжалуемого решения + ad.appeal_date AS date_appealed, -- дата обжалуемого решения + ad.result_number AS case_number, -- номер принятого решения + ad.result_date AS decision_date, -- дата принятия решения + CASE + WHEN ad.result = '1' THEN 'Удовлетворена' + WHEN ad.result = '2' THEN 'Частично удовлетворена' + WHEN ad.result = '3' THEN 'Отказано в удовлетворении' + ELSE NULL + END AS result_appeal, -- код рассмотрения + ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение + ad.reason_for_add_entry AS grounds, -- основание для внесения записи + ad.hidden --has_appealing_violations_fz53 +FROM public.appeal_document_dto ad +JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= ad.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты +--WHERE hidden IS FALSE + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl deleted file mode 100644 index d065de7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow1.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - delta_citizen_appealing_violations_fz53_flow1 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 976 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 560 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl deleted file mode 100644 index 1c9afd1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow2.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - delta_citizen_appealing_violations_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 1056 - 336 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 640 - 336 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl deleted file mode 100644 index 648df28..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow3.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - delta_citizen_appealing_violations_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 1120 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 704 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl deleted file mode 100644 index 7eef578..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow4.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - delta_citizen_appealing_violations_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 1056 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 640 - 368 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl deleted file mode 100644 index 950b9b0..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/delta_citizen_appealing_violations_fz53_flow5.hpl +++ /dev/null @@ -1,158 +0,0 @@ - - - - delta_citizen_appealing_violations_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - create_date - create_date - - ervu_dashboard - citizen_appealing_violations_fz53
- - recruit_id - recruit_id - N - - - create_date - create_date - N - - - number_appealed - number_appealed - Y - - - date_appealed - date_appealed - Y - - - case_number - case_number - Y - - - decision_date - decision_date - Y - - - result_appeal - result_appeal - Y - - - name_commission - name_commission - Y - - - grounds - grounds - Y - - - hidden - hidden - Y - -
- N - - - 1008 - 320 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - ad.recruit_id, - ad.create_date, -- дата создания обжалования - ad.appeal_number AS number_appealed, -- номер обжалуемого решения - ad.appeal_date AS date_appealed, -- дата обжалуемого решения - ad.result_number AS case_number, -- номер принятого решения - ad.result_date AS decision_date, -- дата принятия решения - CASE - WHEN ad.result = '1' THEN 'Удовлетворена' - WHEN ad.result = '2' THEN 'Частично удовлетворена' - WHEN ad.result = '3' THEN 'Отказано в удовлетворении' - ELSE NULL - END AS result_appeal, -- код рассмотрения - ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение - ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 -FROM public.appeal_document_dto ad -JOIN public.recruit r ON r.id = ad.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты ---WHERE hidden IS FALSE - Y - - - 592 - 320 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..9a671d9 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + citizen_appealing_violations_fz53_flow_delta.hpl + Y + + + Table input + citizen_appealing_violations_fz53_flow_delta.hpl 2 + Y + + + Table input + citizen_appealing_violations_fz53_flow_delta.hpl 3 + Y + + + Table input + citizen_appealing_violations_fz53_flow_delta.hpl 4 + Y + + + Table input + citizen_appealing_violations_fz53_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_appealing_violations_fz53_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + citizen_appealing_violations_fz53_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 128 + + + + citizen_appealing_violations_fz53_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 208 + + + + citizen_appealing_violations_fz53_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 288 + + + + citizen_appealing_violations_fz53_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 368 + + + + citizen_appealing_violations_fz53_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..edb6fa2 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + citizen_appealing_violations_fz53_flow_repeat.hpl + Y + + + Table input + citizen_appealing_violations_fz53_flow_repeat.hpl 2 + Y + + + Table input + citizen_appealing_violations_fz53_flow_repeat.hpl 3 + Y + + + Table input + citizen_appealing_violations_fz53_flow_repeat.hpl 4 + Y + + + Table input + citizen_appealing_violations_fz53_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_appealing_violations_fz53_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + citizen_appealing_violations_fz53_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 208 + + + + citizen_appealing_violations_fz53_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 288 + + + + citizen_appealing_violations_fz53_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 368 + + + + citizen_appealing_violations_fz53_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 448 + + + + citizen_appealing_violations_fz53_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl deleted file mode 100644 index 4b469b9..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitment_rows_five_flow_if_error.hpl +++ /dev/null @@ -1,185 +0,0 @@ - - - - recruitment_rows_five_flow_if_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/23 14:28:22.572 - - - 2025/05/23 14:28:22.572 - - - - - - Table input - Copy rows to result - Y - - - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 880 - 288 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -fr_check AS ( - SELECT - last_recruitment_id AS recruitment_id, - recruitment_created_date, - status, - job_name - FROM public.etl_checkpoints - WHERE status = 'ERROR' AND job_name IN ('citizen_appealing_violations_fz53_flow1', 'citizen_appealing_violations_fz53_flow2', 'citizen_appealing_violations_fz53_flow3', 'citizen_appealing_violations_fz53_flow4', 'citizen_appealing_violations_fz53_flow5') -), -ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, - ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position - FROM ordered -), -pivoted AS ( - SELECT - position, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN created_at END) AS cr_flow1, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow1') THEN idm_id::text END) AS idm_flow1, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN created_at END) AS cr_flow2, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow2') THEN idm_id::text END) AS idm_flow2, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN created_at END) AS cr_flow3, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow3') THEN idm_id::text END) AS idm_flow3, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN created_at END) AS cr_flow4, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow4') THEN idm_id::text END) AS idm_flow4, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN created_at END) AS cr_flow5, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_appealing_violations_fz53_flow5') THEN idm_id::text END) AS idm_flow5 - FROM splitted - GROUP BY position -), -remains as ( - SELECT - position, - cr_flow1, - idm_flow1::uuid, - cr_flow2, - idm_flow2::uuid, - cr_flow3, - idm_flow3::uuid, - cr_flow4, - idm_flow4::uuid, - cr_flow5, - idm_flow5::uuid - FROM pivoted - WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) - OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) - OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) - OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) - OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) - order by position -), -idm1 as ( - select - cr_flow1, - idm_flow1 - from remains - where cr_flow1 is not null and idm_flow1 is not null -), -idm2 as ( - select - cr_flow2, - idm_flow2 - from remains - where cr_flow2 is not null and idm_flow2 is not null -), -idm3 as ( - select - cr_flow3, - idm_flow3 - from remains - where cr_flow3 is not null and idm_flow3 is not null -), -idm4 as ( - select - cr_flow4, - idm_flow4 - from remains - where cr_flow4 is not null and idm_flow4 is not null -), -idm5 as ( - select - cr_flow5, - idm_flow5 - from remains - where cr_flow5 is not null and idm_flow5 is not null -) -select - i1.*, - i2.*, - i3.*, - i4.*, - i5.* -FROM - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn -ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) -limit 2 - N - - - 512 - 288 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitments_five_flow.hpl new file mode 100644 index 0000000..6efa85b --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + citizen_appealing_violations_fz53_flow.hpl + Y + + + Get all recruitments ordered by created_date + citizen_appealing_violations_fz53_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + citizen_appealing_violations_fz53_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + citizen_appealing_violations_fz53_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + citizen_appealing_violations_fz53_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + citizen_appealing_violations_fz53_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 784 + 144 + + + + citizen_appealing_violations_fz53_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 784 + 224 + + + + citizen_appealing_violations_fz53_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 784 + 304 + + + + citizen_appealing_violations_fz53_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 784 + 384 + + + + citizen_appealing_violations_fz53_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_appealing_violations_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 784 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl deleted file mode 100644 index e077078..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl +++ /dev/null @@ -1,124 +0,0 @@ - - - - branching_citizen_criminal_liability_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - select - status as STATUS, - job_name AS PIPELINE -from public.etl_checkpoints -where job_name = 'job_citizen_criminal_liability_fz53' - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl deleted file mode 100644 index 4402413..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - branching_citizen_criminal_liability_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_citizen_criminal_liability_fz53_delta') AS PIPELINE, - COALESCE(status, 'ERROR') AS STATUS, - current_timestamp::timestamp as record_created -FROM ( - select - CASE - WHEN status = 'PROCESSING' THEN 'ERROR' - ELSE status - END AS status, - job_name - from public.etl_checkpoints - where job_name = 'job_citizen_criminal_liability_fz53_delta' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_criminal_liability_fz53_delta' - ) -) t - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/check_if_need_to_repeat_job.hpl similarity index 56% rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl rename to mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/check_if_need_to_repeat_job.hpl index 6ace1f9..9698cd9 100644 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/check_if_need_to_repeat_job.hpl @@ -1,7 +1,7 @@ - change_status_to_processing_delta + check_if_need_to_repeat_job Y @@ -13,22 +13,22 @@ 1000 100 - - 2025/06/16 13:42:26.494 + 2025/08/08 12:27:51.630 - - 2025/06/16 13:42:26.494 + 2025/08/08 12:27:51.630 Table input - Insert / update + Set variables Y - Insert / update - InsertUpdate + Set variables + SetVariable Y @@ -37,37 +37,18 @@ none - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y - 1248 - 352 + 624 + 288
@@ -84,16 +65,19 @@ ervu-dashboard N 0 - SELECT - 'PROCESSING' AS status, - 'delta_snils_inn' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_criminal_liability_fz53_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; N - 832 - 352 + 336 + 288 diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl deleted file mode 100644 index 4095df7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_criminal_liability_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl deleted file mode 100644 index 3ef1f41..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_criminal_liability_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl deleted file mode 100644 index e729ca5..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl deleted file mode 100644 index 896e5f7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl deleted file mode 100644 index 63d1db3..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl deleted file mode 100644 index cdaf266..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl deleted file mode 100644 index 0d74917..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl deleted file mode 100644 index 1c4519b..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl deleted file mode 100644 index bf0f099..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl deleted file mode 100644 index c7e8c88..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_criminal_liability_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_criminal_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_criminal_liability_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl deleted file mode 100644 index 748f1fd..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow1' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl deleted file mode 100644 index 3985742..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow1' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl deleted file mode 100644 index d3a3687..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow2' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl deleted file mode 100644 index c729385..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow2' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl deleted file mode 100644 index 0baf42b..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow3' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl deleted file mode 100644 index 0cfddb3..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow3' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl deleted file mode 100644 index edaee70..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow4' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl deleted file mode 100644 index c3ad66d..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow4' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl deleted file mode 100644 index db5a6de..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow5' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl deleted file mode 100644 index e773802..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_criminal_liability_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_criminal_liability_fz53_flow5' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl deleted file mode 100644 index e422b79..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - change_status_to_processing - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 16:14:31.162 - - - 2025/06/11 16:14:31.162 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 784 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'job_citizen_criminal_liability_fz53' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_criminal_liability_fz53_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_criminal_liability_fz53_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_criminal_liability_fz53_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_criminal_liability_fz53_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_criminal_liability_fz53_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 368 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl deleted file mode 100644 index 9aea55f..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_to_processing_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 13:42:26.494 - - - 2025/06/16 13:42:26.494 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1248 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'delta_citizen_criminal_liability_fz53' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 832 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl similarity index 69% rename from mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl rename to mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl index e27b362..2ab9720 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl @@ -1,7 +1,7 @@ - check_if_job_citizen_liability_fz53_exists + check_if_citizen_criminal_liability_fz53_job_exists Y @@ -13,23 +13,23 @@ 1000 100 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - Table input - Set variables - Y - Set variables Write to log N + + Table input + Set variables + Y + Set variables @@ -44,21 +44,16 @@ - job_name - PIPE - PARENT_WORKFLOW - - - status - STATUS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW Y - 688 - 352 + 672 + 336 @@ -75,29 +70,17 @@ ervu-dashboard N 0 - SELECT - COALESCE(job_name, 'job_citizen_liability_fz53') AS job_name, - COALESCE(status, 'NEW') AS status, - current_timestamp::timestamp as record_created -FROM ( - SELECT job_name, status - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_liability_fz53' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_liability_fz53' - ) -) t + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'recruits_info_job' + limit 1 + ) AS job_executed_flag; N - 400 - 352 + 384 + 336 @@ -120,8 +103,8 @@ FROM ( ${STATUS} - 960 - 240 + 944 + 224 diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl deleted file mode 100644 index 6dec012..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_citizen_criminal_liability_fz53_error.hpl +++ /dev/null @@ -1,273 +0,0 @@ - - - - checkpoint_citizen_criminal_liability_fz53_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 10:01:04.895 - - - 2025/06/09 10:01:04.895 - - - - - - Select values - Table output - N - - - Table input - Select values - N - - - Table input - Table output - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - N - - idm_id - idm_id - String - -2 - -2 - - false - - - false - - - - - - - - - - 1008 - 608 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - FROM result_ma -), -for_checkpoints as ( - SELECT - 'job_child_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -) -select * from for_checkpoints - N - - - 736 - 448 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - N - N - N - N - Y - N - public - N - etl_checkpoints
- N - Y - N - Y - - - 1248 - 448 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl deleted file mode 100644 index dd178f2..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_criminal_liability_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'citizen_criminal_liability_fz53_flow1', - 'citizen_criminal_liability_fz53_flow2', - 'citizen_criminal_liability_fz53_flow3', - 'citizen_criminal_liability_fz53_flow4', - 'citizen_criminal_liability_fz53_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'citizen_criminal_liability_fz53_flow1', - 'citizen_criminal_liability_fz53_flow2', - 'citizen_criminal_liability_fz53_flow3', - 'citizen_criminal_liability_fz53_flow4', - 'citizen_criminal_liability_fz53_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_citizen_criminal_liability_fz53' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl deleted file mode 100644 index 658a967..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_criminal_liability_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'delta_citizen_criminal_liability_fz53_flow1', - 'delta_citizen_criminal_liability_fz53_flow2', - 'delta_citizen_criminal_liability_fz53_flow3', - 'delta_citizen_criminal_liability_fz53_flow4', - 'delta_citizen_criminal_liability_fz53_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'delta_citizen_criminal_liability_fz53_flow1', - 'delta_citizen_criminal_liability_fz53_flow2', - 'delta_citizen_criminal_liability_fz53_flow3', - 'delta_citizen_criminal_liability_fz53_flow4', - 'delta_citizen_criminal_liability_fz53_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_citizen_criminal_liability_fz53_delta' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/citizen_criminal_liability_fz53_job.hwf b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/citizen_criminal_liability_fz53_job.hwf new file mode 100644 index 0000000..e08a136 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/citizen_criminal_liability_fz53_job.hwf @@ -0,0 +1,358 @@ + + + citizen_criminal_liability_fz53_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 160 + 304 + + + + check_if_citizen_criminal_liability_fz53_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + citizen_criminal_liability_fz53_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 784 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1104 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1104 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 784 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 800 + + + + + + Start + check_if_citizen_criminal_liability_fz53_job_exists.hpl + Y + Y + Y + + + check_if_citizen_criminal_liability_fz53_job_exists.hpl + citizen_criminal_liability_fz53_job_exists_check + Y + Y + N + + + citizen_criminal_liability_fz53_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + citizen_criminal_liability_fz53_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 896 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 896 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 704 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + citizen_criminal_liability_fz53_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 184 + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf deleted file mode 100644 index 05ee576..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/job_citizen_criminal_liability_fz53.hwf +++ /dev/null @@ -1,2482 +0,0 @@ - - - job_citizen_criminal_liability_fz53 - Y - - - - 0 - - - 2025/06/05 14:27:15.055 - - - 2025/06/05 14:27:15.055 - - - M_R_CR_DATE - 3001-01-01 00:00:00 - - - - M_R_UP_DATE - - - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 96 - 400 - - - - checkpoint_job_citizen_criminal_liability_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1136 - 1280 - - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2352 - 400 - - - - citizen_criminal_liability_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2736 - 80 - - - - citizen_criminal_liability_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2736 - 240 - - - - citizen_criminal_liability_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2736 - 400 - - - - citizen_criminal_liability_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2736 - 560 - - - - citizen_criminal_liability_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2736 - 720 - - - - Abort workflow - - ABORT - - N - N - 2336 - 208 - - - - Success new citizen_criminal_liability_fz53 - - SUCCESS - - N - 3920 - 432 - - - - branching_citizen_criminal_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1584 - 1280 - - - - Simple citizen_criminal_liability_fz53 WHERE SUCCESS - - SIMPLE_EVAL - - SUCCESS - string - true - equal - equal - N - variable - STATUS - N - 1632 - 1680 - - - - Simple citizen_criminal_liability_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1984 - 1280 - - - - recruitment_rows_five_flow_if_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2384 - 1280 - - - - Abort workflow 2 - - ABORT - - N - N - 2288 - 1040 - - - - delta_citizen_criminal_liability_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F1 - IDM_FLOW1 - - - Y - - Y - local - N - N - Y - N - 2912 - 1792 - - - - check_if_job_citizen_criminal_liability_fz53_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 448 - 400 - - - - Simple job_citizen_criminal_liability_fz53_exists check NEW - - SIMPLE_EVAL - - NEW - string - true - equal - equal - N - variable - STATUS - N - 896 - 400 - - - - change_status_to_processing.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2368 - 560 - - - - change_status_citizen_criminal_liability_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 80 - - - - change_status_citizen_criminal_liability_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 160 - - - - change_status_citizen_criminal_liability_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 240 - - - - change_status_citizen_criminal_liability_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 320 - - - - change_status_citizen_criminal_liability_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 400 - - - - change_status_citizen_criminal_liability_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 480 - - - - change_status_citizen_criminal_liability_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 560 - - - - change_status_citizen_criminal_liability_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 640 - - - - change_status_citizen_criminal_liability_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 720 - - - - change_status_citizen_criminal_liability_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 800 - - - - checkpoint_job_citizen_criminal_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 3600 - 432 - - - - change_status_to_processing.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2304 - 1440 - - - - change_status_to_processing_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_to_processing_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 2480 - 2304 - - - - change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 1792 - - - - change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 1872 - - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2480 - 2112 - - - - Abort workflow 2 2 - - ABORT - - N - N - 2432 - 1952 - - - - delta_citizen_criminal_liability_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2912 - 1952 - - - - change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 1952 - - - - change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2032 - - - - delta_citizen_criminal_liability_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2912 - 2112 - - - - change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2112 - - - - change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2192 - - - - delta_citizen_criminal_liability_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2912 - 2272 - - - - change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2272 - - - - change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2352 - - - - delta_citizen_criminal_liability_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2912 - 2432 - - - - change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2432 - - - - change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3344 - 2512 - - - - branching_citizen_criminal_liability_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/branching_citizen_criminal_liability_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1632 - 2112 - - - - Simple delta_citizen_criminal_liability_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 2032 - 2112 - - - - delta_citizen_criminal_liability_fz53 success - - SUCCESS - - N - 2160 - 1952 - - - - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 3792 - 2112 - - - - Success delta_citizen_criminal_liability_fz53 - - SUCCESS - - N - 4208 - 2112 - - - - citizen_criminal_liability_fz53_flow1.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2736 - 960 - - - - citizen_criminal_liability_fz53_flow2.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2736 - 1120 - - - - citizen_criminal_liability_fz53_flow3.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2736 - 1280 - - - - citizen_criminal_liability_fz53_flow4.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2736 - 1440 - - - - citizen_criminal_liability_fz53_flow5.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2736 - 1600 - - - - Success citizen_criminal_liability_fz53 after error - - SUCCESS - - N - 3968 - 1312 - - - - change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 960 - - - - change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1040 - - - - change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1120 - - - - change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1200 - - - - change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1280 - - - - change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1360 - - - - change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1440 - - - - change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1520 - - - - change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1600 - - - - change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/change_status_citizen_criminal_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 3136 - 1680 - - - - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/checkpoint_job_citizen_criminal_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 3600 - 1312 - - - - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - citizen_criminal_liability_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - citizen_criminal_liability_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - citizen_criminal_liability_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - citizen_criminal_liability_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - citizen_criminal_liability_fz53_flow5.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - Abort workflow - Y - N - N - - - branching_citizen_criminal_liability_fz53.hpl - Simple citizen_criminal_liability_fz53 WHERE ERROR - Y - N - Y - - - branching_citizen_criminal_liability_fz53.hpl - Simple citizen_criminal_liability_fz53 WHERE SUCCESS - Y - N - Y - - - recruitment_rows_five_flow_if_error.hpl - Abort workflow 2 - Y - N - N - - - Start - check_if_job_citizen_criminal_liability_fz53_exists.hpl - Y - Y - Y - - - check_if_job_citizen_criminal_liability_fz53_exists.hpl - Simple job_citizen_criminal_liability_fz53_exists check NEW - Y - Y - N - - - citizen_criminal_liability_fz53_flow1.hpl - change_status_citizen_criminal_liability_fz53_flow1_success.hpl - Y - Y - N - - - citizen_criminal_liability_fz53_flow1.hpl - change_status_citizen_criminal_liability_fz53_flow1_error.hpl - Y - N - N - - - citizen_criminal_liability_fz53_flow2.hpl - change_status_citizen_criminal_liability_fz53_flow2_success.hpl - Y - Y - N - - - citizen_criminal_liability_fz53_flow2.hpl - change_status_citizen_criminal_liability_fz53_flow2_error.hpl - Y - N - N - - - citizen_criminal_liability_fz53_flow3.hpl - change_status_citizen_criminal_liability_fz53_flow3_success.hpl - Y - Y - N - - - citizen_criminal_liability_fz53_flow3.hpl - change_status_citizen_criminal_liability_fz53_flow3_error.hpl - Y - N - N - - - citizen_criminal_liability_fz53_flow4.hpl - change_status_citizen_criminal_liability_fz53_flow4_success.hpl - Y - Y - N - - - citizen_criminal_liability_fz53_flow4.hpl - change_status_citizen_criminal_liability_fz53_flow4_error.hpl - Y - N - N - - - citizen_criminal_liability_fz53_flow5.hpl - change_status_citizen_criminal_liability_fz53_flow5_success.hpl - Y - Y - N - - - citizen_criminal_liability_fz53_flow5.hpl - change_status_citizen_criminal_liability_fz53_flow5_error.hpl - Y - N - N - - - change_status_citizen_criminal_liability_fz53_flow5_error.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow5_success.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow4_error.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow4_success.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow3_error.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow3_success.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow2_error.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow2_success.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow1_error.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow1_success.hpl - checkpoint_job_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - checkpoint_job_citizen_criminal_liability_fz53.hpl - Success new citizen_criminal_liability_fz53 - Y - Y - N - - - checkpoint_job_citizen_criminal_liability_fz53.hpl (2) - branching_citizen_criminal_liability_fz53.hpl - Y - N - Y - - - Simple job_citizen_criminal_liability_fz53_exists check NEW - checkpoint_job_citizen_criminal_liability_fz53.hpl (2) - Y - N - N - - - delta_citizen_criminal_liability_fz53_flow1.hpl - change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl - Y - Y - N - - - delta_citizen_criminal_liability_fz53_flow1.hpl - change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - change_status_to_processing.hpl - Y - Y - N - - - Simple job_citizen_criminal_liability_fz53_exists check NEW - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - change_status_to_processing.hpl (2) - Y - Y - N - - - Simple citizen_criminal_liability_fz53 WHERE ERROR - recruitment_rows_five_flow_if_error.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - delta_citizen_criminal_liability_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - change_status_to_processing_delta.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - Abort workflow 2 2 - Y - N - N - - - delta_citizen_criminal_liability_fz53_flow2.hpl - change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl - Y - Y - N - - - delta_citizen_criminal_liability_fz53_flow2.hpl - change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl - Y - N - N - - - delta_citizen_criminal_liability_fz53_flow3.hpl - change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl - Y - Y - N - - - delta_citizen_criminal_liability_fz53_flow3.hpl - change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl - Y - N - N - - - delta_citizen_criminal_liability_fz53_flow4.hpl - change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl - Y - Y - N - - - delta_citizen_criminal_liability_fz53_flow4.hpl - change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl - Y - N - N - - - delta_citizen_criminal_liability_fz53_flow5.hpl - change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl - Y - Y - N - - - delta_citizen_criminal_liability_fz53_flow5.hpl - change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - delta_citizen_criminal_liability_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - delta_citizen_criminal_liability_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - delta_citizen_criminal_liability_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - delta_citizen_criminal_liability_fz53_flow5.hpl - Y - Y - N - - - Simple citizen_criminal_liability_fz53 WHERE SUCCESS - branching_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - Simple delta_citizen_criminal_liability_fz53 WHERE ERROR - delta_citizen_criminal_liability_fz53 success - Y - N - N - - - branching_citizen_criminal_liability_fz53_delta.hpl - Simple delta_citizen_criminal_liability_fz53 WHERE ERROR - Y - Y - N - - - Simple delta_citizen_criminal_liability_fz53 WHERE ERROR - recruitment_rows_five_flow_citizen_criminal_liability_fz53.hpl (2) - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow1_success.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow3_success.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow2_error.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow2_success.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow1_error.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow3_error.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow4_success.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow4_error.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow5_success.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_criminal_liability_fz53_flow5_error.hpl - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Y - Y - N - - - checkpoint_job_citizen_criminal_liability_fz53_delta.hpl - Success delta_citizen_criminal_liability_fz53 - Y - Y - N - - - citizen_criminal_liability_fz53_flow1.hpl 2 - change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 - Y - Y - N - - - citizen_criminal_liability_fz53_flow1.hpl 2 - change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 - Y - N - N - - - citizen_criminal_liability_fz53_flow2.hpl 2 - change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 - Y - Y - N - - - citizen_criminal_liability_fz53_flow2.hpl 2 - change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 - Y - N - N - - - citizen_criminal_liability_fz53_flow3.hpl 2 - change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 - Y - Y - N - - - citizen_criminal_liability_fz53_flow3.hpl 2 - change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 - Y - N - N - - - citizen_criminal_liability_fz53_flow4.hpl 2 - change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 - Y - Y - N - - - citizen_criminal_liability_fz53_flow4.hpl 2 - change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 - Y - N - N - - - citizen_criminal_liability_fz53_flow5.hpl 2 - change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 - Y - Y - N - - - citizen_criminal_liability_fz53_flow5.hpl 2 - change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 - Y - N - N - - - change_status_citizen_criminal_liability_fz53_flow1_success.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow1_error.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow2_success.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow2_error.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow3_success.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow3_error.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow4_success.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow4_error.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow5_success.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_criminal_liability_fz53_flow5_error.hpl 2 - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Y - N - Y - - - checkpoint_job_citizen_criminal_liability_fz53.hpl 2 - Success citizen_criminal_liability_fz53 after error - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_criminal_liability_fz53_flow3.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_criminal_liability_fz53_flow2.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_criminal_liability_fz53_flow1.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_criminal_liability_fz53_flow4.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_criminal_liability_fz53_flow5.hpl 2 - Y - Y - N - - - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 72 - 1088 - 176 - 0001-01-01 00:00:00 - -3001-01-01 00:00:00 - - 114 - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl new file mode 100644 index 0000000..175910a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl @@ -0,0 +1,407 @@ + + + + citizen_criminal_liability_fz53_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + i.hidden + --has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + case_number_before + case_number_before + + + date_initiation + date_initiation + + + body_initiated + body_initiated + + + case_number + case_number + + + sentence_date + sentence_date + + + court_decision + court_decision + + + type_punishment + type_punishment + + + decision_reason + decision_reason + + + hidden + hidden + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_criminal_liability_fz53
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl deleted file mode 100644 index 7593fb2..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow1.hpl +++ /dev/null @@ -1,183 +0,0 @@ - - - - citizen_criminal_liability_fz53_flow1 - Y - - - - Normal - 0 - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - - = - created_at - created_at - - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 880 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 448 - 288 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl deleted file mode 100644 index 29c6100..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow2.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - citizen_criminal_liability_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 880 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 448 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl deleted file mode 100644 index 17ccb53..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow3.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - citizen_criminal_liability_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 1120 - 384 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 688 - 384 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl deleted file mode 100644 index 67ebd63..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow4.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - citizen_criminal_liability_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 1104 - 416 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 672 - 416 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl deleted file mode 100644 index 811495c..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow5.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - citizen_criminal_liability_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 944 - 384 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 512 - 384 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl new file mode 100644 index 0000000..933a736 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl @@ -0,0 +1,422 @@ + + + + citizen_criminal_liability_fz53_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + hidden + hidden + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + i.hidden + --has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND i.updated_at >= '${M_R_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at) + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl new file mode 100644 index 0000000..6edf97e --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl @@ -0,0 +1,437 @@ + + + + citizen_criminal_liability_fz53_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_criminal_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + sentence_date + sentence_date + Y + + + court_decision + court_decision + Y + + + type_punishment + type_punishment + Y + + + decision_reason + decision_reason + Y + + + hidden + hidden + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + --, -- сведения о факте уголовного преследования + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело + i.decision_number AS case_number, -- номер уголовного дела (судебный) + i.decision_date AS sentence_date, -- дата приговора + i.extra_info->>'court' AS court_decision, -- суд вынесший приговор + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' + WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' + WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' + WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' + ELSE NULL + END AS type_punishment, -- вид наказания + CASE + WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' + WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' + ELSE null + END AS decision_reason, -- Причины уголовного наказания в связи с фз53 + i.hidden + --has_criminal_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl deleted file mode 100644 index bd7d195..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow1.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - delta_citizen_criminal_liability_fz53_flow1 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 928 - 336 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 496 - 336 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl deleted file mode 100644 index eb09efe..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow2.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - delta_citizen_criminal_liability_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 1040 - 384 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 608 - 384 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl deleted file mode 100644 index 1fa9fe1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow3.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - delta_citizen_criminal_liability_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 1056 - 224 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 624 - 224 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl deleted file mode 100644 index f15f7f6..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow4.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - delta_citizen_criminal_liability_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 960 - 416 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 528 - 416 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl deleted file mode 100644 index 99a4d0a..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/delta_citizen_criminal_liability_fz53_flow5.hpl +++ /dev/null @@ -1,180 +0,0 @@ - - - - delta_citizen_criminal_liability_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_criminal_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - sentence_date - sentence_date - Y - - - court_decision - court_decision - Y - - - type_punishment - type_punishment - Y - - - decision_reason - decision_reason - Y - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - Y - -
- N - - - 1184 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - --, -- сведения о факте уголовного преследования - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер уголовного дела (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения уголовного дела - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший уголовное дело - i.decision_number AS case_number, -- номер уголовного дела (судебный) - i.decision_date AS sentence_date, -- дата приговора - i.extra_info->>'court' AS court_decision, -- суд вынесший приговор - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Штраф' - WHEN i.extra_info->>'punishment' = '2' THEN 'Обязательные работы' - WHEN i.extra_info->>'punishment' = '3' THEN 'Арест' - WHEN i.extra_info->>'punishment' = '4' THEN 'Лишение свободы на определенный срок' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.decision_reason = '1' THEN 'Уклонение от призыва на военную службу' - WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' - ELSE null - END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_criminal_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE --hidden IS FALSE AND - i.type = 'CRIMINAL' - Y - - - 752 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..e4d32f9 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + citizen_criminal_liability_fz53_flow_delta.hpl + Y + + + Table input + citizen_criminal_liability_fz53_flow_delta.hpl 2 + Y + + + Table input + citizen_criminal_liability_fz53_flow_delta.hpl 3 + Y + + + Table input + citizen_criminal_liability_fz53_flow_delta.hpl 4 + Y + + + Table input + citizen_criminal_liability_fz53_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_criminal_liability_fz53_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + citizen_criminal_liability_fz53_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 128 + + + + citizen_criminal_liability_fz53_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 208 + + + + citizen_criminal_liability_fz53_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 288 + + + + citizen_criminal_liability_fz53_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 368 + + + + citizen_criminal_liability_fz53_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..d7bd8bb --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + citizen_criminal_liability_fz53_flow_repeat.hpl + Y + + + Table input + citizen_criminal_liability_fz53_flow_repeat.hpl 2 + Y + + + Table input + citizen_criminal_liability_fz53_flow_repeat.hpl 3 + Y + + + Table input + citizen_criminal_liability_fz53_flow_repeat.hpl 4 + Y + + + Table input + citizen_criminal_liability_fz53_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_criminal_liability_fz53_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + citizen_criminal_liability_fz53_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 496 + 208 + + + + citizen_criminal_liability_fz53_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 496 + 288 + + + + citizen_criminal_liability_fz53_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 496 + 368 + + + + citizen_criminal_liability_fz53_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 496 + 448 + + + + citizen_criminal_liability_fz53_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 496 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl deleted file mode 100644 index b7e3e03..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitment_rows_five_flow_if_error.hpl +++ /dev/null @@ -1,185 +0,0 @@ - - - - recruitment_rows_five_flow_if_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/23 14:28:22.572 - - - 2025/05/23 14:28:22.572 - - - - - - Table input - Copy rows to result - Y - - - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 880 - 288 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -fr_check AS ( - SELECT - last_recruitment_id AS recruitment_id, - recruitment_created_date, - status, - job_name - FROM public.etl_checkpoints - WHERE status = 'ERROR' AND job_name IN ('citizen_criminal_liability_fz53_flow1', 'citizen_criminal_liability_fz53_flow2', 'citizen_criminal_liability_fz53_flow3', 'citizen_criminal_liability_fz53_flow4', 'citizen_criminal_liability_fz53_flow5') -), -ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, - ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position - FROM ordered -), -pivoted AS ( - SELECT - position, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN created_at END) AS cr_flow1, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN created_at END) AS cr_flow2, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN created_at END) AS cr_flow3, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN created_at END) AS cr_flow4, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN created_at END) AS cr_flow5, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_criminal_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5 - FROM splitted - GROUP BY position -), -remains as ( - SELECT - position, - cr_flow1, - idm_flow1::uuid, - cr_flow2, - idm_flow2::uuid, - cr_flow3, - idm_flow3::uuid, - cr_flow4, - idm_flow4::uuid, - cr_flow5, - idm_flow5::uuid - FROM pivoted - WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) - OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) - OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) - OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) - OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) - order by position -), -idm1 as ( - select - cr_flow1, - idm_flow1 - from remains - where cr_flow1 is not null and idm_flow1 is not null -), -idm2 as ( - select - cr_flow2, - idm_flow2 - from remains - where cr_flow2 is not null and idm_flow2 is not null -), -idm3 as ( - select - cr_flow3, - idm_flow3 - from remains - where cr_flow3 is not null and idm_flow3 is not null -), -idm4 as ( - select - cr_flow4, - idm_flow4 - from remains - where cr_flow4 is not null and idm_flow4 is not null -), -idm5 as ( - select - cr_flow5, - idm_flow5 - from remains - where cr_flow5 is not null and idm_flow5 is not null -) -select - i1.*, - i2.*, - i3.*, - i4.*, - i5.* -FROM - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn -ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) -limit 2 - N - - - 512 - 288 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitments_five_flow.hpl new file mode 100644 index 0000000..eef528e --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + citizen_criminal_liability_fz53_flow.hpl + Y + + + Get all recruitments ordered by created_date + citizen_criminal_liability_fz53_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + citizen_criminal_liability_fz53_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + citizen_criminal_liability_fz53_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + citizen_criminal_liability_fz53_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + citizen_criminal_liability_fz53_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 144 + + + + citizen_criminal_liability_fz53_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 224 + + + + citizen_criminal_liability_fz53_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 304 + + + + citizen_criminal_liability_fz53_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 384 + + + + citizen_criminal_liability_fz53_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_criminal_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl deleted file mode 100644 index 8ad6911..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl +++ /dev/null @@ -1,124 +0,0 @@ - - - - branching_citizen_liability_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - select - status as STATUS, - job_name AS PIPELINE -from public.etl_checkpoints -where job_name = 'job_citizen_liability_fz53' - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl deleted file mode 100644 index 45f831f..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - branching_citizen_liability_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_citizen_liability_fz53_delta') AS PIPELINE, - COALESCE(status, 'ERROR') AS STATUS, - current_timestamp::timestamp as record_created -FROM ( - select - CASE - WHEN status = 'PROCESSING' THEN 'ERROR' - ELSE status - END AS status, - job_name - from public.etl_checkpoints - where job_name = 'job_citizen_liability_fz53_delta' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_liability_fz53_delta' - ) -) t - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/check_if_need_to_repeat_job.hpl similarity index 56% rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl rename to mappings/info_recruits/citizen_tables/citizen_liability_fz53/check_if_need_to_repeat_job.hpl index 13ffe89..657e764 100644 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/check_if_need_to_repeat_job.hpl @@ -1,7 +1,7 @@ - change_status_delta_snils_inn_flow4_error + check_if_need_to_repeat_job Y @@ -13,22 +13,22 @@ 1000 100 - - 2025/06/16 12:20:06.191 + 2025/08/08 12:27:51.630 - - 2025/06/16 12:20:06.191 + 2025/08/08 12:27:51.630 Table input - Insert / update + Set variables Y - Insert / update - InsertUpdate + Set variables + SetVariable Y @@ -37,37 +37,18 @@ none - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y - 1152 - 304 + 624 + 288
@@ -84,15 +65,19 @@ ervu-dashboard N 0 - SELECT - 'delta_snils_inn_flow4' as job_name, - 'ERROR' as status, - current_timestamp as record_created + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_liability_fz53_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; N - 784 - 304 + 336 + 288 diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl deleted file mode 100644 index 51525dd..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_liability_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl deleted file mode 100644 index 516b012..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'citizen_liability_fz53_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl deleted file mode 100644 index 5765a9e..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl deleted file mode 100644 index f68afc4..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl deleted file mode 100644 index 4436574..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl deleted file mode 100644 index 8988f0c..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl deleted file mode 100644 index 3f3c5b7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl deleted file mode 100644 index 8e16f42..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl deleted file mode 100644 index 8b54d7e..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl deleted file mode 100644 index ba11212..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_citizen_liability_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_liability_fz53 ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'citizen_liability_fz53_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl deleted file mode 100644 index 84f72b4..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow1' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl deleted file mode 100644 index 81381cb..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow1' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl deleted file mode 100644 index 543c8ef..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow2' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl deleted file mode 100644 index 24c35d7..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow2' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl deleted file mode 100644 index 4fd1742..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow3' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl deleted file mode 100644 index 463529d..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow3' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl deleted file mode 100644 index 2c43fdf..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow4' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl deleted file mode 100644 index 4e3ac61..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow4' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl deleted file mode 100644 index 87c2807..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow5' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl deleted file mode 100644 index befcfd5..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_citizen_liability_fz53_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_citizen_liability_fz53_flow5' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl deleted file mode 100644 index 688659d..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - change_status_to_processing - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 16:14:31.162 - - - 2025/06/11 16:14:31.162 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 784 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'job_citizen_liability_fz53' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_liability_fz53_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_liability_fz53_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_liability_fz53_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_liability_fz53_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'citizen_liability_fz53_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 368 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl deleted file mode 100644 index 46b50cc..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_to_processing_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 13:42:26.494 - - - 2025/06/16 13:42:26.494 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1248 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'delta_citizen_liability_fz53' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 832 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl similarity index 68% rename from mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl rename to mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl index c8d9198..10715f1 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_job_citizen_criminal_liability_fz53_exists.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl @@ -1,7 +1,7 @@ - check_if_job_citizen_criminal_liability_fz53_exists + check_if_citizen_liability_fz53_job_exists Y @@ -13,23 +13,23 @@ 1000 100 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - Table input - Set variables - Y - Set variables Write to log N + + Table input + Set variables + Y + Set variables @@ -44,21 +44,16 @@ - job_name - PIPE - PARENT_WORKFLOW - - - status - STATUS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW Y - 688 - 352 + 672 + 336 @@ -75,29 +70,17 @@ ervu-dashboard N 0 - SELECT - COALESCE(job_name, 'job_citizen_criminal_liability_fz53') AS job_name, - COALESCE(status, 'NEW') AS status, - current_timestamp::timestamp as record_created -FROM ( - SELECT job_name, status - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_criminal_liability_fz53' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_criminal_liability_fz53' - ) -) t + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'recruits_info_job' + limit 1 + ) AS job_executed_flag; N - 400 - 352 + 384 + 336 @@ -120,8 +103,8 @@ FROM ( ${STATUS} - 960 - 240 + 944 + 224 diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl deleted file mode 100644 index 0d9cb80..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_citizen_liability_fz53_error.hpl +++ /dev/null @@ -1,273 +0,0 @@ - - - - checkpoint_snils_inn_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 10:01:04.895 - - - 2025/06/09 10:01:04.895 - - - - - - Select values - Table output - N - - - Table input - Select values - N - - - Table input - Table output - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - N - - idm_id - idm_id - String - -2 - -2 - - false - - - false - - - - - - - - - - 1008 - 608 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - FROM result_ma -), -for_checkpoints as ( - SELECT - 'job_child_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -) -select * from for_checkpoints - N - - - 736 - 448 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - N - N - N - N - Y - N - public - N - etl_checkpoints
- N - Y - N - Y - - - 1248 - 448 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl deleted file mode 100644 index a261d64..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_liability_fz53 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'citizen_liability_fz53_flow1', - 'citizen_liability_fz53_flow2', - 'citizen_liability_fz53_flow3', - 'citizen_liability_fz53_flow4', - 'citizen_liability_fz53_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'citizen_liability_fz53_flow1', - 'citizen_liability_fz53_flow2', - 'citizen_liability_fz53_flow3', - 'citizen_liability_fz53_flow4', - 'citizen_liability_fz53_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_citizen_liability_fz53' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl deleted file mode 100644 index e5f3aa0..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_citizen_liability_fz53_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'delta_citizen_liability_fz53_flow1', - 'delta_citizen_liability_fz53_flow2', - 'delta_citizen_liability_fz53_flow3', - 'delta_citizen_liability_fz53_flow4', - 'delta_citizen_liability_fz53_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'delta_citizen_liability_fz53_flow1', - 'delta_citizen_liability_fz53_flow2', - 'delta_citizen_liability_fz53_flow3', - 'delta_citizen_liability_fz53_flow4', - 'delta_citizen_liability_fz53_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_citizen_liability_fz53_delta' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf new file mode 100644 index 0000000..920fc8d --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf @@ -0,0 +1,358 @@ + + + citizen_liability_fz53_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 192 + 304 + + + + check_if_citizen_liability_fz53_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + citizen_liability_fz53_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 752 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1024 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 992 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 752 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 800 + + + + + + Start + check_if_citizen_liability_fz53_job_exists.hpl + Y + Y + Y + + + check_if_citizen_liability_fz53_job_exists.hpl + citizen_liability_fz53_job_exists_check + Y + Y + N + + + citizen_liability_fz53_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + citizen_liability_fz53_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 672 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + recruits_info_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf deleted file mode 100644 index b6fe762..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/job_citizen_liability_fz53.hwf +++ /dev/null @@ -1,2480 +0,0 @@ - - - job_citizen_liability_fz53 - Y - - - - 0 - - - 2025/06/05 14:27:15.055 - - - 2025/06/05 14:27:15.055 - - - M_R_CR_DATE - 3001-01-01 00:00:00 - - - - M_R_UP_DATE - - - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 368 - 400 - - - - checkpoint_job_citizen_liability_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1136 - 1280 - - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2352 - 400 - - - - citizen_liability_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2672 - 80 - - - - citizen_liability_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2672 - 240 - - - - citizen_liability_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2672 - 400 - - - - citizen_liability_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2672 - 560 - - - - citizen_liability_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2672 - 720 - - - - Abort workflow - - ABORT - - N - N - 2336 - 208 - - - - Success new citizen_liability_fz53 - - SUCCESS - - N - 3728 - 432 - - - - branching_citizen_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 1536 - 1280 - - - - Simple citizen_liability_fz53 WHERE SUCCESS - - SIMPLE_EVAL - - SUCCESS - string - true - equal - equal - N - variable - STATUS - N - 1584 - 1680 - - - - Simple citizen_liability_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1840 - 1280 - - - - recruitment_rows_five_flow_if_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2384 - 1280 - - - - Abort workflow 2 - - ABORT - - N - N - 2320 - 1040 - - - - delta_citizen_liability_fz53_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2640 - 1792 - - - - check_if_job_citizen_liability_fz53_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_job_citizen_liability_fz53_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 576 - 400 - - - - Simple job_citizen_liability_fz53_exists check NEW - - SIMPLE_EVAL - - NEW - string - true - equal - equal - N - variable - STATUS - N - 896 - 400 - - - - change_status_to_processing.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2368 - 560 - - - - change_status_citizen_liability_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 80 - - - - change_status_citizen_liability_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 160 - - - - change_status_citizen_liability_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 240 - - - - change_status_citizen_liability_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 320 - - - - change_status_citizen_liability_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 400 - - - - change_status_citizen_liability_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 480 - - - - change_status_citizen_liability_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 560 - - - - change_status_citizen_liability_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 640 - - - - change_status_citizen_liability_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 720 - - - - change_status_citizen_liability_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 800 - - - - checkpoint_job_citizen_liability_fz53.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 3456 - 432 - - - - change_status_to_processing.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2288 - 1424 - - - - change_status_to_processing_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_to_processing_delta.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2384 - 2304 - - - - change_status_delta_citizen_liability_fz53_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1792 - - - - change_status_delta_citizen_liability_fz53_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1872 - - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2320 - 2112 - - - - Abort workflow 2 2 - - ABORT - - N - N - 2336 - 1952 - - - - delta_citizen_liability_fz53_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2640 - 1952 - - - - change_status_delta_citizen_liability_fz53_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1952 - - - - change_status_delta_citizen_liability_fz53_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2032 - - - - delta_citizen_liability_fz53_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2640 - 2112 - - - - change_status_delta_citizen_liability_fz53_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2112 - - - - change_status_delta_citizen_liability_fz53_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2192 - - - - delta_citizen_liability_fz53_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2640 - 2272 - - - - change_status_delta_citizen_liability_fz53_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2272 - - - - change_status_delta_citizen_liability_fz53_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2352 - - - - delta_citizen_liability_fz53_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl - Basic - - - M_R_UP_DATE - ${M_R_UP_DATE} - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2640 - 2432 - - - - change_status_delta_citizen_liability_fz53_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2432 - - - - change_status_delta_citizen_liability_fz53_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_delta_citizen_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2512 - - - - branching_citizen_liability_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/branching_citizen_liability_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1616 - 2112 - - - - Simple delta_citizen_liability_fz53 WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1936 - 2112 - - - - delta_citizen_liability_fz53 success - - SUCCESS - - N - 2160 - 1952 - - - - checkpoint_job_citizen_liability_fz53_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 3440 - 2112 - - - - Success delta_citizen_liability_fz53 - - SUCCESS - - N - 3728 - 2112 - - - - citizen_liability_fz53_flow1.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2672 - 960 - - - - citizen_liability_fz53_flow2.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2672 - 1120 - - - - citizen_liability_fz53_flow3.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2672 - 1280 - - - - citizen_liability_fz53_flow4.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2672 - 1440 - - - - citizen_liability_fz53_flow5.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2672 - 1600 - - - - Success citizen_liability_fz53 after error - - SUCCESS - - N - 3728 - 1312 - - - - change_status_citizen_liability_fz53_flow1_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 960 - - - - change_status_citizen_liability_fz53_flow1_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1040 - - - - change_status_citizen_liability_fz53_flow2_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1120 - - - - change_status_citizen_liability_fz53_flow2_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1200 - - - - change_status_citizen_liability_fz53_flow3_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1280 - - - - change_status_citizen_liability_fz53_flow3_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1360 - - - - change_status_citizen_liability_fz53_flow4_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1440 - - - - change_status_citizen_liability_fz53_flow4_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1520 - - - - change_status_citizen_liability_fz53_flow5_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1600 - - - - change_status_citizen_liability_fz53_flow5_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/change_status_citizen_liability_fz53_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1680 - - - - checkpoint_job_citizen_liability_fz53.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/checkpoint_job_citizen_liability_fz53.hpl - Basic - - Y - - N - local - N - N - Y - N - 3456 - 1312 - - - - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - citizen_liability_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - citizen_liability_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - citizen_liability_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - citizen_liability_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - citizen_liability_fz53_flow5.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - Abort workflow - Y - N - N - - - branching_citizen_liability_fz53.hpl - Simple citizen_liability_fz53 WHERE ERROR - Y - N - Y - - - branching_citizen_liability_fz53.hpl - Simple citizen_liability_fz53 WHERE SUCCESS - Y - N - Y - - - recruitment_rows_five_flow_if_error.hpl - Abort workflow 2 - Y - N - N - - - Start - check_if_job_citizen_liability_fz53_exists.hpl - Y - Y - Y - - - check_if_job_citizen_liability_fz53_exists.hpl - Simple job_citizen_liability_fz53_exists check NEW - Y - Y - N - - - citizen_liability_fz53_flow1.hpl - change_status_citizen_liability_fz53_flow1_success.hpl - Y - Y - N - - - citizen_liability_fz53_flow1.hpl - change_status_citizen_liability_fz53_flow1_error.hpl - Y - N - N - - - citizen_liability_fz53_flow2.hpl - change_status_citizen_liability_fz53_flow2_success.hpl - Y - Y - N - - - citizen_liability_fz53_flow2.hpl - change_status_citizen_liability_fz53_flow2_error.hpl - Y - N - N - - - citizen_liability_fz53_flow3.hpl - change_status_citizen_liability_fz53_flow3_success.hpl - Y - Y - N - - - citizen_liability_fz53_flow3.hpl - change_status_citizen_liability_fz53_flow3_error.hpl - Y - N - N - - - citizen_liability_fz53_flow4.hpl - change_status_citizen_liability_fz53_flow4_success.hpl - Y - Y - N - - - citizen_liability_fz53_flow4.hpl - change_status_citizen_liability_fz53_flow4_error.hpl - Y - N - N - - - citizen_liability_fz53_flow5.hpl - change_status_citizen_liability_fz53_flow5_success.hpl - Y - Y - N - - - citizen_liability_fz53_flow5.hpl - change_status_citizen_liability_fz53_flow5_error.hpl - Y - N - N - - - change_status_citizen_liability_fz53_flow5_error.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow5_success.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow4_error.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow4_success.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow3_error.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow3_success.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow2_error.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow2_success.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow1_error.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - change_status_citizen_liability_fz53_flow1_success.hpl - checkpoint_job_citizen_liability_fz53.hpl - Y - N - Y - - - checkpoint_job_citizen_liability_fz53.hpl - Success new citizen_liability_fz53 - Y - Y - N - - - checkpoint_job_citizen_liability_fz53.hpl (2) - branching_citizen_liability_fz53.hpl - Y - N - Y - - - Simple job_citizen_liability_fz53_exists check NEW - checkpoint_job_citizen_liability_fz53.hpl (2) - Y - N - N - - - delta_citizen_liability_fz53_flow1.hpl - change_status_delta_citizen_liability_fz53_flow1_success.hpl - Y - Y - N - - - delta_citizen_liability_fz53_flow1.hpl - change_status_delta_citizen_liability_fz53_flow1_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl - change_status_to_processing.hpl - Y - Y - N - - - Simple job_citizen_liability_fz53_exists check NEW - recruitment_rows_five_flow_citizen_liability_fz53.hpl - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - change_status_to_processing.hpl (2) - Y - Y - N - - - Simple citizen_liability_fz53 WHERE ERROR - recruitment_rows_five_flow_if_error.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - delta_citizen_liability_fz53_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - change_status_to_processing_delta.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - Abort workflow 2 2 - Y - N - N - - - delta_citizen_liability_fz53_flow2.hpl - change_status_delta_citizen_liability_fz53_flow2_success.hpl - Y - Y - N - - - delta_citizen_liability_fz53_flow2.hpl - change_status_delta_citizen_liability_fz53_flow2_error.hpl - Y - N - N - - - delta_citizen_liability_fz53_flow3.hpl - change_status_delta_citizen_liability_fz53_flow3_success.hpl - Y - Y - N - - - delta_citizen_liability_fz53_flow3.hpl - change_status_delta_citizen_liability_fz53_flow3_error.hpl - Y - N - N - - - delta_citizen_liability_fz53_flow4.hpl - change_status_delta_citizen_liability_fz53_flow4_success.hpl - Y - Y - N - - - delta_citizen_liability_fz53_flow4.hpl - change_status_delta_citizen_liability_fz53_flow4_error.hpl - Y - N - N - - - delta_citizen_liability_fz53_flow5.hpl - change_status_delta_citizen_liability_fz53_flow5_success.hpl - Y - Y - N - - - delta_citizen_liability_fz53_flow5.hpl - change_status_delta_citizen_liability_fz53_flow5_error.hpl - Y - N - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - delta_citizen_liability_fz53_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - delta_citizen_liability_fz53_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - delta_citizen_liability_fz53_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - delta_citizen_liability_fz53_flow5.hpl - Y - Y - N - - - Simple citizen_liability_fz53 WHERE SUCCESS - branching_citizen_liability_fz53_delta.hpl - Y - Y - N - - - Simple delta_citizen_liability_fz53 WHERE ERROR - delta_citizen_liability_fz53 success - Y - N - N - - - branching_citizen_liability_fz53_delta.hpl - Simple delta_citizen_liability_fz53 WHERE ERROR - Y - Y - N - - - Simple delta_citizen_liability_fz53 WHERE ERROR - recruitment_rows_five_flow_citizen_liability_fz53.hpl (2) - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow1_success.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow3_success.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow2_error.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow2_success.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow1_error.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow3_error.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow4_success.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow4_error.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow5_success.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - change_status_delta_citizen_liability_fz53_flow5_error.hpl - checkpoint_job_citizen_liability_fz53_delta.hpl - Y - Y - N - - - checkpoint_job_citizen_liability_fz53_delta.hpl - Success delta_citizen_liability_fz53 - Y - Y - N - - - citizen_liability_fz53_flow1.hpl 2 - change_status_citizen_liability_fz53_flow1_success.hpl 2 - Y - Y - N - - - citizen_liability_fz53_flow1.hpl 2 - change_status_citizen_liability_fz53_flow1_error.hpl 2 - Y - N - N - - - citizen_liability_fz53_flow2.hpl 2 - change_status_citizen_liability_fz53_flow2_success.hpl 2 - Y - Y - N - - - citizen_liability_fz53_flow2.hpl 2 - change_status_citizen_liability_fz53_flow2_error.hpl 2 - Y - N - N - - - citizen_liability_fz53_flow3.hpl 2 - change_status_citizen_liability_fz53_flow3_success.hpl 2 - Y - Y - N - - - citizen_liability_fz53_flow3.hpl 2 - change_status_citizen_liability_fz53_flow3_error.hpl 2 - Y - N - N - - - citizen_liability_fz53_flow4.hpl 2 - change_status_citizen_liability_fz53_flow4_success.hpl 2 - Y - Y - N - - - citizen_liability_fz53_flow4.hpl 2 - change_status_citizen_liability_fz53_flow4_error.hpl 2 - Y - N - N - - - citizen_liability_fz53_flow5.hpl 2 - change_status_citizen_liability_fz53_flow5_success.hpl 2 - Y - Y - N - - - citizen_liability_fz53_flow5.hpl 2 - change_status_citizen_liability_fz53_flow5_error.hpl 2 - Y - N - N - - - change_status_citizen_liability_fz53_flow1_success.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow1_error.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow2_success.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow2_error.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow3_success.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow3_error.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow4_success.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow4_error.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow5_success.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - change_status_citizen_liability_fz53_flow5_error.hpl 2 - checkpoint_job_citizen_liability_fz53.hpl 2 - Y - N - Y - - - checkpoint_job_citizen_liability_fz53.hpl 2 - Success citizen_liability_fz53 after error - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_liability_fz53_flow3.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_liability_fz53_flow2.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_liability_fz53_flow1.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_liability_fz53_flow4.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - citizen_liability_fz53_flow5.hpl 2 - Y - Y - N - - - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 72 - 1088 - 176 - 0001-01-01 00:00:00 - -3001-01-01 00:00:00 - - 114 - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl new file mode 100644 index 0000000..c203dcb --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl @@ -0,0 +1,425 @@ + + + + citizen_liability_fz53_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + i.hidden + --has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + case_number_before + case_number_before + + + date_initiation + date_initiation + + + body_initiated + body_initiated + + + case_number + case_number + + + date_resolution + date_resolution + + + article_koap_rf + article_koap_rf + + + court_decision + court_decision + + + name_vc + name_vc + + + reason_use + reason_use + + + start_date + start_date + + + size_term_punishment + size_term_punishment + + + hidden + hidden + + + type_punishment + type_punishment + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_liability_fz53
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl deleted file mode 100644 index 61d564c..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow1.hpl +++ /dev/null @@ -1,205 +0,0 @@ - - - - citizen_liability_fz53_flow1 - Y - - - - Normal - 0 - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - - = - created_at - created_at - - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 880 - 288 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 448 - 288 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl deleted file mode 100644 index 1950156..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow2.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - citizen_liability_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 960 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 528 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl deleted file mode 100644 index cb454d6..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow3.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - citizen_liability_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1056 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 624 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl deleted file mode 100644 index 49a4f14..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow4.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - citizen_liability_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1008 - 384 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 576 - 384 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl deleted file mode 100644 index 88a3711..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow5.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - citizen_liability_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1072 - 368 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 640 - 368 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl new file mode 100644 index 0000000..8ccde59 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl @@ -0,0 +1,443 @@ + + + + citizen_liability_fz53_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + hidden + hidden + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + i.hidden + --has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND i.updated_at >= '${M_R_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at) + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl new file mode 100644 index 0000000..674370a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl @@ -0,0 +1,459 @@ + + + + citizen_liability_fz53_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + created_at + created_at + + ervu_dashboard + citizen_liability_fz53
+ + recruit_id + recruit_id + N + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + case_number_before + case_number_before + Y + + + date_initiation + date_initiation + Y + + + body_initiated + body_initiated + Y + + + case_number + case_number + Y + + + date_resolution + date_resolution + Y + + + article_koap_rf + article_koap_rf + Y + + + court_decision + court_decision + Y + + + name_vc + name_vc + Y + + + reason_use + reason_use + Y + + + start_date + start_date + Y + + + size_term_punishment + size_term_punishment + Y + + + type_punishment + type_punishment + Y + + + hidden + hidden + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.decision-document-service + N + + SELECT + i.recruit_id, + i.created_at, + i.updated_at, + i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) + i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении + i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении + i.decision_number AS case_number, -- номер дела об административном правонарушении + i.decision_date AS date_resolution, -- дата постановления + i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ + i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление + i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер + CASE + WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' + WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' + WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' + ELSE NULL + END AS reason_use, -- причина применения + i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера + i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания + CASE + WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' + WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' + ELSE NULL + END AS type_punishment, -- вид наказания + i.hidden + --has_liability_fz53 +FROM public.infringement i +JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты +WHERE -- hidden IS FALSE AND + type = 'ADMINISTRATIVE' + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl deleted file mode 100644 index d336de5..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow1.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_citizen_liability_fz53_flow1 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1168 - 336 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F1}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 736 - 336 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl deleted file mode 100644 index 15704f1..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow2.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_citizen_liability_fz53_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1056 - 240 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F2}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 624 - 240 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl deleted file mode 100644 index e1fe0b5..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow3.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_citizen_liability_fz53_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1152 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F3}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 720 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl deleted file mode 100644 index 19d16e5..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow4.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_citizen_liability_fz53_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1104 - 336 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F4}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 672 - 336 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl deleted file mode 100644 index f18a7f4..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/delta_citizen_liability_fz53_flow5.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_citizen_liability_fz53_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - = - created_at - created_at - - ervu_dashboard - citizen_liability_fz53
- - recruit_id - recruit_id - N - - - created_at - created_at - N - - - updated_at - updated_at - Y - - - case_number_before - case_number_before - Y - - - date_initiation - date_initiation - Y - - - body_initiated - body_initiated - Y - - - case_number - case_number - Y - - - date_resolution - date_resolution - Y - - - article_koap_rf - article_koap_rf - Y - - - court_decision - court_decision - Y - - - name_vc - name_vc - Y - - - reason_use - reason_use - Y - - - start_date - start_date - Y - - - size_term_punishment - size_term_punishment - Y - - - type_punishment - type_punishment - Y - - - has_liability_fz53 - has_liability_fz53 - Y - -
- N - - - 1184 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - postgres.decision-document-service - N - 0 - SELECT - i.recruit_id, - i.created_at, - i.updated_at, - i.extra_info->>'preTrialNumber' AS case_number_before, -- номер дела об административном правонарушении (досудебный) - i.extra_info->>'createInfringementDate' AS date_initiation, -- дата возбуждения дела об административном правонарушении - i.extra_info->>'organization' AS body_initiated, -- орган, возбудивший дело об административном правонарушении - i.decision_number AS case_number, -- номер дела об административном правонарушении - i.decision_date AS date_resolution, -- дата постановления - i.extra_info->>'reasonForAddEntry' AS article_koap_rf, -- пункт, часть, статья КоАП РФ - i.extra_info->>'court' AS court_decision, -- суд, вынесший постановление - i.extra_info->>'vkName' AS name_vc, -- военкомат, принявший решение о применении мер - CASE - WHEN i.decision_reason = '1' THEN 'Неисполнение гражданами обязанностей по воинскому учету' - WHEN i.decision_reason = '2' THEN 'Уклонение от медицинского обследования' - WHEN i.decision_reason = '3' THEN 'Умышленные порча или утрата документов воинского учета' - ELSE NULL - END AS reason_use, -- причина применения - i.extra_info->>'dateApplication' AS start_date, -- дата с которой наложена мера - i.extra_info->>'description' AS size_term_punishment, -- размер и срок наказания - CASE - WHEN i.extra_info->>'punishment' = '1' THEN 'Предупреждение' - WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' - ELSE NULL - END AS type_punishment, -- вид наказания - CASE - WHEN i.hidden is false THEN true - ELSE false - END AS has_liability_fz53 -FROM public.infringement i -JOIN public.recruit r ON r.id = i.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(r.current_recruitment, r.target_recruitment) = '${ID_F5}' - --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты -WHERE -- hidden IS FALSE AND - type = 'ADMINISTRATIVE' - Y - - - 752 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..64316a1 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + citizen_liability_fz53_flow_delta.hpl + Y + + + Table input + citizen_liability_fz53_flow_delta.hpl 2 + Y + + + Table input + citizen_liability_fz53_flow_delta.hpl 3 + Y + + + Table input + citizen_liability_fz53_flow_delta.hpl 4 + Y + + + Table input + citizen_liability_fz53_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_liability_fz53_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + citizen_liability_fz53_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 128 + + + + citizen_liability_fz53_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 208 + + + + citizen_liability_fz53_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 288 + + + + citizen_liability_fz53_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 368 + + + + citizen_liability_fz53_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..597384a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + citizen_liability_fz53_flow_repeat.hpl + Y + + + Table input + citizen_liability_fz53_flow_repeat.hpl 2 + Y + + + Table input + citizen_liability_fz53_flow_repeat.hpl 3 + Y + + + Table input + citizen_liability_fz53_flow_repeat.hpl 4 + Y + + + Table input + citizen_liability_fz53_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizen_liability_fz53_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + citizen_liability_fz53_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 208 + + + + citizen_liability_fz53_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 288 + + + + citizen_liability_fz53_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 368 + + + + citizen_liability_fz53_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 448 + + + + citizen_liability_fz53_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl deleted file mode 100644 index 92f9426..0000000 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitment_rows_five_flow_if_error.hpl +++ /dev/null @@ -1,185 +0,0 @@ - - - - recruitment_rows_five_flow_if_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/23 14:28:22.572 - - - 2025/05/23 14:28:22.572 - - - - - - Table input - Copy rows to result - Y - - - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 880 - 288 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -fr_check AS ( - SELECT - last_recruitment_id AS recruitment_id, - recruitment_created_date, - status, - job_name - FROM public.etl_checkpoints - WHERE status = 'ERROR' AND job_name IN ('citizen_liability_fz53_flow1', 'citizen_liability_fz53_flow2', 'citizen_liability_fz53_flow3', 'citizen_liability_fz53_flow4', 'citizen_liability_fz53_flow5') -), -ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, - ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position - FROM ordered -), -pivoted AS ( - SELECT - position, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN created_at END) AS cr_flow1, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow1') THEN idm_id::text END) AS idm_flow1, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN created_at END) AS cr_flow2, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow2') THEN idm_id::text END) AS idm_flow2, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN created_at END) AS cr_flow3, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow3') THEN idm_id::text END) AS idm_flow3, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN created_at END) AS cr_flow4, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow4') THEN idm_id::text END) AS idm_flow4, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN created_at END) AS cr_flow5, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_liability_fz53_flow5') THEN idm_id::text END) AS idm_flow5 - FROM splitted - GROUP BY position -), -remains as ( - SELECT - position, - cr_flow1, - idm_flow1::uuid, - cr_flow2, - idm_flow2::uuid, - cr_flow3, - idm_flow3::uuid, - cr_flow4, - idm_flow4::uuid, - cr_flow5, - idm_flow5::uuid - FROM pivoted - WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) - OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) - OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) - OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) - OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) - order by position -), -idm1 as ( - select - cr_flow1, - idm_flow1 - from remains - where cr_flow1 is not null and idm_flow1 is not null -), -idm2 as ( - select - cr_flow2, - idm_flow2 - from remains - where cr_flow2 is not null and idm_flow2 is not null -), -idm3 as ( - select - cr_flow3, - idm_flow3 - from remains - where cr_flow3 is not null and idm_flow3 is not null -), -idm4 as ( - select - cr_flow4, - idm_flow4 - from remains - where cr_flow4 is not null and idm_flow4 is not null -), -idm5 as ( - select - cr_flow5, - idm_flow5 - from remains - where cr_flow5 is not null and idm_flow5 is not null -) -select - i1.*, - i2.*, - i3.*, - i4.*, - i5.* -FROM - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn -ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) -limit 2 - N - - - 512 - 288 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitments_five_flow.hpl new file mode 100644 index 0000000..ccea1cd --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + citizen_liability_fz53_flow.hpl + Y + + + Get all recruitments ordered by created_date + citizen_liability_fz53_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + citizen_liability_fz53_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + citizen_liability_fz53_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + citizen_liability_fz53_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + citizen_liability_fz53_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 144 + + + + citizen_liability_fz53_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 224 + + + + citizen_liability_fz53_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 304 + + + + citizen_liability_fz53_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 384 + + + + citizen_liability_fz53_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizen_liability_fz53_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl deleted file mode 100644 index aacbef5..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl +++ /dev/null @@ -1,124 +0,0 @@ - - - - branching_snils_inn - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - select - status as STATUS, - job_name AS PIPELINE -from public.etl_checkpoints -where job_name = 'job_snils_inn' - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl deleted file mode 100644 index 0415b07..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - branching_snils_inn_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 09:54:43.724 - - - 2025/06/09 09:54:43.724 - - - - - - Set variables 2 - Write to log 2 - N - - - Table input - Set variables 2 - Y - - - - Set variables 2 - SetVariable - - Y - - 1 - - none - - - - - pipeline - PIPE - PARENT_WORKFLOW - - - status - STATUS - PARENT_WORKFLOW - - - Y - - - 1056 - 256 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - COALESCE(job_name, 'job_snils_inn_delta') AS PIPELINE, - COALESCE(status, 'ERROR') AS STATUS, - current_timestamp::timestamp as record_created -FROM ( - select - CASE - WHEN status = 'PROCESSING' THEN 'ERROR' - ELSE status - END AS status, - job_name - from public.etl_checkpoints - where job_name = 'job_snils_inn_delta' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_snils_inn_delta' - ) -) t - N - - - 816 - 256 - - - - Write to log 2 - WriteToLog - - Y - - 1 - - none - - - Y - - - pipeline - - - status - - - N - 0 - Basic - ${PIPE} -${STATUS} - - - 1280 - 256 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/check_if_need_to_repeat_job.hpl similarity index 56% rename from mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl rename to mappings/info_recruits/citizen_tables/snils_inn/check_if_need_to_repeat_job.hpl index 272ccc9..406fb97 100644 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl +++ b/mappings/info_recruits/citizen_tables/snils_inn/check_if_need_to_repeat_job.hpl @@ -1,7 +1,7 @@ - change_status_delta_snils_inn_flow1_error + check_if_need_to_repeat_job Y @@ -13,22 +13,22 @@ 1000 100 - - 2025/06/16 12:20:06.191 + 2025/08/08 12:27:51.630 - - 2025/06/16 12:20:06.191 + 2025/08/08 12:27:51.630 Table input - Insert / update + Set variables Y - Insert / update - InsertUpdate + Set variables + SetVariable Y @@ -37,37 +37,18 @@ none - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y - 1152 - 304 + 624 + 288
@@ -84,15 +65,19 @@ ervu-dashboard N 0 - SELECT - 'delta_snils_inn_flow1' as job_name, - 'ERROR' as status, - current_timestamp as record_created + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'recruits_info_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; N - 784 - 304 + 336 + 288 diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl deleted file mode 100644 index 60a3e53..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow1' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl deleted file mode 100644 index c2dbe25..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl +++ /dev/null @@ -1,102 +0,0 @@ - - - - change_status_delta_snils_inn_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow2' as job_name, - 'ERROR' as status, - current_timestamp as record_created - - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl deleted file mode 100644 index 549321d..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow2' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl deleted file mode 100644 index 681da71..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow3' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl deleted file mode 100644 index 2f7cad3..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow3' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl deleted file mode 100644 index 552dbf7..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow4' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl deleted file mode 100644 index 93465e3..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow5' as job_name, - 'ERROR' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl deleted file mode 100644 index c961ab0..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl +++ /dev/null @@ -1,101 +0,0 @@ - - - - change_status_delta_snils_inn_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 12:20:06.191 - - - 2025/06/16 12:20:06.191 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1152 - 304 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'delta_snils_inn_flow5' as job_name, - 'SUCCESS' as status, - current_timestamp as record_created - N - - - 784 - 304 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl deleted file mode 100644 index 5bfe2fe..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_snils_inn_flow1_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'snils_inn_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl deleted file mode 100644 index f6b19c4..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl +++ /dev/null @@ -1,250 +0,0 @@ - - - - change_status_snils_inn_flow1_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--, -/* - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, -/* - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( - SELECT - 'snils_inn_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl deleted file mode 100644 index 1c08c6d..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_snils_inn_flow2_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl deleted file mode 100644 index 5a31299..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl +++ /dev/null @@ -1,254 +0,0 @@ - - - - change_status_snils_inn_flow2_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - --MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - --(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--, -/* - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, -*/ - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2--, -/* - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl deleted file mode 100644 index 8955f9a..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_snils_inn_flow3_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl deleted file mode 100644 index 1784e80..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl +++ /dev/null @@ -1,255 +0,0 @@ - - - - change_status_snils_inn_flow3_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, -*/ - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--, -/* - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, -*/ - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3--, -/* - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl deleted file mode 100644 index 164d123..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_snils_inn_flow4_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl deleted file mode 100644 index d5f76cd..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_snils_inn_flow4_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, -*/ - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -/* - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 -*/ - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1--, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, -*/ - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4--, -/* - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 -*/ - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -/* - union all - - SELECT - 'job_citizen_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max -*/ -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl deleted file mode 100644 index 9763f85..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_snils_inn_flow5_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl deleted file mode 100644 index 72af375..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl +++ /dev/null @@ -1,256 +0,0 @@ - - - - change_status_snils_inn_flow5_success - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/16 09:14:18.787 - - - 2025/06/16 09:14:18.787 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - last_recruitment_id - last_recruitment_id - Y - - - record_created - record_created - Y - - - recruitment_created_date - recruitment_created_date - Y - - - status - status - Y - -
- N - - - 1056 - 400 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.snils ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT -/* - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--, -*/ - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - - FROM flow_data -), -result_max as ( --костыль - SELECT -/* - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, -*/ - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - - FROM result_ma -), -for_checkpoints as ( -/* - SELECT - 'job_citizen_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_citizen_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - - union all -*/ - SELECT - 'snils_inn_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'SUCCESS' as status, - current_timestamp as record_created - from result_max - -) -select * from for_checkpoints - N - - - 688 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl deleted file mode 100644 index d0e503c..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl +++ /dev/null @@ -1,142 +0,0 @@ - - - - change_status_to_processing - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/11 16:14:31.162 - - - 2025/06/11 16:14:31.162 - - - - - - Table input - Insert / update - Y - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 784 - 352 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - 'PROCESSING' AS status, - 'job_snils_inn' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'snils_inn_flow1' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'snils_inn_flow2' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'snils_inn_flow3' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'snils_inn_flow4' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - -UNION ALL - -SELECT - 'PROCESSING' AS status, - 'snils_inn_flow5' AS job_name, - current_timestamp AS record_created ---FROM public.etl_checkpoints - N - - - 368 - 352 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_snils_inn_job_exists.hpl similarity index 68% rename from mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl rename to mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_snils_inn_job_exists.hpl index fc0f6b5..de2d8fd 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/checkpoints/check_if_job_citizen_appealing_violations_fz53_exists.hpl +++ b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_snils_inn_job_exists.hpl @@ -1,7 +1,7 @@ - check_if_job_citizen_appealing_violations_fz53_exists + check_if_snils_inn_job_exists Y @@ -13,23 +13,23 @@ 1000 100 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - 2025/06/11 15:20:18.267 + 2025/08/05 13:28:46.661 - - Table input - Set variables - Y - Set variables Write to log N + + Table input + Set variables + Y + Set variables @@ -44,21 +44,16 @@ - job_name - PIPE - PARENT_WORKFLOW - - - status - STATUS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW Y - 688 - 352 + 672 + 336 @@ -75,29 +70,17 @@ ervu-dashboard N 0 - SELECT - COALESCE(job_name, 'job_citizen_appealing_violations_fz53') AS job_name, - COALESCE(status, 'NEW') AS status, - current_timestamp::timestamp as record_created -FROM ( - SELECT job_name, status - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_appealing_violations_fz53' - - UNION ALL - - SELECT NULL, NULL - WHERE NOT EXISTS ( - SELECT 1 - FROM public.etl_checkpoints - WHERE job_name = 'job_citizen_appealing_violations_fz53' - ) -) t + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'snils_inn_job' + limit 1 + ) AS job_executed_flag; N - 400 - 352 + 384 + 336 @@ -120,8 +103,8 @@ FROM ( ${STATUS} - 960 - 240 + 944 + 224 diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl deleted file mode 100644 index 1403bee..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_snils_inn - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'snils_inn_flow1', - 'snils_inn_flow2', - 'snils_inn_flow3', - 'snils_inn_flow4', - 'snils_inn_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'snils_inn_flow1', - 'snils_inn_flow2', - 'snils_inn_flow3', - 'snils_inn_flow4', - 'snils_inn_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_snils_inn' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl deleted file mode 100644 index 100f8e1..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl +++ /dev/null @@ -1,869 +0,0 @@ - - - - checkpoint_job_snils_inn_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 14:19:02.590 - - - 2025/06/03 14:19:02.590 - - - - - - Filter rows - Abort - N - - - JSON input state_child_flow1.json - Filter rows - N - - - JSON input state_child_flow2.json - Filter rows - N - - - JSON input state_child_flow3.json - Filter rows - N - - - JSON input state_child_flow4.json - Filter rows - N - - - JSON input state_child_flow5.json - Filter rows - N - - - Table input - Insert / update - Y - - - Dummy (do nothing) - JSON input state_child_flow1.json - N - - - Dummy (do nothing) - JSON input state_child_flow2.json - N - - - Dummy (do nothing) - JSON input state_child_flow3.json - N - - - Dummy (do nothing) - JSON input state_child_flow4.json - N - - - Dummy (do nothing) - JSON input state_child_flow5.json - N - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - 0 - - - 1264 - 592 - - - - Dummy (do nothing) - Dummy - - Y - - 1 - - none - - - - - 352 - 592 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow1 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow2 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow3 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow4 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - - - - - = - pipeline - N - - - - N - -1 - constant - -1 - child_flow5 - String - - - - - - = - status - N - AND - - N - -1 - constant - -1 - ERROR - String - - - - = - pipeline - N - OR - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - = - pipeline - N - - - - N - -1 - constant - -1 - recruits_info_flow1 - String - - - - Abort - - - 944 - 592 - - - - Insert / update - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - job_name - job_name - - public - etl_checkpoints
- - job_name - job_name - N - - - record_created - record_created - Y - - - status - status - Y - -
- N - - - 1264 - 208 - -
- - JSON input state_child_flow1.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 432 - - - - JSON input state_child_flow2.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 512 - - - - JSON input state_child_flow3.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 592 - - - - JSON input state_child_flow4.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 672 - - - - JSON input state_child_flow5.json - JsonInput - - Y - - 1 - - none - - - N - - N - N - N - N - N - Y - Y - Y - - - ${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json - - - N - N - - - - pipeline - $.pipeline - String - - - - - -1 - -1 - none - N - - - status - $.status - String - - - - - -1 - -1 - none - N - - - 0 - N - N - - - - - - - - - - - - 640 - 752 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH status_check AS ( - SELECT - bool_or(status = 'ERROR' AND job_name IN ( - 'delta_snils_inn_flow1', - 'delta_snils_inn_flow2', - 'delta_snils_inn_flow3', - 'delta_snils_inn_flow4', - 'delta_snils_inn_flow5' - )) AS has_error, - count(*) FILTER ( - WHERE status = 'SUCCESS' AND job_name IN ( - 'delta_snils_inn_flow1', - 'delta_snils_inn_flow2', - 'delta_snils_inn_flow3', - 'delta_snils_inn_flow4', - 'delta_snils_inn_flow5' - ) - ) = 5 AS all_success - FROM public.etl_checkpoints -) -SELECT - 'job_snils_inn_delta' as job_name, - CASE - WHEN has_error THEN 'ERROR' - WHEN all_success THEN 'SUCCESS' - ELSE 'ERROR' - END AS status, - current_timestamp AS record_created -FROM status_check; - N - - - 896 - 208 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl deleted file mode 100644 index 0d9cb80..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_snils_inn_error.hpl +++ /dev/null @@ -1,273 +0,0 @@ - - - - checkpoint_snils_inn_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/09 10:01:04.895 - - - 2025/06/09 10:01:04.895 - - - - - - Select values - Table output - N - - - Table input - Select values - N - - - Table input - Table output - Y - - - - Select values - SelectValues - - Y - - 1 - - none - - - - N - - idm_id - idm_id - String - -2 - -2 - - false - - - false - - - - - - - - - - 1008 - 608 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num - FROM ordered -), -flow_ranges AS ( - SELECT - flow_num, - MIN(created_at) AS min_date, - MAX(created_at) AS max_date - FROM splitted - GROUP BY flow_num -), -recr_inf AS ( - SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id - FROM ervu_dashboard.citizen cit - join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id -), -flow_data AS ( - SELECT - fr.flow_num, - ri.idm_id, - (SELECT r.created_at FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - AND r.created_at BETWEEN fr.min_date AND fr.max_date - LIMIT 1) AS created_at - FROM recr_inf ri - CROSS JOIN flow_ranges fr - WHERE EXISTS ( - SELECT 1 FROM ervu_dashboard.recruitment r - WHERE r.idm_id = ri.idm_id - ) -), -result_ma as ( - SELECT - MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1, - (SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1, - - MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2, - (SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2, - - MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3, - (SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3, - - MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4, - (SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4, - - MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5, - (SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5 - FROM flow_data -), -result_max as ( --костыль - SELECT - CASE - WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow1 - END AS cr_flow1, - idm_flow1, - CASE - WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow2 - END AS cr_flow2, - idm_flow2, - CASE - WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow3 - END AS cr_flow3, - idm_flow3, - CASE - WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow4 - END AS cr_flow4, - idm_flow4, - CASE - WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp - ELSE cr_flow5 - END AS cr_flow5, - idm_flow5 - FROM result_ma -), -for_checkpoints as ( - SELECT - 'job_child_flow1' as job_name, - idm_flow1 as last_recruitment_id, - cr_flow1 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow2' as job_name, - idm_flow2 as last_recruitment_id, - cr_flow2 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow3' as job_name, - idm_flow3 as last_recruitment_id, - cr_flow3 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow4' as job_name, - idm_flow4 as last_recruitment_id, - cr_flow4 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max - - union all - - SELECT - 'job_child_flow5' as job_name, - idm_flow5 as last_recruitment_id, - cr_flow5 as recruitment_created_date, - 'ERROR' as status, - current_timestamp as record_created - from result_max -) -select * from for_checkpoints - N - - - 736 - 448 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - N - N - N - N - Y - N - public - N - etl_checkpoints
- N - Y - N - Y - - - 1248 - 448 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf b/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf deleted file mode 100644 index c94e531..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/job_snils_inn.hwf +++ /dev/null @@ -1,2516 +0,0 @@ - - - job_snils_inn - Y - - - - 0 - - - 2025/06/05 14:27:15.055 - - - 2025/06/05 14:27:15.055 - - - M_R_CR_DATE - 3001-01-01 00:00:00 - - - - M_R_UP_DATE - - - - - - - Start - - SPECIAL - - 1 - 12 - 60 - 0 - 0 - N - 0 - 1 - N - 368 - 400 - - - - checkpoint_job_snils_inn.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - N - 1136 - 1280 - - - - recruitment_rows_five_flow_snils_inn.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2352 - 400 - - - - snils_inn_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2672 - 80 - - - - snils_inn_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2672 - 240 - - - - snils_inn_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2672 - 400 - - - - snils_inn_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2672 - 560 - - - - snils_inn_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2672 - 720 - - - - Abort workflow - - ABORT - - N - N - 2336 - 208 - - - - Success new snils_inn - - SUCCESS - - N - 3728 - 432 - - - - branching_snils_inn.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - N - 1584 - 1280 - - - - Simple snils_inn WHERE SUCCESS - - SIMPLE_EVAL - - SUCCESS - string - true - equal - equal - N - variable - STATUS - N - 1696 - 1680 - - - - Simple snils_inn WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 1840 - 1280 - - - - recruitment_rows_five_flow_if_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2384 - 1280 - - - - Abort workflow 2 - - ABORT - - N - N - 2288 - 1040 - - - - delta_snils_inn_flow1.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F1 - IDM_FLOW1 - - - Y - - Y - local - N - N - Y - N - 2640 - 1792 - - - - check_if_job_snils_inn_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_job_snils_inn_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 576 - 400 - - - - Simple job_snils_inn_exists check NEW - - SIMPLE_EVAL - - NEW - string - true - equal - equal - N - variable - STATUS - N - 896 - 400 - - - - change_status_to_processing.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2368 - 560 - - - - change_status_snils_inn_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 80 - - - - change_status_snils_inn_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 160 - - - - change_status_snils_inn_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 240 - - - - change_status_snils_inn_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 320 - - - - change_status_snils_inn_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 400 - - - - change_status_snils_inn_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 480 - - - - change_status_snils_inn_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 560 - - - - change_status_snils_inn_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 640 - - - - change_status_snils_inn_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 720 - - - - change_status_snils_inn_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 800 - - - - checkpoint_job_snils_inn.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - N - 3456 - 432 - - - - change_status_to_processing.hpl (2) - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing.hpl - Basic - - Y - - N - local - N - N - Y - N - 2368 - 1424 - - - - change_status_to_processing_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_to_processing_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 2384 - 2304 - - - - change_status_delta_snils_inn_flow1_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_success.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1792 - - - - change_status_delta_snils_inn_flow1_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1872 - - - - snils_inn_flow1.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl - Basic - - - ID_F1 - IDM_FLOW1 - - Y - - Y - local - N - N - Y - N - 2672 - 960 - - - - snils_inn_flow2.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl - Basic - - - ID_F2 - IDM_FLOW2 - - Y - - Y - local - N - N - Y - N - 2672 - 1120 - - - - snils_inn_flow3.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl - Basic - - - ID_F3 - IDM_FLOW3 - - Y - - Y - local - N - N - Y - N - 2672 - 1280 - - - - snils_inn_flow4.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl - Basic - - - ID_F4 - IDM_FLOW4 - - Y - - Y - local - N - N - Y - N - 2672 - 1440 - - - - snils_inn_flow5.hpl 2 - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl - Basic - - - ID_F5 - IDM_FLOW5 - - Y - - Y - local - N - N - Y - N - 2672 - 1600 - - - - Success snils_inn after error - - SUCCESS - - N - 3728 - 1312 - - - - change_status_snils_inn_flow1_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 960 - - - - change_status_snils_inn_flow1_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow1_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1040 - - - - change_status_snils_inn_flow2_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1120 - - - - change_status_snils_inn_flow2_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow2_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1200 - - - - change_status_snils_inn_flow3_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1280 - - - - change_status_snils_inn_flow3_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow3_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1360 - - - - change_status_snils_inn_flow4_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1440 - - - - change_status_snils_inn_flow4_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow4_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1520 - - - - change_status_snils_inn_flow5_success.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_success.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1600 - - - - change_status_snils_inn_flow5_error.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_snils_inn_flow5_error.hpl - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1680 - - - - checkpoint_job_snils_inn.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - N - 3456 - 1312 - - - - recruitment_rows_five_flow_snils_inn.hpl 2 - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/supportive_jobs/recruitment_rows_five_flow_snils_inn.hpl - Basic - - Y - - N - local - N - N - Y - Y - 2352 - 2112 - - - - Abort workflow 2 2 - - ABORT - - N - N - 2336 - 1952 - - - - delta_snils_inn_flow2.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F2 - IDM_FLOW2 - - - Y - - Y - local - N - N - Y - N - 2640 - 1952 - - - - change_status_delta_snils_inn_flow2_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_success.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 1952 - - - - change_status_delta_snils_inn_flow2_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow2_error.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2032 - - - - delta_snils_inn_flow3.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F3 - IDM_FLOW3 - - - Y - - Y - local - N - N - Y - N - 2640 - 2112 - - - - change_status_delta_snils_inn_flow3_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_success.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2112 - - - - change_status_delta_snils_inn_flow3_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow3_error.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2192 - - - - delta_snils_inn_flow4.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F4 - IDM_FLOW4 - - - Y - - Y - local - N - N - Y - N - 2640 - 2272 - - - - change_status_delta_snils_inn_flow4_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_success.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2272 - - - - change_status_delta_snils_inn_flow4_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow4_error.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2352 - - - - delta_snils_inn_flow5.hpl - - PIPELINE - - N - N - N - N - N - Y - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl - - - Basic - - - M_R_UP_DATE - - ${M_R_UP_DATE} - - - ID_F5 - IDM_FLOW5 - - - Y - - Y - local - N - N - Y - N - 2640 - 2432 - - - - change_status_delta_snils_inn_flow5_success.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_success.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2432 - - - - change_status_delta_snils_inn_flow5_error.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/change_status_delta_snils_inn_flow5_error.hpl - - - Basic - - Y - - N - local - N - N - Y - N - 2992 - 2512 - - - - branching_snils_inn_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/branching_snils_inn_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1824 - 2112 - - - - Simple delta_snils_inn WHERE ERROR - - SIMPLE_EVAL - - ERROR - string - true - equal - equal - N - variable - STATUS - N - 2064 - 2112 - - - - delta_snils_inn success - - SUCCESS - - N - 2160 - 1952 - - - - checkpoint_job_snils_inn_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/checkpoint_job_snils_inn_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 3440 - 2112 - - - - Success delta_snils_inn - - SUCCESS - - N - 3728 - 2112 - - - - - - recruitment_rows_five_flow_snils_inn.hpl - snils_inn_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - snils_inn_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - snils_inn_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - snils_inn_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - snils_inn_flow5.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - Abort workflow - Y - N - N - - - branching_snils_inn.hpl - Simple snils_inn WHERE ERROR - Y - N - Y - - - branching_snils_inn.hpl - Simple snils_inn WHERE SUCCESS - Y - N - Y - - - recruitment_rows_five_flow_if_error.hpl - Abort workflow 2 - Y - N - N - - - Start - check_if_job_snils_inn_exists.hpl - Y - Y - Y - - - check_if_job_snils_inn_exists.hpl - Simple job_snils_inn_exists check NEW - Y - Y - N - - - snils_inn_flow1.hpl - change_status_snils_inn_flow1_success.hpl - Y - Y - N - - - snils_inn_flow1.hpl - change_status_snils_inn_flow1_error.hpl - Y - N - N - - - snils_inn_flow2.hpl - change_status_snils_inn_flow2_success.hpl - Y - Y - N - - - snils_inn_flow2.hpl - change_status_snils_inn_flow2_error.hpl - Y - N - N - - - snils_inn_flow3.hpl - change_status_snils_inn_flow3_success.hpl - Y - Y - N - - - snils_inn_flow3.hpl - change_status_snils_inn_flow3_error.hpl - Y - N - N - - - snils_inn_flow4.hpl - change_status_snils_inn_flow4_success.hpl - Y - Y - N - - - snils_inn_flow4.hpl - change_status_snils_inn_flow4_error.hpl - Y - N - N - - - snils_inn_flow5.hpl - change_status_snils_inn_flow5_success.hpl - Y - Y - N - - - snils_inn_flow5.hpl - change_status_snils_inn_flow5_error.hpl - Y - N - N - - - change_status_snils_inn_flow5_error.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow5_success.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow4_error.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow4_success.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow3_error.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow3_success.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow2_error.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow2_success.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow1_error.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - change_status_snils_inn_flow1_success.hpl - checkpoint_job_snils_inn.hpl - Y - N - Y - - - checkpoint_job_snils_inn.hpl - Success new snils_inn - Y - Y - N - - - checkpoint_job_snils_inn.hpl (2) - branching_snils_inn.hpl - Y - N - Y - - - Simple job_snils_inn_exists check NEW - checkpoint_job_snils_inn.hpl (2) - Y - N - N - - - delta_snils_inn_flow1.hpl - change_status_delta_snils_inn_flow1_success.hpl - Y - Y - N - - - delta_snils_inn_flow1.hpl - change_status_delta_snils_inn_flow1_error.hpl - Y - N - N - - - snils_inn_flow1.hpl 2 - change_status_snils_inn_flow1_success.hpl 2 - Y - Y - N - - - snils_inn_flow1.hpl 2 - change_status_snils_inn_flow1_error.hpl 2 - Y - N - N - - - snils_inn_flow2.hpl 2 - change_status_snils_inn_flow2_success.hpl 2 - Y - Y - N - - - snils_inn_flow2.hpl 2 - change_status_snils_inn_flow2_error.hpl 2 - Y - N - N - - - snils_inn_flow3.hpl 2 - change_status_snils_inn_flow3_success.hpl 2 - Y - Y - N - - - snils_inn_flow3.hpl 2 - change_status_snils_inn_flow3_error.hpl 2 - Y - N - N - - - snils_inn_flow4.hpl 2 - change_status_snils_inn_flow4_success.hpl 2 - Y - Y - N - - - snils_inn_flow4.hpl 2 - change_status_snils_inn_flow4_error.hpl 2 - Y - N - N - - - snils_inn_flow5.hpl 2 - change_status_snils_inn_flow5_success.hpl 2 - Y - Y - N - - - snils_inn_flow5.hpl 2 - change_status_snils_inn_flow5_error.hpl 2 - Y - N - N - - - change_status_snils_inn_flow1_success.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow1_error.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow2_success.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow2_error.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow3_success.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow3_error.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow4_success.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow4_error.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow5_success.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - change_status_snils_inn_flow5_error.hpl 2 - checkpoint_job_snils_inn.hpl 2 - Y - N - Y - - - checkpoint_job_snils_inn.hpl 2 - Success snils_inn after error - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - snils_inn_flow3.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - snils_inn_flow2.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - snils_inn_flow1.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - snils_inn_flow4.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - snils_inn_flow5.hpl 2 - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl - change_status_to_processing.hpl - Y - Y - N - - - Simple job_snils_inn_exists check NEW - recruitment_rows_five_flow_snils_inn.hpl - Y - Y - N - - - recruitment_rows_five_flow_if_error.hpl - change_status_to_processing.hpl (2) - Y - Y - N - - - Simple snils_inn WHERE ERROR - recruitment_rows_five_flow_if_error.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - delta_snils_inn_flow1.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - change_status_to_processing_delta.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - Abort workflow 2 2 - Y - N - N - - - delta_snils_inn_flow2.hpl - change_status_delta_snils_inn_flow2_success.hpl - Y - Y - N - - - delta_snils_inn_flow2.hpl - change_status_delta_snils_inn_flow2_error.hpl - Y - N - N - - - delta_snils_inn_flow3.hpl - change_status_delta_snils_inn_flow3_success.hpl - Y - Y - N - - - delta_snils_inn_flow3.hpl - change_status_delta_snils_inn_flow3_error.hpl - Y - N - N - - - delta_snils_inn_flow4.hpl - change_status_delta_snils_inn_flow4_success.hpl - Y - Y - N - - - delta_snils_inn_flow4.hpl - change_status_delta_snils_inn_flow4_error.hpl - Y - N - N - - - delta_snils_inn_flow5.hpl - change_status_delta_snils_inn_flow5_success.hpl - Y - Y - N - - - delta_snils_inn_flow5.hpl - change_status_delta_snils_inn_flow5_error.hpl - Y - N - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - delta_snils_inn_flow3.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - delta_snils_inn_flow2.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - delta_snils_inn_flow4.hpl - Y - Y - N - - - recruitment_rows_five_flow_snils_inn.hpl 2 - delta_snils_inn_flow5.hpl - Y - Y - N - - - Simple snils_inn WHERE SUCCESS - branching_snils_inn_delta.hpl - Y - Y - N - - - Simple delta_snils_inn WHERE ERROR - delta_snils_inn success - Y - N - N - - - branching_snils_inn_delta.hpl - Simple delta_snils_inn WHERE ERROR - Y - Y - N - - - Simple delta_snils_inn WHERE ERROR - recruitment_rows_five_flow_snils_inn.hpl 2 - Y - Y - N - - - change_status_delta_snils_inn_flow1_success.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow3_success.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow2_error.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow2_success.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow1_error.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow3_error.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow4_success.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow4_error.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow5_success.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - change_status_delta_snils_inn_flow5_error.hpl - checkpoint_job_snils_inn_delta.hpl - Y - Y - N - - - checkpoint_job_snils_inn_delta.hpl - Success delta_snils_inn - Y - Y - N - - - - - 251 - 232 - 201 - 90 - 58 - 14 - N - 90 - 58 - 14 - N - Segoe UI - 9 - 72 - 1088 - 176 - 0001-01-01 00:00:00 - -3001-01-01 00:00:00 - - 114 - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl deleted file mode 100644 index fc9877b..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow1.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_snils_inn_flow1 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1184 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1184 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 704 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl deleted file mode 100644 index dc170be..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow2.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_snils_inn_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1184 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1184 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 704 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl deleted file mode 100644 index 9042d44..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow3.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_snils_inn_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1184 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1184 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 704 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl deleted file mode 100644 index 655073f..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow4.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_snils_inn_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1184 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1184 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 704 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl deleted file mode 100644 index f2ffc7a..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/delta_snils_inn_flow5.hpl +++ /dev/null @@ -1,202 +0,0 @@ - - - - delta_snils_inn_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/06/03 16:10:48.509 - - - 2025/06/03 16:10:48.509 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1184 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1184 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку - --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 704 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl new file mode 100644 index 0000000..b49a69f --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl @@ -0,0 +1,440 @@ + + + + snils_inn_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Insert / update snils + Filter rows + Y + + + Insert / update snils + Detect empty stream + Y + + + Insert / update snils + Change job status on error + Y + + + Identify last row in a stream + Insert / update inn + Y + + + Insert / update inn + Insert / update snils + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 672 + 320 + + + + Insert / update inn + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 864 + 320 + +
+ + Insert / update snils + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1024 + 320 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +${LIMIT_FW} + Y + + + 496 + 320 + + + + + Insert / update snils + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl deleted file mode 100644 index 4515f7c..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow1.hpl +++ /dev/null @@ -1,208 +0,0 @@ - - - - snils_inn_flow1 - Y - - - - Normal - 0 - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - - IS NOT NULL - inn - - - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 928 - 208 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку - AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 448 - 288 - - - - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - - IS NOT NULL - snils - - - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 928 - 368 - -
- - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl deleted file mode 100644 index 12d0170..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow2.hpl +++ /dev/null @@ -1,201 +0,0 @@ - - - - snils_inn_flow2 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1152 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1152 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку - AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 672 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl deleted file mode 100644 index d2fc08b..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow3.hpl +++ /dev/null @@ -1,201 +0,0 @@ - - - - snils_inn_flow3 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1120 - 336 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1120 - 496 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку - AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 640 - 416 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl deleted file mode 100644 index cbdc121..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow4.hpl +++ /dev/null @@ -1,201 +0,0 @@ - - - - snils_inn_flow4 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1216 - 384 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1216 - 544 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку - AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 736 - 464 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl deleted file mode 100644 index 6f1cadb..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow5.hpl +++ /dev/null @@ -1,201 +0,0 @@ - - - - snils_inn_flow5 - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/21 14:05:02.260 - - - 2025/05/21 14:05:02.260 - - - - - - Table input - Insert / update inn - Y - - - Table input - Insert / update snils - Y - - - - Insert / update inn - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - inn - - ervu_dashboard - inn
- - recruit_id - recruit_id - N - - - inn - inn - Y - - - actual - actual - Y - -
- N - - - 1200 - 320 - -
- - Insert / update snils - InsertUpdate - - Y - - 1 - - none - - - 100 - ervu-dashboard - - - = - recruit_id - recruit_id - - - IS NOT NULL - snils - - ervu_dashboard - snils
- - recruit_id - recruit_id - N - - - snils - snils - Y - - - actual - actual - Y - -
- N - - - 1200 - 480 - -
- - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -base as ( - SELECT - ri.recruit_id, - ri.info - FROM ervu_dashboard.recruits_info ri - join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку - AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}' - AND '${M_R_CR_DATE}'::timestamp >= ri.created_at -) -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - true AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - null as inn, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, - false AS actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - true as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 - -UNION ALL - -SELECT - recruit_id, - REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, - null as snils, - false as actual -FROM base -WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 - Y - - - 720 - 400 - - - - - -
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl new file mode 100644 index 0000000..2b60dda --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl @@ -0,0 +1,445 @@ + + + + snils_inn_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update inn + Y + + + Insert / update inn + Insert / update snils + Y + + + Insert / update snils + Filter rows + Y + + + Insert / update snils + Detect empty stream + Y + + + Insert / update snils + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1328 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1104 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1408 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1408 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1104 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update inn + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 928 + 224 + +
+ + Insert / update snils + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1104 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + --AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update snils + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl new file mode 100644 index 0000000..fbfd0c3 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl @@ -0,0 +1,458 @@ + + + + snils_inn_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Insert / update snils + Filter rows + Y + + + Insert / update snils + Detect empty stream + Y + + + Insert / update snils + Change job status on error + Y + + + Identify last row in a stream + Insert / update inn + Y + + + Insert / update inn + Insert / update snils + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1296 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1008 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1008 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 672 + 208 + + + + Insert / update inn + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + inn + + ervu_dashboard + inn
+ + recruit_id + recruit_id + N + + + inn + inn + Y + + + actual + actual + Y + +
+ N + + + 848 + 208 + +
+ + Insert / update snils + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + IS NOT NULL + snils + + ervu_dashboard + snils
+ + recruit_id + recruit_id + N + + + snils + snils + Y + + + actual + actual + Y + +
+ N + + + 1008 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu-dashboard + N + WITH +base as ( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +) +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + true AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + null as inn, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils, + false AS actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + true as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +UNION ALL + +SELECT + recruit_id, + REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn, + null as snils, + false as actual +FROM base +WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12 + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update snils + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..0183676 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + snils_inn_flow_delta.hpl + Y + + + Table input + snils_inn_flow_delta.hpl 2 + Y + + + Table input + snils_inn_flow_delta.hpl 3 + Y + + + Table input + snils_inn_flow_delta.hpl 4 + Y + + + Table input + snils_inn_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'snils_inn_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + snils_inn_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 128 + + + + snils_inn_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 208 + + + + snils_inn_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 288 + + + + snils_inn_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 368 + + + + snils_inn_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..e82e27f --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + snils_inn_flow_repeat.hpl + Y + + + Table input + snils_inn_flow_repeat.hpl 2 + Y + + + Table input + snils_inn_flow_repeat.hpl 3 + Y + + + Table input + snils_inn_flow_repeat.hpl 4 + Y + + + Table input + snils_inn_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'snils_inn_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + snils_inn_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 208 + + + + snils_inn_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 288 + + + + snils_inn_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 368 + + + + snils_inn_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 448 + + + + snils_inn_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 480 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl b/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl deleted file mode 100644 index a4a5b8a..0000000 --- a/mappings/info_recruits/citizen_tables/snils_inn/recruitment_rows_five_flow_if_error.hpl +++ /dev/null @@ -1,185 +0,0 @@ - - - - recruitment_rows_five_flow_if_error - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/05/23 14:28:22.572 - - - 2025/05/23 14:28:22.572 - - - - - - Table input - Copy rows to result - Y - - - - Copy rows to result - RowsToResult - - Y - - 1 - - none - - - - - 880 - 288 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - WITH -fr_check AS ( - SELECT - last_recruitment_id AS recruitment_id, - recruitment_created_date, - status, - job_name - FROM public.etl_checkpoints - WHERE status = 'ERROR' AND job_name IN ('snils_inn_flow1', 'snils_inn_flow2', 'snils_inn_flow3', 'snils_inn_flow4', 'snils_inn_flow5') -), -ordered AS ( - SELECT - idm_id, - created_at, - ROW_NUMBER() OVER (ORDER BY created_at) AS rn, - COUNT(*) OVER () AS total_rows - FROM ervu_dashboard.recruitment -), -splitted AS ( - SELECT *, - CEIL(total_rows / 5.0) AS part_size, - FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num, - ((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position - FROM ordered -), -pivoted AS ( - SELECT - position, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN created_at END) AS cr_flow1, - MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow1') THEN idm_id::text END) AS idm_flow1, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN created_at END) AS cr_flow2, - MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow2') THEN idm_id::text END) AS idm_flow2, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN created_at END) AS cr_flow3, - MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow3') THEN idm_id::text END) AS idm_flow3, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN created_at END) AS cr_flow4, - MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow4') THEN idm_id::text END) AS idm_flow4, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN created_at END) AS cr_flow5, - MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'snils_inn_flow5') THEN idm_id::text END) AS idm_flow5 - FROM splitted - GROUP BY position -), -remains as ( - SELECT - position, - cr_flow1, - idm_flow1::uuid, - cr_flow2, - idm_flow2::uuid, - cr_flow3, - idm_flow3::uuid, - cr_flow4, - idm_flow4::uuid, - cr_flow5, - idm_flow5::uuid - FROM pivoted - WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL) - OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL) - OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL) - OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL) - OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL) - order by position -), -idm1 as ( - select - cr_flow1, - idm_flow1 - from remains - where cr_flow1 is not null and idm_flow1 is not null -), -idm2 as ( - select - cr_flow2, - idm_flow2 - from remains - where cr_flow2 is not null and idm_flow2 is not null -), -idm3 as ( - select - cr_flow3, - idm_flow3 - from remains - where cr_flow3 is not null and idm_flow3 is not null -), -idm4 as ( - select - cr_flow4, - idm_flow4 - from remains - where cr_flow4 is not null and idm_flow4 is not null -), -idm5 as ( - select - cr_flow5, - idm_flow5 - from remains - where cr_flow5 is not null and idm_flow5 is not null -) -select - i1.*, - i2.*, - i3.*, - i4.*, - i5.* -FROM - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1 -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn -FULL OUTER JOIN - (SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn -ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn) -limit 2 - N - - - 512 - 288 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/snils_inn/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/snils_inn/recruitments_five_flow.hpl new file mode 100644 index 0000000..7f2a3b1 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + snils_inn_flow.hpl + Y + + + Get all recruitments ordered by created_date + snils_inn_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + snils_inn_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + snils_inn_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + snils_inn_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + snils_inn_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 144 + + + + snils_inn_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 224 + + + + snils_inn_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 304 + + + + snils_inn_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 384 + + + + snils_inn_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + snils_inn_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/snils_inn/snils_inn_job.hwf b/mappings/info_recruits/citizen_tables/snils_inn/snils_inn_job.hwf new file mode 100644 index 0000000..cbcdc63 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/snils_inn/snils_inn_job.hwf @@ -0,0 +1,366 @@ + + + snils_inn_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_snils_inn_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/checkpoints/check_if_snils_inn_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + snils_inn_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitments_five_flow.hpl + + + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_on_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/check_if_need_to_repeat_job.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_snils_inn_job_exists.hpl + Y + Y + Y + + + check_if_snils_inn_job_exists.hpl + snils_inn_job_exists_check + Y + Y + N + + + snils_inn_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + snils_inn_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + snils_inn_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf index 4db745f..2d8c149 100644 --- a/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf +++ b/mappings/info_recruits/job_parallel_recruits_info_citizen.hwf @@ -164,7 +164,7 @@ job_recruit_last_update_date.hwf citizen_job.hwf - N + Y Y Y diff --git a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl index ba2390e..d3b2fe8 100644 --- a/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl +++ b/mappings/info_recruits/raw_data/recruits_info/parallel/recruits_info_flow_delta.hpl @@ -103,11 +103,8 @@ ervu-dashboard - Y - N - Y Y N @@ -118,7 +115,6 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 944 @@ -346,6 +342,7 @@ and recruitment_id = '${IDM_ID}'; ervu_person_registry N + SELECT r.system_create_date AS created_at, r.system_update_date AS updated_at, @@ -361,7 +358,7 @@ JOIN recruits r ON r.id = ri.recruit_id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' - AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${M_R_CR_DATE}' >= r.system_create_date AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp --AND '${CR_DATE}' < ri.created_at --ORDER BY ri.created_at ASC; From 5baf20c5473b8202f30004193ab1ba7b3292e95d Mon Sep 17 00:00:00 2001 From: Fusionshh Date: Tue, 19 Aug 2025 15:44:38 +0300 Subject: [PATCH 10/21] temp --- .../work/employer/employer_job.hwf | 267 ++++ .../work/employer/parallel/employer_flow.hpl | 560 +++++++++ .../employer/parallel/employer_flow_delta.hpl | 542 ++++++++ .../parallel/employer_flow_repeat.hpl | 544 +++++++++ .../work/employer/recruitment_five_flow.hpl | 356 ++++++ .../employer/recruitment_five_flow_delta.hpl | 360 ++++++ .../recruitment_five_flow_on_error.hpl | 360 ++++++ ...check_if_employer_job_execution_exists.hpl | 84 ++ .../support/check_if_need_to_repeat.hpl | 86 ++ .../individual_entrepreneur_job.hwf | 262 ++++ .../parallel/individual_entrepreneur_flow.hpl | 451 +++++++ .../individual_entrepreneur_flow_delta.hpl | 455 +++++++ .../individual_entrepreneur_flow_repeat.hpl | 454 +++++++ .../recruitment_five_flow.hpl | 356 ++++++ .../recruitment_five_flow_delta.hpl | 360 ++++++ .../recruitment_five_flow_repeat.hpl | 356 ++++++ ...dividual_entrepreneur_execution_exists.hpl | 84 ++ .../support/check_if_need_to_repeat.hpl | 86 ++ .../parallel/self_employed_flow.hpl | 423 +++++++ .../parallel/self_employed_flow_delta.hpl | 427 +++++++ .../parallel/self_employed_flow_on_error.hpl | 416 +++++++ .../self_employed/recruitment_five_flow.hpl | 356 ++++++ .../recruitment_five_flow_delta.hpl | 360 ++++++ .../recruitments_five_flow_repeat.hpl | 360 ++++++ .../work/self_employed/self_employed_job.hwf | 256 ++++ .../support/check_if_need_to_repeat.hpl | 86 ++ ..._if_self_employed_job_execution_exists.hpl | 84 ++ .../citizen_tables/work/test.hpl | 595 +++++++++ .../parallel/work_activity_flow.hpl | 1088 +++++++++++++++++ .../parallel/work_activity_flow_delta.hpl | 14 +- .../parallel/work_activity_flow_repeat.hpl | 18 +- .../recruitment_five_flow_delta.hpl | 12 +- .../recruitment_five_flow_on_error.hpl | 16 +- .../work_activity/recruitments_five_flow.hpl | 12 +- .../support}/check_if_need_to_repeat_job.hpl | 2 +- .../check_if_work_activity_job_exists.hpl | 8 +- .../work_activity/work_activity_job.hwf | 24 +- 37 files changed, 10534 insertions(+), 46 deletions(-) create mode 100644 mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/individual_entrepreneur_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/self_employed_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/test.hpl create mode 100644 mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/parallel/work_activity_flow_delta.hpl (97%) rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/parallel/work_activity_flow_repeat.hpl (97%) rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/recruitment_five_flow_delta.hpl (95%) rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/recruitment_five_flow_on_error.hpl (95%) rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/recruitments_five_flow.hpl (95%) rename mappings/info_recruits/citizen_tables/{work_activity => work/work_activity/support}/check_if_need_to_repeat_job.hpl (98%) rename mappings/info_recruits/citizen_tables/{work_activity/checkpoints => work/work_activity/support}/check_if_work_activity_job_exists.hpl (97%) rename mappings/info_recruits/citizen_tables/{ => work}/work_activity/work_activity_job.hwf (94%) diff --git a/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf b/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf new file mode 100644 index 0000000..d971adf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf @@ -0,0 +1,267 @@ + + + employer_job + Y + + + + - + 2025/08/18 20:08:04.495 + - + 2025/08/18 20:08:04.495 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 48 + 48 + + + + check_if_employer_job_execution_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 272 + 48 + + + + employer_job_execution_exists_check + + SIMPLE_EVAL + + + + boolean + + + + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 576 + 48 + + + + recruitment_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl + + + Basic + + Y + + N + local + N + N + Y + Y + 896 + 48 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 816 + 352 + + + + check_if_need_to_repeat.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 576 + 208 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 576 + 352 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 576 + 544 + + + + + + check_if_employer_job_execution_exists.hpl + employer_job_execution_exists_check + Y + Y + N + + + employer_job_execution_exists_check + recruitment_five_flow.hpl + Y + Y + N + + + employer_job_execution_exists_check + check_if_need_to_repeat.hpl + Y + N + N + + + check_if_need_to_repeat.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + Start + check_if_employer_job_execution_exists.hpl + Y + Y + Y + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl new file mode 100644 index 0000000..29ac6d1 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl @@ -0,0 +1,560 @@ + + + + employer_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 18:28:13.561 + - + 2025/08/18 18:28:13.561 + + + + + + Create job execution record + employer_input + Y + + + actual_employer_output + pred_employer_output + N + + + pred_employer_output + Change job status on error + Y + + + Change job status on error + Abort + Y + + + employer_input + Identify last row in a stream + Y + + + Identify last row in a stream + actual_employer_output + Y + + + actual_employer_output + Change job status on error + Y + + + pred_employer_output + Detect empty stream + N + + + Detect empty stream + Change job status on success + N + + + pred_employer_output + Filter rows + N + + + Filter rows + Change job status on success + N + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1120 + 448 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 896 + 448 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1120 + 112 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 176 + 288 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1120 + 288 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + last_row + N + - + + + Change job status on success + + + 896 + 112 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 528 + 288 + + + + actual_employer_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + source_id + + + source_update_date + akt_source_update_date + + + address + akt_address + + + separate_unit_type_code + akt_separate_unit_type + + + separate_unit_address + akt_separate_unit_address + + + employer_category_name + akt_employer_category_name + + + name + akt_name + + + inn + akt_inn + + + ogrn + akt_ogrn + + + kpp + akt_kpp + + + actual_employer + akt_actual_employer + + + is_opk_org + akt_is_opk_org + + + N + N + N + N + Y + N + ervu_dashboard + Y + employer
+ N + Y + N + Y + + + 720 + 288 + +
+ + employer_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filteredData as ( + select ri.recruit_id::text, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id')::text as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' + --and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id::text, + fd.source_id::text, +-- aktRabotodat + aktRabotodat -> 'dataSved' as akt_source_update_date, + aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, + aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, + aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, + case + when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as akt_employer_category_name, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' + END + as akt_name, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' + when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' + when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as akt_inn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' + END + as akt_ogrn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as akt_kpp, + true as akt_actual_employer, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as akt_is_opk_org, +-- predRabotodat + predRabotodat -> 'dataSved' as pred_source_update_date, + predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, + predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, + predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, + case + when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as pred_employer_category_name, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' + END + as pred_name, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' + when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' + when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as pred_inn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' + END + as pred_ogrn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as pred_kpp, + false as pred_actual_employer, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as pred_is_opk_org +from filteredData fd; + Y + + + 368 + 288 + + + + pred_employer_output + TableOutput + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + source_id + source_id + + + recruit_id + recruit_id + + + source_update_date + pred_source_update_date + + + address + pred_address + + + separate_unit_address + pred_separate_unit_address + + + employer_category_name + pred_employer_category_name + + + name + pred_name + + + inn + pred_inn + + + ogrn + pred_ogrn + + + kpp + pred_kpp + + + actual_employer + pred_actual_employer + + + is_opk_org + pred_is_opk_org + + + N + N + N + N + Y + N + ervu_dashboard + Y + employer
+ N + Y + N + Y + + + 896 + 288 + +
+ + + actual_employer_output + Change job status on error + Y + + error_description + + + + + + + + pred_employer_output + Change job status on error + Y + + error_description + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl new file mode 100644 index 0000000..9043783 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl @@ -0,0 +1,542 @@ + + + + employer_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 19:01:58.918 + - + 2025/08/18 19:01:58.918 + + + + + + Change job status on error + Abort + Y + + + Insert / update 2 + Change job status on success + Y + + + Create job execution record + employer_input + Y + + + Insert / update + Insert / update 2 + Y + + + Filter rows + Change job status on success + Y + + + Insert / update + Filter rows + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Change job status on error + Y + + + employer_input + Identify last row in a stream + Y + + + + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + ervu_dashboard + employer
+ + source_id + source_id + Y + + + recruit_id + recruit_id + Y + + + source_update_date + pred_source_update_date + Y + + + address + pred_address + Y + + + separate_unit_type_code + pred_separate_unit_type_code + Y + + + separate_unit_address + pred_separate_unit_address + Y + + + employer_category_name + pred_employer_category_name + Y + + + name + pred_name + Y + + + inn + pred_inn + Y + + + ogrn + pred_ogrn + Y + + + kpp + pred_kpp + Y + + + actual_employer + pred_actual_employer + Y + + + is_opk_org + pred_is_opk_org + Y + +
+ N + + + 1040 + 384 + +
+ + Insert / update + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + ervu_dashboard + employer
+ + source_id + source_id + Y + + + recruit_id + recruit_id + Y + + + source_update_date + akt_source_update_date + Y + + + address + akt_address + Y + + + separate_unit_type_code + akt_separate_unit_type + Y + + + separate_unit_address + akt_separate_unit_address + Y + + + employer_category_name + akt_employer_category_name + Y + + + name + akt_name + Y + + + inn + akt_inn + Y + + + ogrn + akt_ogrn + Y + + + kpp + akt_kpp + Y + + + actual_employer + akt_actual_employer + Y + + + is_opk_org + akt_is_opk_org + Y + +
+ N + + + 864 + 384 + +
+ + employer_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat + from recruits_info ri +-- join на военкомат + where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + and (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' ->> 'dataSved' >= '${MAX_SOURCE_DATE}' + or ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' ->> 'dataSved' >= '${MAX_SOURCE_DATE}')) +select fd.source_id, + fd.recruit_id, +-- aktRabotodat + aktRabotodat -> 'dataSved' as akt_source_update_date, + aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, + aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, + aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, + case + when aktRabotodat -> 'svedIP' then 'Индивидуальный предприниматель' + when aktRabotodat -> 'svedYUL' then 'Юридическое лицо' + when aktRabotodat -> 'svedGlKFH' then 'Глава КФХ' + when aktRabotodat -> 'svedPlatFL' then 'Физическое лицо' + END + as akt_employer_category_name, + case + when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' -> 'naimOrg' + END + as akt_name, + case + when aktRabotodat -> 'svedIP' then aktRabotodat -> 'svedIP' ->> 'innfl' + when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' ->> 'innyul' + when aktRabotodat -> 'svedGlKFH' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' + when aktRabotodat -> 'svedPlatFL' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as akt_inn, + case + when aktRabotodat -> 'svedIP' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedIP' ->> 'ogrnip' + END + as akt_ogrn, + case + when aktRabotodat -> 'svedIP' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as akt_kpp, + true as akt_actual_employer, + case + when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as akt_is_opk_org, +-- predRabotodat + predRabotodat -> 'dataSved' as akt_source_update_date, + predRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, + predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, + predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, + case + when predRabotodat -> 'svedIP' then 'Индивидуальный предприниматель' + when predRabotodat -> 'svedYUL' then 'Юридическое лицо' + when predRabotodat -> 'svedGlKFH' then 'Глава КФХ' + when predRabotodat -> 'svedPlatFL' then 'Физическое лицо' + END + as akt_employer_category_name, + case + when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' -> 'naimOrg' + END + as akt_name, + case + when predRabotodat -> 'svedIP' then predRabotodat -> 'svedIP' ->> 'innfl' + when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' ->> 'innyul' + when predRabotodat -> 'svedGlKFH' then predRabotodat -> 'svedGlKFH' ->> 'innfl' + when predRabotodat -> 'svedPlatFL' then predRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as akt_inn, + case + when predRabotodat -> 'svedIP' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedIP' ->> 'ogrnip' + END + as akt_ogrn, + case + when predRabotodat -> 'svedIP' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as akt_kpp, + true as akt_actual_employer, + case + when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as akt_is_opk_org +from filtered_data fd; + Y + + + 512 + 384 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 672 + 384 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + Change job status on success + + + 864 + 240 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 320 + 384 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 240 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 544 + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1216 + 544 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl new file mode 100644 index 0000000..3f48109 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl @@ -0,0 +1,544 @@ + + + + employer_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 18:47:26.553 + - + 2025/08/18 18:47:26.553 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + employer_input + Y + + + Filter rows + Change job status on success + Y + + + employer_input + Identify last row in a stream + Y + + + Identify last row in a stream + akt_employer_upsert + Y + + + akt_employer_upsert + pred_employer_upsert + Y + + + akt_employer_upsert + Filter rows + Y + + + akt_employer_upsert + Change job status on error + Y + + + pred_employer_upsert + Change job status on success + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1248 + 560 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1072 + 560 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1072 + 256 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 352 + 400 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + Change job status on success + + + 896 + 256 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 704 + 400 + + + + employer_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filteredData as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.source_id, + fd.recruit_id, +-- aktRabotodat + aktRabotodat -> 'dataSved' as akt_source_update_date, + aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, + aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, + aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, + case + when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as akt_employer_category_name, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' + END + as akt_name, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' + when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' + when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as akt_inn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' + END + as akt_ogrn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as akt_kpp, + true as akt_actual_employer, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as akt_is_opk_org, +-- predRabotodat + predRabotodat -> 'dataSved' as pred_source_update_date, + predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, + predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, + predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, + case + when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as pred_employer_category_name, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' + END + as pred_name, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' + when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' + when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as pred_inn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' + END + as pred_ogrn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as pred_kpp, + false as pred_actual_employer, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as pred_is_opk_org +from filteredData fd; + Y + + + 544 + 400 + + + + akt_employer_upsert + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + + ervu_dashboard + employer
+ + source_id + source_id + Y + + + recruit_id + recruit_id + Y + + + source_update_date + akt_source_update_date + Y + + + address + akt_address + Y + + + separate_unit_type_code + akt_separate_unit_type + Y + + + separate_unit_address + akt_separate_unit_address + Y + + + employer_category_name + akt_employer_category_name + Y + + + name + akt_name + Y + + + inn + akt_inn + Y + + + ogrn + akt_ogrn + Y + + + kpp + akt_kpp + Y + + + actual_employer + akt_actual_employer + Y + + + is_opk_org + akt_is_opk_org + Y + +
+ N + + + 896 + 400 + +
+ + pred_employer_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + + ervu_dashboard + employer
+ + source_id + source_id + Y + + + recruit_id + recruit_id + Y + + + source_update_date + pred_source_update_date + Y + + + address + pred_address + Y + + + separate_unit_type_code + pred_separate_unit_type_code + Y + + + separate_unit_address + pred_separate_unit_address + Y + + + employer_category_name + pred_employer_category_name + Y + + + name + pred_name + Y + + + inn + pred_inn + Y + + + ogrn + pred_ogrn + Y + + + kpp + pred_kpp + Y + + + actual_employer + pred_actual_employer + Y + + + is_opk_org + pred_is_opk_org + Y + +
+ N + + + 1072 + 400 + +
+ + + akt_employer_upsert + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl new file mode 100644 index 0000000..a0965cf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitment_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:11:33.772 + - + 2025/08/18 20:11:33.772 + + + + + + Get all recruitments ordered by created_date + employer_flow.hpl + Y + + + Get all recruitments ordered by created_date + employer_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + employer_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + employer_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + employer_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 416 + 432 + + + + employer_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + employer_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 688 + 256 + + + + employer_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + employer_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 688 + 336 + + + + employer_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + employer_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 688 + 416 + + + + employer_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + employer_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 688 + 496 + + + + employer_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + employer_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 688 + 576 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..1e7c811 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:19:19.424 + - + 2025/08/18 20:19:19.424 + + + + + + Table input + employer_flow_delta.hpl + Y + + + Table input + employer_flow_delta.hpl 3 + Y + + + Table input + employer_flow_delta.hpl 2 + Y + + + Table input + employer_flow_delta.hpl 4 + Y + + + Table input + employer_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'employer_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 576 + 336 + + + + employer_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 176 + + + + employer_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 256 + + + + employer_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 336 + + + + employer_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 416 + + + + employer_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 496 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..54c5766 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:16:58.135 + - + 2025/08/18 20:16:58.135 + + + + + + Table input + employer_flow_repeat.hpl + Y + + + Table input + employer_flow_repeat.hpl 2 + Y + + + Table input + employer_flow_repeat.hpl 3 + Y + + + Table input + employer_flow_repeat.hpl 4 + Y + + + Table input + employer_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'employer_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 528 + 432 + + + + employer_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 272 + + + + employer_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 352 + + + + employer_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 432 + + + + employer_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 512 + + + + employer_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 592 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl new file mode 100644 index 0000000..ad27771 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl @@ -0,0 +1,84 @@ + + + + check_if_employer_job_execution_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:08:41.981 + - + 2025/08/18 20:08:41.981 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 816 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'employer_job' + limit 1 + ) AS job_executed_flag; + N + + + 528 + 336 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl new file mode 100644 index 0000000..785a778 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:14:41.794 + - + 2025/08/18 20:14:41.794 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 816 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'employer_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 528 + 336 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/individual_entrepreneur_job.hwf b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/individual_entrepreneur_job.hwf new file mode 100644 index 0000000..e230637 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/individual_entrepreneur_job.hwf @@ -0,0 +1,262 @@ + + + individual_entrepreneur_job + Y + + + + - + 2025/08/19 08:47:49.108 + - + 2025/08/19 08:47:49.108 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 0 + 224 + + + + check_if_individual_entrepreneur_execution_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 256 + 224 + + + + employer_job_execution_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 592 + 224 + + + + recruitment_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow.hpl + + + Basic + + Y + + N + local + N + N + Y + Y + 912 + 224 + + + + recruitment_five_flow_repeat.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 832 + 528 + + + + check_if_need_to_repeat.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 592 + 384 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 592 + 528 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 592 + 720 + + + + + + Start + check_if_individual_entrepreneur_execution_exists.hpl + Y + Y + Y + + + check_if_individual_entrepreneur_execution_exists.hpl + employer_job_execution_exists_check + Y + Y + N + + + employer_job_execution_exists_check + recruitment_five_flow.hpl + Y + Y + N + + + employer_job_execution_exists_check + check_if_need_to_repeat.hpl + Y + N + N + + + check_if_need_to_repeat.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_repeat.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl new file mode 100644 index 0000000..401487b --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl @@ -0,0 +1,451 @@ + + + + individual_entrepreneur_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:50:19.851 + - + 2025/08/19 08:50:19.851 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + individual_entrepreneur_input + Y + + + Filter rows + Change job status on success + Y + + + Identify last row in a stream + akt_individual_entrepreneur_output + Y + + + akt_individual_entrepreneur_output + Change job status on error + Y + + + akt_individual_entrepreneur_output + Filter rows + Y + + + akt_individual_entrepreneur_output + pred_individual_entrepreneur_output + Y + + + pred_individual_entrepreneur_output + Change job status on error + Y + + + pred_individual_entrepreneur_output + Change job status on success + Y + + + individual_entrepreneur_input + Identify last row in a stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1536 + 624 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1360 + 624 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1360 + 272 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 384 + 448 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 1040 + 272 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 800 + 448 + + + + akt_individual_entrepreneur_output + TableOutput + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + source_id + + + ogrnip + akt_ogrnip + + + source_update_date + akt_source_update_date + + + registration_date + akt_registration_date + + + reg_npd_date + akt_reg_npd_date + + + dereg_npd_date + akt_dereg_npd_date + + + actual + akt_actual + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + individual_entrepreneur
+ + N + Y + N + Y + + + 1040 + 448 + +
+ + pred_individual_entrepreneur_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + source_id + + + ogrnip + pred_ogrnip + + + source_update_date + pred_source_update_date + + + registration_date + pred_registration_date + + + deregistration_date + pred_deregistration_date + + + reg_npd_date + pred_reg_npd_date + + + dereg_npd_date + pred_dereg_npd_date + + + actual + pred_actual + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + individual_entrepreneur
+ + N + Y + N + Y + + + 1360 + 448 + +
+ + individual_entrepreneur_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' +-- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id, + fd.source_id, + aktIp ->> 'ogrnip' as akt_ogrnip, + aktIp ->> 'dataSved' as akt_source_update_date, + aktIp ->> 'dataRegIP' as akt_registration_date, + aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, + aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, + true as akt_actual, + predIp ->> 'ogrnip' as pred_ogrnip, + predIp ->> 'dataSved' as pred_source_update_date, + predIp ->> 'dataRegIP' as pred_registration_date, + predIp ->> 'dataINNNed' as pred_deregistration_date, + predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, + predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, + false as pred_actual +from filtered_data fd; + Y + + + 592 + 448 + + + + + akt_individual_entrepreneur_output + Change job status on error + Y + + + + + + + + + + pred_individual_entrepreneur_output + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl new file mode 100644 index 0000000..7266814 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl @@ -0,0 +1,455 @@ + + + + individual_entrepreneur_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 09:17:38.141 + - + 2025/08/19 09:17:38.141 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + individual_entrepreneur_input + Y + + + Filter rows + Change job status on success + Y + + + Identify last row in a stream + akt_individual_entrepreneur_upsert + Y + + + individual_entrepreneur_input + Identify last row in a stream + Y + + + akt_individual_entrepreneur_upsert + Change job status on error + Y + + + akt_individual_entrepreneur_upsert + Filter rows + Y + + + akt_individual_entrepreneur_upsert + pred_individual_entrepreneur_upsert + Y + + + pred_individual_entrepreneur_upsert + Change job status on error + Y + + + pred_individual_entrepreneur_upsert + Change job status on success + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1456 + 624 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1280 + 624 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1280 + 272 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 272 + 448 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 992 + 272 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 736 + 448 + + + + individual_entrepreneur_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' + and (ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' + or ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}') +-- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id, + fd.source_id, + aktIp ->> 'ogrnip' as akt_ogrnip, + aktIp ->> 'dataSved' as akt_source_update_date, + aktIp ->> 'dataRegIP' as akt_registration_date, + aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, + aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, + true as akt_actual, + predIp ->> 'ogrnip' as pred_ogrnip, + predIp ->> 'dataSved' as pred_source_update_date, + predIp ->> 'dataRegIP' as pred_registration_date, + predIp ->> 'dataINNNed' as pred_deregistration_date, + predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, + predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, + false as pred_actual +from filtered_data fd; + Y + + + 496 + 448 + + + + akt_individual_entrepreneur_upsert + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + + ervu_dashboard + individual_entrepreneur
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + ogrnip + akt_ogrnip + Y + + + source_update_date + akt_source_update_date + Y + + + registration_date + akt_registration_date + Y + + + reg_npd_date + akt_reg_npd_date + Y + + + deregistration_date + akt_dereg_npd_date + Y + + + actual + akt_actual + Y + +
+ N + + + 992 + 448 + +
+ + pred_individual_entrepreneur_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + ervu_dashboard + individual_entrepreneur
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + ogrnip + pred_ogrnip + Y + + + source_update_date + pred_source_update_date + Y + + + registration_date + pred_registration_date + Y + + + deregistration_date + pred_deregistration_date + Y + + + reg_npd_date + pred_reg_npd_date + Y + + + dereg_npd_date + pred_dereg_npd_date + Y + + + actual + pred_actual + Y + +
+ N + + + 1280 + 448 + +
+ + + akt_individual_entrepreneur_upsert + Change job status on error + Y + + + + + + + + + + pred_individual_entrepreneur_upsert + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl new file mode 100644 index 0000000..a9ef581 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl @@ -0,0 +1,454 @@ + + + + individual_entrepreneur_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 09:03:42.743 + - + 2025/08/19 09:03:42.743 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + individual_entrepreneur_input + Y + + + Filter rows + Change job status on success + Y + + + individual_entrepreneur_input + Identify last row in a stream + Y + + + Identify last row in a stream + akt_individual_entrepreneur_upsert + Y + + + akt_individual_entrepreneur_upsert + pred_individual_entrepreneur_upsert + Y + + + akt_individual_entrepreneur_upsert + Filter rows + Y + + + pred_individual_entrepreneur_upsert + Change job status on success + Y + + + pred_individual_entrepreneur_upsert + Change job status on error + Y + + + akt_individual_entrepreneur_upsert + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1696 + 640 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1520 + 640 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1520 + 288 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 512 + 464 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 1232 + 288 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 976 + 464 + + + + individual_entrepreneur_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' +-- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id, + fd.source_id, + aktIp ->> 'ogrnip' as akt_ogrnip, + aktIp ->> 'dataSved' as akt_source_update_date, + aktIp ->> 'dataRegIP' as akt_registration_date, + aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, + aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, + true as akt_actual, + predIp ->> 'ogrnip' as pred_ogrnip, + predIp ->> 'dataSved' as pred_source_update_date, + predIp ->> 'dataRegIP' as pred_registration_date, + predIp ->> 'dataINNNed' as pred_deregistration_date, + predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, + predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, + false as pred_actual +from filtered_data fd; + Y + + + 736 + 464 + + + + akt_individual_entrepreneur_upsert + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + + ervu_dashboard + individual_entrepreneur
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + ogrnip + akt_ogrnip + Y + + + source_update_date + akt_source_update_date + Y + + + registration_date + akt_registration_date + Y + + + reg_npd_date + akt_reg_npd_date + Y + + + deregistration_date + akt_dereg_npd_date + Y + + + actual + akt_actual + Y + +
+ N + + + 1232 + 464 + +
+ + pred_individual_entrepreneur_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + source_id + + + ervu_dashboard + individual_entrepreneur
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + ogrnip + pred_ogrnip + Y + + + source_update_date + pred_source_update_date + Y + + + registration_date + pred_registration_date + Y + + + deregistration_date + pred_deregistration_date + Y + + + reg_npd_date + pred_reg_npd_date + Y + + + dereg_npd_date + pred_dereg_npd_date + Y + + + actual + pred_actual + Y + +
+ N + + + 1520 + 464 + +
+ + + akt_individual_entrepreneur_upsert + Change job status on error + Y + + + + + + + + + + pred_individual_entrepreneur_upsert + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow.hpl new file mode 100644 index 0000000..961a651 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitment_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:50:18.281 + - + 2025/08/19 08:50:18.281 + + + + + + Get all recruitments + individual_entrepreneur_flow.hpl + Y + + + Get all recruitments + individual_entrepreneur_flow.hpl 2 + Y + + + Get all recruitments + individual_entrepreneur_flow.hpl 3 + Y + + + Get all recruitments + individual_entrepreneur_flow.hpl 4 + Y + + + Get all recruitments + individual_entrepreneur_flow.hpl 5 + Y + + + + Get all recruitments + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 512 + 448 + + + + individual_entrepreneur_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 288 + + + + individual_entrepreneur_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 368 + + + + individual_entrepreneur_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 448 + + + + individual_entrepreneur_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 528 + + + + individual_entrepreneur_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 608 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..d9de951 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 09:17:07.831 + - + 2025/08/19 09:17:07.831 + + + + + + Table input + individual_entrepreneur_flow_delta.hpl + Y + + + Table input + individual_entrepreneur_flow_delta.hpl 2 + Y + + + Table input + individual_entrepreneur_flow_delta.hpl 3 + Y + + + Table input + individual_entrepreneur_flow_delta.hpl 4 + Y + + + Table input + individual_entrepreneur_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'individual_entrepreneur_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 544 + 384 + + + + individual_entrepreneur_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 224 + + + + individual_entrepreneur_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 304 + + + + individual_entrepreneur_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 384 + + + + individual_entrepreneur_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 464 + + + + individual_entrepreneur_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 544 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl new file mode 100644 index 0000000..d7eab5d --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl @@ -0,0 +1,356 @@ + + + + recruitment_five_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 09:03:27.319 + - + 2025/08/19 09:03:27.319 + + + + + + Get all recruitments + individual_entrepreneur_flow_repeat.hpl + Y + + + Get all recruitments + individual_entrepreneur_flow_repeat.hpl 2 + Y + + + Get all recruitments + individual_entrepreneur_flow_repeat.hpl 3 + Y + + + Get all recruitments + individual_entrepreneur_flow_repeat.hpl 4 + Y + + + Get all recruitments + individual_entrepreneur_flow_repeat.hpl 5 + Y + + + + Get all recruitments + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 352 + 464 + + + + individual_entrepreneur_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 304 + + + + individual_entrepreneur_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 384 + + + + individual_entrepreneur_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 464 + + + + individual_entrepreneur_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 544 + + + + individual_entrepreneur_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + individual_entrepreneur_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 624 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl new file mode 100644 index 0000000..375b3bb --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl @@ -0,0 +1,84 @@ + + + + check_if_individual_entrepreneur_execution_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:48:31.859 + - + 2025/08/19 08:48:31.859 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 752 + 208 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'individual_entrepreneur_job' + limit 1 + ) AS job_executed_flag; + N + + + 464 + 208 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl new file mode 100644 index 0000000..44e3f9a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:57:47.121 + - + 2025/08/19 08:57:47.121 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 736 + 240 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'individual_entrepreneur_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 448 + 240 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl new file mode 100644 index 0000000..32777a0 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl @@ -0,0 +1,423 @@ + + + + self_employed_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:37:09.559 + - + 2025/08/18 20:37:09.559 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + self_employed_input + Y + + + akt_self_employed_output + pred_self_employed_output + Y + + + self_employed_input + Identify last row in a stream + Y + + + Identify last row in a stream + akt_self_employed_output + Y + + + akt_self_employed_output + Filter rows + Y + + + pred_self_employed_output + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + akt_self_employed_output + Change job status on error + Y + + + pred_self_employed_output + Change job status on error + Y + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + + N + + N + + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + + 224 + 224 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 48 + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1216 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 400 + + + + self_employed_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + limit 1) +select fd.recruit_id, + aktNpd ->> 'id' as akt_source_id, + aktNpd ->> 'dataSved' as akt_source_update_date, + aktNpd ->> 'dataUchNPD' as akt_register_date, + true as akt_actual, + predNpd ->> 'id' as pred_source_id, + predNpd ->> 'dataSved' as pred_source_update_date, + predNpd ->> 'dataUchNPD' as pred_register_date, + predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, + false as pred_actual +from filtered_data fd; + Y + + + 432 + 224 + + + + akt_self_employed_output + TableOutput + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + akt_source_id + + + source_update_date + akt_source_update_date + + + register_date + akt_register_date + + + actual + akt_actual + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + self_employed
+ + N + Y + N + Y + + + 832 + 224 + +
+ + pred_self_employed_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + pred_source_id + + + source_update_date + pred_source_update_date + + + register_date + pred_register_date + + + deregistration_date + pred_deregistration_date + + + actual + pred_actual + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + self_employed
+ + N + Y + N + Y + + + 1040 + 224 + +
+ + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 624 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 832 + 48 + + + + + akt_self_employed_output + Change job status on error + Y + + + + + + + + + + pred_self_employed_output + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl new file mode 100644 index 0000000..5f4390a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl @@ -0,0 +1,427 @@ + + + + self_employed_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:32:40.523 + - + 2025/08/19 08:32:40.523 + + + + + + Create job execution record + Table input + Y + + + self_employed_upsert + pred_self_employed_upsert + Y + + + self_employed_upsert + Change job status on error + Y + + + pred_self_employed_upsert + Change job status on error + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + self_employed_upsert + Y + + + self_employed_upsert + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + pred_self_employed_upsert + Change job status on success + Y + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 432 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1040 + 16 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL, + error_code = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 256 + 224 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + --and ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' + --or ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' + limit 1) +select fd.recruit_id, + aktNpd ->> 'id' as akt_source_id, + aktNpd ->> 'dataSved' as akt_source_update_date, + aktNpd ->> 'dataUchNPD' as akt_register_date, + true as akt_actual, + predNpd ->> 'id' as pred_source_id, + predNpd ->> 'dataSved' as pred_source_update_date, + predNpd ->> 'dataUchNPD' as pred_register_date, + predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, + false as pred_actual +from filtered_data fd; + Y + + + 464 + 224 + + + + self_employed_upsert + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + akt_source_id + + + ervu_dashboard + self_employed
+ + recruit_id + recruit_id + N + + + source_id + akt_source_id + N + + + source_update_date + akt_source_update_date + Y + + + register_date + akt_register_date + Y + + + actual + akt_actual + Y + +
+ N + + + 816 + 224 + +
+ + pred_self_employed_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + akt_source_id + + + ervu_dashboard + self_employed
+ + recruit_id + recruit_id + N + + + source_id + pred_source_id + N + + + source_update_date + pred_source_update_date + Y + + + register_date + pred_register_date + Y + + + deregistration_date + pred_deregistration_date + Y + + + actual + pred_actual + Y + +
+ N + + + 1040 + 224 + +
+ + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + + 0 + + + 1296 + 432 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 624 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 816 + 16 + + + + + self_employed_upsert + Change job status on error + Y + + + + + + + + + + pred_self_employed_upsert + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl new file mode 100644 index 0000000..b84e7fe --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl @@ -0,0 +1,416 @@ + + + + self_employed_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 21:11:27.689 + - + 2025/08/18 21:11:27.689 + + + + + + Change job status on error + Abort + Y + + + Create job execution record + self_employed_input + Y + + + Filter rows + Change job status on success + Y + + + self_employed_input + Identify last row in a stream + Y + + + Identify last row in a stream + akt_self_employed_output + Y + + + akt_self_employed_output + pred_self_employed_output + Y + + + akt_self_employed_output + Filter rows + Y + + + pred_self_employed_output + Change job status on success + Y + + + pred_self_employed_output + Change job status on error + Y + + + akt_self_employed_output + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1248 + 592 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1072 + 592 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1072 + 240 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 256 + 416 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + TRUE + result + N + - + + + Change job status on success + + + 864 + 240 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 656 + 416 + + + + self_employed_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + limit 1) +select fd.recruit_id, + aktNpd ->> 'id' as akt_source_id, + aktNpd ->> 'dataSved' as akt_source_update_date, + aktNpd ->> 'dataUchNPD' as akt_register_date, + true as akt_actual, + predNpd ->> 'id' as pred_source_id, + predNpd ->> 'dataSved' as pred_source_update_date, + predNpd ->> 'dataUchNPD' as pred_register_date, + predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, + false as pred_actual +from filtered_data fd; + Y + + + 464 + 416 + + + + akt_self_employed_output + InsertUpdate + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + akt_source_id + + + ervu_dashboard + self_employed
+ + recruit_id + recruit_id + N + + + source_id + akt_source_id + Y + + + source_update_date + akt_source_update_date + Y + + + register_date + akt_register_date + Y + + + actual + akt_actual + Y + +
+ N + + + 864 + 416 + +
+ + pred_self_employed_output + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + = + source_id + pred_source_id + + + ervu_dashboard + self_employed
+ + recruit_id + recruit_id + N + + + source_id + pred_source_id + Y + + + source_update_date + pred_source_update_date + Y + + + register_date + pred_register_date + Y + + + deregistration_date + pred_deregistration_date + Y + + + actual + pred_actual + Y + +
+ N + + + 1072 + 416 + +
+ + + akt_self_employed_output + Change job status on error + Y + + + + + + + + + + pred_self_employed_output + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow.hpl new file mode 100644 index 0000000..7f01048 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow.hpl @@ -0,0 +1,356 @@ + + + + recruitment_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 21:02:07.571 + - + 2025/08/18 21:02:07.571 + + + + + + Get all recruitments + self_employed_flow.hpl + Y + + + Get all recruitments + self_employed_flow.hpl 2 + Y + + + Get all recruitments + self_employed_flow.hpl 3 + Y + + + Get all recruitments + self_employed_flow.hpl 4 + Y + + + Get all recruitments + self_employed_flow.hpl 5 + Y + + + + Get all recruitments + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment; + N + + + 352 + 464 + + + + self_employed_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 304 + + + + self_employed_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 384 + + + + self_employed_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 464 + + + + self_employed_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 544 + + + + self_employed_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 576 + 624 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..ced7307 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/19 08:32:02.128 + - + 2025/08/19 08:32:02.128 + + + + + + Table input + self_employed_flow_delta.hpl + Y + + + Table input + self_employed_flow_delta.hpl 2 + Y + + + Table input + self_employed_flow_delta.hpl 3 + Y + + + Table input + self_employed_flow_delta.hpl 4 + Y + + + Table input + self_employed_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'self_employed_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 416 + 496 + + + + self_employed_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 336 + + + + self_employed_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 416 + + + + self_employed_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 496 + + + + self_employed_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 576 + + + + self_employed_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + self_employed_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 656 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl new file mode 100644 index 0000000..7d0f996 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl @@ -0,0 +1,360 @@ + + + + recruitments_five_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 21:33:02.351 + - + 2025/08/18 21:33:02.351 + + + + + + Table input + self_employed_flow_on_error.hpl + Y + + + Table input + self_employed_flow_on_error.hpl 2 + Y + + + Table input + self_employed_flow_on_error.hpl 3 + Y + + + Table input + self_employed_flow_on_error.hpl 4 + Y + + + Table input + self_employed_flow_on_error.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN public.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'employer_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 528 + 400 + + + + self_employed_flow_on_error.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 240 + + + + self_employed_flow_on_error.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 320 + + + + self_employed_flow_on_error.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 400 + + + + self_employed_flow_on_error.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 480 + + + + self_employed_flow_on_error.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + work_activity_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 560 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/self_employed_job.hwf b/mappings/info_recruits/citizen_tables/work/self_employed/self_employed_job.hwf new file mode 100644 index 0000000..35aea10 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/self_employed_job.hwf @@ -0,0 +1,256 @@ + + + self_employed_job + Y + + + + - + 2025/08/18 20:32:44.739 + - + 2025/08/18 20:32:44.739 + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 464 + 224 + + + + check_if_self_employed_job_execution_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 704 + 224 + + + + employer_job_execution_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 1008 + 224 + + + + recruitment_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1328 + 224 + + + + recruitments_five_flow_repeat.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 1248 + 528 + + + + check_if_need_to_repeat.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl + Basic + + Y + + N + local + N + N + Y + N + 1008 + 384 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 1008 + 528 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 1008 + 720 + + + + + + check_if_self_employed_job_execution_exists.hpl + employer_job_execution_exists_check + Y + Y + N + + + employer_job_execution_exists_check + recruitment_five_flow.hpl + Y + Y + N + + + employer_job_execution_exists_check + check_if_need_to_repeat.hpl + Y + N + N + + + check_if_need_to_repeat.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitments_five_flow_repeat.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + Start + check_if_self_employed_job_execution_exists.hpl + Y + Y + Y + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl new file mode 100644 index 0000000..652acfd --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 21:04:50.604 + - + 2025/08/18 21:04:50.604 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 704 + 272 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'self_employed_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 416 + 272 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl new file mode 100644 index 0000000..e02aaf2 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl @@ -0,0 +1,84 @@ + + + + check_if_self_employed_job_execution_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/18 20:34:56.618 + - + 2025/08/18 20:34:56.618 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 592 + 192 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'self_employed_job' + limit 1 + ) AS job_executed_flag; + N + + + 304 + 192 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/work/test.hpl b/mappings/info_recruits/citizen_tables/work/test.hpl new file mode 100644 index 0000000..dc5e802 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/test.hpl @@ -0,0 +1,595 @@ + + + + child_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + User defined Java expression 2 + Update 2 + Y + + + Update 2 + Change job status on error + Y + + + Change job status on error + Abort + Y + + + Update 2 + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + Update 2 + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + Table input + Table output + Y + + + Group by 2 + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression 2 + Y + + + Table output + Change job status on error + Y + + + Table output + Group by 2 + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1216 + 1024 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1216 + 800 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS', + error_description = null +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1744 + 608 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 112 + 800 + + + + Detect empty stream + DetectEmptyStream + + N + + 1 + + none + + + + + 1568 + 480 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1392 + 608 + + + + Group by 2 + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + minors_count_raw + is_minor + SUM + + + has_minor_child_raw + is_minor + MAX + + + has_dead_child_raw + is_dead + MAX + + + N + + + recruit_id + + + N + grp + + + 560 + 480 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 784 + 480 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + SELECT + ri.recruit_id::uuid AS recruit_id, + ch->>'id' AS child_external_id, + NULLIF(ch->>'idERN', '') AS child_id_ern, + CASE NULLIF(ch->>'rodstvSvyazReb', '')::int + WHEN 1 THEN 3 + WHEN 2 THEN 4 + END AS kinship_type, + ch->'svedFLBS'->'fio'->>'familiya' AS last_name, + ch->'svedFLBS'->'fio'->>'imya' AS first_name, + ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name, + CONCAT_WS(' ', + ch->'svedFLBS'->'fio'->>'familiya', + ch->'svedFLBS'->'fio'->>'imya', + ch->'svedFLBS'->'fio'->>'otchestvo' + ) AS full_name, + dates.birth_date, + dates.death_date, + ch->'svedSmert'->>'nomerZapis' AS death_az_number, + ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number, + CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead, + CASE + WHEN dates.death_date IS NOT NULL THEN 0 -- умершие не могут быть несовершеннолетними + WHEN dates.birth_date IS NULL THEN 0 -- если дата рождения неизвестна, считаем взрослым + WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1 + ELSE 0 + END AS is_minor +FROM ervu_dashboard.recruits_info ri +JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id +CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch +CROSS JOIN LATERAL ( + SELECT + MAKE_DATE( + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int, + NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int + ) AS birth_date, + MAKE_DATE( + NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int, + NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int + ) AS death_date +) AS dates +WHERE + '${IDM_ID}' != '' + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date + AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'; + Y + + + 304 + 800 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + child_external_id + child_external_id + + + child_id_ern + child_id_ern + + + kinship_type + kinship_type + + + last_name + last_name + + + first_name + first_name + + + middle_name + middle_name + + + full_name + full_name + + + birth_date + birth_date + + + death_date + death_date + + + death_az_number + death_az_number + + + birth_az_number + birth_az_number + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_child
+ N + Y + N + Y + + + 560 + 800 + +
+ + Update 2 + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + minors_count + minors_count + + + has_minor_child + has_minor_child + + + has_dead_child + has_dead_child + +
+ N + Y + + + 1216 + 480 + +
+ + User defined Java expression 2 + Janino + + Y + + 1 + + none + + + + minors_count + minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0" + String + 10 + -1 + + + + has_minor_child + has_minor_child_raw == 1 + Boolean + -1 + -1 + + + + has_dead_child + has_dead_child_raw == 1 + Boolean + -1 + -1 + + + + + 1024 + 480 + + + + + Create job execution record + Change job status on error + N + + + + + + + + + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + Update 2 + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl new file mode 100644 index 0000000..c21323a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl @@ -0,0 +1,1088 @@ + + + + work_activity_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + individual_entrepreneur_input + akt_individual_entrepreneur_output + Y + + + npd_input + akt_npd_output + Y + + + employer_input + actual_employer_output + Y + + + employer_input + pred_employer_output + Y + + + npd_input + pred_npd_output + Y + + + individual_entrepreneur_input + Table output + Y + + + citizen_work_activity_output + employee_parental_leave_output + Y + + + Create job execution record + citizen_work_activity_input + Y + + + employee_parental_leave_output + Change job status on error + Y + + + citizen_work_activity_output + Change job status on error + Y + + + Change job status on error + Abort + Y + + + employee_parental_leave_output + Change job status on success + Y + + + citizen_work_activity_input + Identify last row in a stream + Y + + + Identify last row in a stream + citizen_work_activity_output + Y + + + citizen_work_activity_output + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1248 + 528 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard-test + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1056 + 528 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1168 + 144 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard-test + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + + + N + N + N + N + Y + N + N + N + Y + N + Y + + + 976 + 1376 + + + + actual_employer_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + source_id + source_id + + + recruit_id + recruit_id + + + source_update_date + akt_source_update_date + + + address + akt_address + + + separate_unit_type_code + akt_separate_unit_type_code + + + separate_unit_address + akt_separate_unit_address + + + employer_category_name + akt_employer_category_name + + + name + akt_name + + + inn + akt_inn + + + ogrn + akt_ogrn + + + kpp + akt_kpp + + + actual_employer + akt_actual_employer + + + is_opk_org + akt_is_opk_org + + + N + N + N + N + Y + N + ervu_dashboard + Y + employer
+ N + Y + N + Y + + + 976 + 816 + +
+ + akt_individual_entrepreneur_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + source_id + + + ogrnip + akt_ogrnip + + + source_update_date + akt_source_update_date + + + registration_date + akt_registration_date + + + reg_npd_date + akt_reg_npd_date + + + dereg_npd_date + akt_dereg_npd_date + + + actual + akt_actual + + + N + N + N + N + Y + N + ervu_dashboard + Y + individual_entrepreneur
+ N + Y + N + Y + + + 976 + 1248 + +
+ + akt_npd_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + akt_source_id + + + source_update_date + akt_source_update_id + + + register_date + akt_register_date + + + actual + akt_actual + + + N + N + N + N + Y + N + ervu_dashboard + Y + self_employed
+ N + Y + N + Y + + + 976 + 1056 + +
+ + citizen_work_activity_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard-test + N + with filteredData as ( + select ri.recruit_id, + ri.info + from recruits_info ri + where jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +SELECT + fd.recruit_id, + trud_elem ->> 'id' AS source_id, + trud_elem -> 'svedOrg' ->> 'naimOrg' AS employer_name, + trud_elem ->> 'trudFunkcziya' AS position, + trud_elem ->> 'dataMeropr' AS personnel_event_date, + trud_elem ->> 'naimTipKadrMeropr' AS personnel_event_type, + trud_elem ->> 'dataSved' AS source_update_date, + (trud_elem ->> 'prAktMestRab') = '1' AS actual_employer, + uhod_elem ->> 'dataNachUhodReb' AS parental_leave_start_date, + uhod_elem ->> 'dataKonUhodReb' AS parental_leave_end_date +from filteredData fd + cross join jsonb_array_elements(fd.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') as trud_elem + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(trud_elem -> 'svedUhodReb') = 'array' + THEN trud_elem -> 'svedUhodReb' + ELSE '[]'::jsonb + END + ) AS uhod_elem ON true; + Y + + + 512 + 320 + + + + citizen_work_activity_output + TableOutput + + N + + 1 + + none + + + 10000 + ervu-dashboard-test + + + source_id + source_id + + + recruit_id + recruit_id + + + employer_name + employer_name + + + position + position + + + personnel_event_date + personnel_event_date + + + personnel_event_type + personnel_event_type + + + source_update_date + source_update_date + + + actual_employer + actual_employer + + + N + N + N + N + Y + N + ervu_dashboard + Y + citizen_work_activity
+ N + Y + N + Y + + + 944 + 320 + +
+ + employee_parental_leave_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + citizen_work_activity_source_id + source_id + + + start_date + parental_leave_start_date + + + end_date + parental_leave_end_date + + + N + N + N + N + Y + N + ervu_dashboard + Y + employee_parental_leave
+ N + Y + N + Y + + + 1168 + 320 + +
+ + employer_input + TableInput + + N + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filteredData as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' + -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.source_id, + fd.recruit_id, +-- aktRabotodat + aktRabotodat -> 'dataSved' as akt_source_update_date, + aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, + aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, + aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, + case + when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as akt_employer_category_name, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' + END + as akt_name, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' + when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' + when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as akt_inn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' + END + as akt_ogrn, + case + when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as akt_kpp, + true as akt_actual_employer, + case + when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as akt_is_opk_org, +-- predRabotodat + predRabotodat -> 'dataSved' as pred_source_update_date, + predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, + predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, + predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, + case + when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' + when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + END + as pred_employer_category_name, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' + END + as pred_name, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' + when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' + when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' + END + as pred_inn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' + END + as pred_ogrn, + case + when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + END + as pred_kpp, + false as akt_actual_employer, + case + when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' + END + as pred_is_opk_org +from filteredData fd; + Y + + + 752 + 848 + + + + individual_entrepreneur_input + TableInput + + N + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' +-- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id, + fd.source_id, + aktIp ->> 'ogrnip' as akt_ogrnip, + aktIp ->> 'dataSved' as akt_source_update_date, + aktIp ->> 'dataRegIP' as akt_registration_date, + aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, + aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, + true as akt_actual, + predIp ->> 'ogrnip' as pred_ogrnip, + predIp ->> 'dataSved' as pred_source_update_date, + predIp ->> 'dataRegIP' as pred_registration_date, + predIp ->> 'dataINNNed' as pred_deregistration_date, + predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, + predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, + false as pred_actual +from filtered_data fd; + Y + + + 752 + 1312 + + + + npd_input + TableInput + + N + + 1 + + none + + + ervu-dashboard-test + N + 0 + with filtered_data as ( + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' +-- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' +) +select + fd.recruit_id, + aktNpd ->> 'id' as akt_source_id, + aktNpd ->> 'dataSved' as akt_source_update_id, + aktNpd ->> 'dataUchNPD' as akt_register_date, + true as akt_actual, + predNpd ->> 'id' as pred_source_id, + predNpd ->> 'dataSved' as pred_source_update_id, + predNpd ->> 'dataUchNPD' as pred_register_date, + predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, + false as pred_actual +from filtered_data fd; + + Y + + + 752 + 1104 + + + + pred_employer_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + source_id + source_id + + + recruit_id + recruit_id + + + source_update_date + pred_source_update_date + + + address + pred_address + + + separate_unit_type_code + pred_separate_unit_type + + + separate_unit_address + pred_separate_unit_address + + + employer_category_name + pred_employer_category_name + + + name + pred_name + + + inn + pred_inn + + + ogrn + pred_ogrn + + + kpp + pred_kpp + + + actual_employer + pred_actual_employer + + + is_opk_org + pred_is_opk_org + + + N + N + N + N + Y + N + ervu_dashboard + Y + employer
+ N + Y + N + Y + + + 976 + 912 + +
+ + pred_npd_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + pred_source_id + + + source_update_date + pred_source_update_id + + + register_date + pred_register_date + + + deregistration_date + pred_deregistration_date + + + actual + pred_actual + + + N + N + N + N + Y + N + ervu_dashboard + Y + self_employed
+ N + Y + N + Y + + + 976 + 1168 + +
+ + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + result + + + 704 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + N + - + + + Change job status on success + + + 944 + 144 + + + + + Table output + Change job status on error + N + + + + + + + + + + actual_employer_output + Change job status on error + N + + + + + + + + + + akt_individual_entrepreneur_output + Change job status on error + N + + + + + + + + + + akt_npd_output + Change job status on error + N + + + + + + + + + + citizen_work_activity_output + Change job status on error + Y + + + + + + + + + + employee_parental_leave_output + Change job status on error + Y + + + + + + + + + + pred_npd_output + Change job status on error + N + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl similarity index 97% rename from mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl index 1a50b86..9ce3108 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl @@ -60,7 +60,7 @@ error_code - ervu-dashboard + ervu-dashboard-test Y @@ -97,7 +97,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard + ervu-dashboard-test Y @@ -132,9 +132,12 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard + ervu-dashboard-test + N + N + Y N N @@ -146,6 +149,7 @@ SET error_code = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}';
+ 336 @@ -163,7 +167,7 @@ and recruitment_id = '${IDM_ID}'; none - ervu-dashboard + ervu-dashboard-test N 10 WITH trud_info AS (SELECT ri.info, @@ -264,7 +268,7 @@ FROM trud_info ti; 1000 - ervu-dashboard + ervu-dashboard-test recruit_id diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl similarity index 97% rename from mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl index 6d5d9cd..a4a1f14 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl @@ -60,7 +60,7 @@ error_code - ervu-dashboard + ervu-dashboard-test Y @@ -96,9 +96,12 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard + ervu-dashboard-test + Y + N + Y N N @@ -108,6 +111,7 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; + 976 @@ -127,9 +131,12 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard + ervu-dashboard-test + N + N + Y N N @@ -157,6 +164,7 @@ DO UPDATE SET execution_datetime = DEFAULT, error_description = NULL, error_code = NULL; + 272 @@ -174,7 +182,7 @@ DO UPDATE SET none - ervu-dashboard + ervu-dashboard-test N 10 WITH trud_info AS (SELECT ri.info, @@ -275,7 +283,7 @@ FROM trud_info ti; 1000 - ervu-dashboard + ervu-dashboard-test recruit_id diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl similarity index 95% rename from mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl index c8787e1..b882463 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl @@ -57,7 +57,7 @@ none - ervu-dashboard + ervu-dashboard-test N 0 SELECT @@ -86,7 +86,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl N 1 @@ -142,7 +142,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl N 1 @@ -198,7 +198,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl N 1 @@ -254,7 +254,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl N 1 @@ -310,7 +310,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl N 1 diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl similarity index 95% rename from mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl index e1aeda3..85aee6a 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl @@ -27,12 +27,12 @@ Table input - work_activity_flow_repeat.hpl 3 + work_activity_flow_repeat.hpl 2 Y Table input - work_activity_flow_repeat.hpl 2 + work_activity_flow_repeat.hpl 3 Y @@ -57,7 +57,7 @@ none - ervu-dashboard + ervu-dashboard-test N 0 SELECT @@ -86,7 +86,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl N 1 @@ -142,7 +142,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl N 1 @@ -198,7 +198,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl N 1 @@ -254,7 +254,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl N 1 @@ -310,7 +310,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl N 1 diff --git a/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/recruitments_five_flow.hpl similarity index 95% rename from mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/recruitments_five_flow.hpl index b1c9b40..2fe3d2d 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/recruitments_five_flow.hpl @@ -57,7 +57,7 @@ none - ervu-dashboard + ervu-dashboard-test N 0 SELECT @@ -82,7 +82,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl N 1 @@ -138,7 +138,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl N 1 @@ -194,7 +194,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl N 1 @@ -250,7 +250,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl N 1 @@ -306,7 +306,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl N 1 diff --git a/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl similarity index 98% rename from mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl index dcb65d7..dd36f41 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard + ervu-dashboard-test N 0 SELECT EXISTS (SELECT 1 diff --git a/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl similarity index 97% rename from mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl index 70c1393..b562353 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl @@ -67,7 +67,7 @@ none - ervu-dashboard + ervu-dashboard-test N 0 SELECT EXISTS ( @@ -94,13 +94,13 @@ none + Basic Y - - N 0 - Basic ${STATUS} + + 944 diff --git a/mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf b/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf similarity index 94% rename from mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf rename to mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf index e384c46..7a4306a 100644 --- a/mappings/info_recruits/citizen_tables/work_activity/work_activity_job.hwf +++ b/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf @@ -31,7 +31,7 @@ - check_if_ work_activity_job_was_executed.hpl + check_if_work_activity_job_exists.hpl PIPELINE @@ -41,7 +41,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/checkpoints/check_if_work_activity_job_exists.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl Basic Y @@ -84,7 +84,9 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitments_five_flow.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitments_five_flow.hpl + + Basic Y @@ -95,7 +97,7 @@ N Y Y - 928 + 1040 304 @@ -110,7 +112,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl Basic Y @@ -136,7 +138,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/check_if_need_to_repeat_job.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl Basic Y @@ -179,7 +181,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work_activity/recruitment_five_flow_delta.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl Basic Y @@ -198,13 +200,13 @@ Start - check_if_ work_activity_job_was_executed.hpl + check_if_work_activity_job_exists.hpl Y Y Y - check_if_ work_activity_job_was_executed.hpl + check_if_work_activity_job_exists.hpl work_activity_job_exists_check Y Y @@ -261,8 +263,8 @@ N -1 26 - 800 - 256 + 880 + 224 Первичка 65 From 699732fc14f9aa85e5726d86e275bceec9d7aeff Mon Sep 17 00:00:00 2001 From: Fusionshh Date: Tue, 19 Aug 2025 15:44:44 +0300 Subject: [PATCH 11/21] temp --- .../work_activity/delta_work_activity.hpl | 27 -- .../parallel/work_activity_flow.hpl | 384 ------------------ 2 files changed, 411 deletions(-) delete mode 100644 mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl delete mode 100644 mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl diff --git a/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl b/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl deleted file mode 100644 index c42cfdd..0000000 --- a/mappings/info_recruits/citizen_tables/work_activity/delta_work_activity.hpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - delta_work_activity - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/08/05 12:54:02.780 - - - 2025/08/05 12:54:02.780 - - - - - - - - - diff --git a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl b/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl deleted file mode 100644 index 1ade769..0000000 --- a/mappings/info_recruits/citizen_tables/work_activity/parallel/work_activity_flow.hpl +++ /dev/null @@ -1,384 +0,0 @@ - - - - work_activity_flow - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/08/05 14:31:22.799 - - - 2025/08/05 14:31:22.799 - - - - - - Table input - Table output - Y - - - Table output - Change job status on success - Y - - - Create job execution record - Table input - Y - - - Table output - Change job status on error - Y - - - - Change job status on error - ExecSql - - Y - - 1 - - none - - - - - error_description - - - ervu-dashboard - - Y - - N - - Y - Y - N - UPDATE etl.job_execution -SET status = 'ERROR', - error_description = ? -WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; - - - - - - 992 - 512 - - - - Change job status on success - ExecSql - - Y - - 1 - - none - - - - - ervu-dashboard - Y - N - Y - N - N - UPDATE etl.job_execution -SET status = 'SUCCESS' -WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; - - - - - 992 - 320 - - - - Create job execution record - ExecSql - - Y - - 1 - - none - - - - - ervu-dashboard - N - N - Y - N - N - INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - - - - 288 - 320 - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 10 - WITH trud_info AS (SELECT ri.info, - ri.recruit_id::uuid, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 - END AS trud_deyat, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN - jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = - 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 - END AS parental_leave_info, - - COALESCE( - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' - ) AS employer, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' - THEN - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 - ELSE - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' - END AS reg_ip, - - COALESCE( - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' - ) AS self_employment - - FROM ervu_dashboard.recruits_info ri - -) -SELECT ti.recruit_id::uuid, - (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, - ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, - (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, - ti.trud_deyat ->> 'trudFunkcziya' AS position, - ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, - ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, - CASE - WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' - WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' - END AS employer_category, - COALESCE( - ti.employer -> 'svedYUL' ->> 'innyul', - ti.employer -> 'svedIP' ->> 'innyfl' - ) AS employer_inn, - ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, - COALESCE( - ti.employer -> 'svedIP' ->> 'ogrnip', - ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' - ) AS employer_ogrnip, - ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, - ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, - (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, - (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, - ( - (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND - ( - (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR - (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date - ) - ) AS parental_leave_active, - (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, - (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, - ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, - ti.reg_ip IS NOT NULL AS active_ip, - ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, - ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, - ti.self_employment IS NOT NULL AS active_self_employment -FROM trud_info ti; - - Y - - - 496 - 320 - - - - Table output - TableOutput - - Y - - 1 - - none - - - 1000 - ervu-dashboard - - - recruit_id - recruit_id - - - personnel_event_date - personnel_event_date - - - personnel_event_type - personnel_event_type - - - current_workplace - current_workplace - - - position - position - - - employer_name - employer_name - - - employer_kpp - employer_kpp - - - employer_category - employer_category - - - employer_inn - employer_inn - - - employer_address - employer_address - - - employer_ogrnip - employer_ogrnip - - - employer_unit_type - employer_unit_type - - - employer_unit_address - employer_unit_address - - - parental_leave_start_date - parental_leave_start_date - - - parental_leave_end_date - parental_leave_end_date - - - parental_leave_active - parental_leave_active - - - reg_ip_date - reg_ip_date - - - dereg_ip_date - dereg_ip_date - - - ogrnip_ip - ogrnip_ip - - - active_ip - active_ip - - - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment - - - N - N - N - N - Y - N - ervu_dashboard - Y - citizen_work_activity
- N - Y - N - Y - - - 720 - 320 - -
- - - Table output - Change job status on error - Y - - error_description - - error_code - - - - - - -
From e3e79bd30a6510b1f03faeed621a620575885b7b Mon Sep 17 00:00:00 2001 From: Fusionshh Date: Tue, 19 Aug 2025 15:46:52 +0300 Subject: [PATCH 12/21] temp --- .../work/employer/parallel/employer_flow.hpl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl index 29ac6d1..001f345 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl @@ -325,11 +325,14 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N N N + Y + N ervu_dashboard Y employer
+ N Y N @@ -355,8 +358,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N 0 with filteredData as ( - select ri.recruit_id::text, - (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id')::text as source_id, + select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id')::uuid as source_id, ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat from recruits_info ri @@ -364,8 +367,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); --and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' ) select - fd.recruit_id::text, - fd.source_id::text, + fd.recruit_id, + fd.source_id::uuid, -- aktRabotodat aktRabotodat -> 'dataSved' as akt_source_update_date, aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, @@ -373,7 +376,7 @@ select aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, case when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' END From 88b66f46245328679139a030211c6ef101e2ad78 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Tue, 19 Aug 2025 17:06:41 +0300 Subject: [PATCH 13/21] fix --- ...citizen_appealing_violations_fz53_flow.hpl | 205 +++++++++++++--- ...n_appealing_violations_fz53_flow_delta.hpl | 181 ++++++++++++-- ..._appealing_violations_fz53_flow_repeat.hpl | 187 ++++++++++++--- ...zen_criminal_liability_fz53_job_exists.hpl | 2 +- .../citizen_criminal_liability_fz53_flow.hpl | 202 +++++++++++++--- ...zen_criminal_liability_fz53_flow_delta.hpl | 226 ++++++++++++++---- ...en_criminal_liability_fz53_flow_repeat.hpl | 218 +++++++++++++---- ...k_if_citizen_liability_fz53_job_exists.hpl | 2 +- .../citizen_liability_fz53_job.hwf | 4 +- .../parallel/citizen_liability_fz53_flow.hpl | 206 +++++++++++++--- .../citizen_liability_fz53_flow_delta.hpl | 189 ++++++++++++--- .../citizen_liability_fz53_flow_repeat.hpl | 190 ++++++++++++--- 12 files changed, 1498 insertions(+), 314 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl index 53da516..01420f1 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl @@ -40,31 +40,51 @@ Abort Y
- - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - - - Table output - Filter rows - Y - Table output Change job status on error Y + + Table input + Table output + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y + + Update + Filter rows + Y + Abort @@ -82,8 +102,8 @@ 0 - 1376 - 512 + 1472 + 832 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}';
- 1024 - 512 + 1472 + 656 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}';
- 1632 - 160 + 1952 + 512 @@ -177,8 +197,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 288 - 320 + 432 + 656 @@ -194,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 1632 - 320 + 1696 + 512 @@ -230,8 +250,43 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1024 - 160 + 1696 + 608 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 832 + 512 @@ -248,15 +303,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 752 - 320 + 1024 + 512 Table input TableInput - N + Y 1 @@ -281,11 +336,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); END AS result_appeal, -- код рассмотрения ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 + ad.hidden, + CASE + WHEN ad.hidden is false THEN 1 + ELSE 0 + END AS has_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' - AND '${M_R_CR_DATE}' >= ad.created_at + AND '${M_R_CR_DATE}' >= ad.create_date --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты --WHERE hidden IS FALSE @@ -293,15 +352,15 @@ ${LIMIT_FW} Y - 496 - 320 + 640 + 656 Table output TableOutput - N + Y 1 @@ -367,8 +426,68 @@ ${LIMIT_FW} Y - 1024 - 320 + 832 + 656 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_appealing_violations_fz53 + has_appealing_violations_fz53 + +
+ N + Y + + + 1472 + 512 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 == 1 + Boolean + -1 + -1 + + + + + 1248 + 512 @@ -384,6 +503,18 @@ ${LIMIT_FW}
+ + Update + Change job status on error + Y + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl index 94e22da..6c862e6 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Detect empty stream Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,8 +102,8 @@ 0 - 1168 - 400 + 1360 + 384 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 944 - 400 + 1360 + 224 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 64 + 1728 + 144 @@ -197,8 +217,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 224 + 1552 + 64 @@ -233,7 +253,42 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 944 + 1472 + 144 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 720 64 @@ -251,15 +306,15 @@ and recruitment_id = '${IDM_ID}'; last_row - 736 - 224 + 912 + 64 Insert / update InsertUpdate - N + Y 1 @@ -335,7 +390,7 @@ and recruitment_id = '${IDM_ID}'; N - 944 + 720 224 @@ -343,7 +398,7 @@ and recruitment_id = '${IDM_ID}'; Table input TableInput - N + Y 1 @@ -368,7 +423,11 @@ and recruitment_id = '${IDM_ID}'; END AS result_appeal, -- код рассмотрения ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 + ad.hidden, + CASE + WHEN ad.hidden is false THEN 1 + ELSE 0 + END AS has_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -384,6 +443,66 @@ ${LIMIT_FW} 224 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_appealing_violations_fz53 + has_appealing_violations_fz53 + +
+ N + Y + + + 1360 + 64 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 == 1 + Boolean + -1 + -1 + + + + + 1136 + 64 + + Insert / update @@ -397,6 +516,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl index d48295e..4f1a565 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Filter rows Change job status on success @@ -46,25 +41,50 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Filter rows Y - Insert / update + Update Detect empty stream Y - - Insert / update - Change job status on error - Y - Abort @@ -82,8 +102,8 @@ 0 - 1248 - 400 + 1328 + 368 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 960 - 400 + 1328 + 208 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1440 - 48 + 1792 + 80 @@ -212,8 +232,8 @@ DO UPDATE SET
- 1440 - 208 + 1520 + 80 @@ -248,8 +268,43 @@ DO UPDATE SET Change job status on success - 960 - 48 + 1536 + 176 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 688 + 80 @@ -266,8 +321,8 @@ DO UPDATE SET last_row - 720 - 208 + 880 + 80 @@ -350,7 +405,7 @@ DO UPDATE SET N - 960 + 688 208 @@ -358,7 +413,7 @@ DO UPDATE SET Table input TableInput - N + Y 1 @@ -383,11 +438,15 @@ DO UPDATE SET END AS result_appeal, -- код рассмотрения ad.commission_name AS name_commission, -- наименование комиссии, принявшей решение ad.reason_for_add_entry AS grounds, -- основание для внесения записи - ad.hidden --has_appealing_violations_fz53 + ad.hidden, + CASE + WHEN ad.hidden is false THEN 1 + ELSE 0 + END AS has_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' - AND '${M_R_CR_DATE}' >= ad.created_at + AND '${M_R_CR_DATE}' >= ad.create_date --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты --WHERE hidden IS FALSE @@ -399,6 +458,66 @@ ${LIMIT_FW} 208 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_appealing_violations_fz53 + has_appealing_violations_fz53 + +
+ N + Y + + + 1328 + 80 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_appealing_violations_fz53 + has_appealing_violations_fz53 == 1 + Boolean + -1 + -1 + + + + + 1104 + 80 + + Insert / update @@ -412,6 +531,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl index 2ab9720..a2002ee 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/checkpoints/check_if_citizen_criminal_liability_fz53_job_exists.hpl @@ -73,7 +73,7 @@ SELECT EXISTS ( SELECT 1 FROM etl.job_execution - WHERE job_name = 'recruits_info_job' + WHERE job_name = 'citizen_criminal_liability_fz53_job' limit 1 ) AS job_executed_flag; N diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl index 175910a..430f53f 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl @@ -40,31 +40,51 @@ Abort Y - - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - - - Table output - Filter rows - Y - Table output Change job status on error Y + + Table input + Table output + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y + + Update + Filter rows + Y + Abort @@ -82,8 +102,8 @@ 0 - 1376 - 512 + 1536 + 832 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1024 - 512 + 1536 + 640 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1632 - 160 + 1952 + 496 @@ -177,8 +197,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 288 - 320 + 496 + 640 @@ -194,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
- 1632 - 320 + 1728 + 496 @@ -230,8 +250,43 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1024 - 160 + 1728 + 608 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 896 + 496 @@ -248,15 +303,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 752 - 320 + 1088 + 496 Table input TableInput - N + Y 1 @@ -289,8 +344,11 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' ELSE null END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - i.hidden - --has_criminal_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -303,8 +361,8 @@ ${LIMIT_FW} Y - 496 - 320 + 704 + 640 @@ -385,8 +443,68 @@ ${LIMIT_FW} Y - 1024 - 320 + 896 + 640 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_criminal_liability_fz53 + has_criminal_liability_fz53 + +
+ N + Y + + + 1536 + 496 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_liability_fz53 + has_criminal_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1312 + 496 @@ -402,6 +520,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl index 933a736..45f2100 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Detect empty stream Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,8 +102,8 @@ 0 - 1168 - 400 + 1360 + 704 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 944 - 400 + 1360 + 528 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 64 + 1744 + 384 @@ -180,8 +200,8 @@ where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 - 224 + 384 + 528 @@ -197,8 +217,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 224 + 1520 + 384 @@ -233,26 +253,8 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 944 - 64 - - - - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - last_row - - - 736 - 224 + 1520 + 480 @@ -273,11 +275,13 @@ and recruitment_id = '${IDM_ID}'; = recruit_id recruit_id + = created_at created_at + ervu_dashboard citizen_criminal_liability_fz53
@@ -345,15 +349,15 @@ and recruitment_id = '${IDM_ID}'; N - 944 - 224 + 720 + 528
Table input TableInput - N + Y 1 @@ -386,8 +390,11 @@ and recruitment_id = '${IDM_ID}'; WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' ELSE null END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - i.hidden - --has_criminal_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -400,8 +407,121 @@ ${LIMIT_FW} Y - 544 - 224 + 592 + 528 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 720 + 384 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 912 + 384 + + + + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1136 + 384 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_criminal_liability_fz53 + has_criminal_liability_fz53 + +
+ N + Y + + + 1360 + 384
@@ -417,6 +537,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl index 6edf97e..9cc8eb9 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Filter rows Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,8 +102,8 @@ 0 - 1248 - 400 + 1296 + 432 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 960 - 400 + 1296 + 208 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1440 - 48 + 1824 + 64 @@ -212,8 +232,8 @@ DO UPDATE SET - 1440 - 208 + 1536 + 64 @@ -248,26 +268,8 @@ DO UPDATE SET Change job status on success - 960 - 48 - - - - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - last_row - - - 720 - 208 + 1536 + 176 @@ -360,7 +362,7 @@ DO UPDATE SET N - 960 + 656 208 @@ -368,7 +370,7 @@ DO UPDATE SET Table input TableInput - N + Y 1 @@ -401,8 +403,11 @@ DO UPDATE SET WHEN i.decision_reason = '2' THEN 'Уклонение от прохождения альтернативной гражданской службы лиц, освобожденных от военной службы' ELSE null END AS decision_reason, -- Причины уголовного наказания в связи с фз53 - i.hidden - --has_criminal_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -419,6 +424,123 @@ ${LIMIT_FW} 208 + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 + MAX + + + + N + + + recruit_id + + + N + + grp + + + 656 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 848 + 64 + + + + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_criminal_liability_fz53 + has_criminal_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1072 + 64 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen
+ + has_criminal_liability_fz53 + has_criminal_liability_fz53 + +
+ N + Y + + + 1296 + 64 + +
Insert / update @@ -432,6 +554,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl index 10715f1..0f2ee35 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/checkpoints/check_if_citizen_liability_fz53_job_exists.hpl @@ -73,7 +73,7 @@ SELECT EXISTS ( SELECT 1 FROM etl.job_execution - WHERE job_name = 'recruits_info_job' + WHERE job_name = 'citizen_liability_fz53_job' limit 1 ) AS job_executed_flag; N diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf index 920fc8d..2abe41b 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf @@ -342,7 +342,7 @@ 150 1200 80 - recruits_info_job + citizen_liability_fz53_job M_R_UP_DATE @@ -351,7 +351,7 @@ M_R_CR_DATE 0001-01-01 00:00:00 3001-01-01 00:00:00 - 114 + 136 diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl index c203dcb..7f929bb 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl @@ -40,21 +40,6 @@ Abort Y - - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - - - Table output - Filter rows - Y - Table output Change job status on error @@ -62,9 +47,44 @@ Table output + Group by + Y + + + Group by + Identify last row in a stream + Y + + + Table input + Table output + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y + + Update + Filter rows + Y + Abort @@ -82,8 +102,8 @@ 0 - 1376 - 512 + 1360 + 1056 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1024 - 512 + 1360 + 832 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1632 - 160 + 1808 + 656 @@ -177,8 +197,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 288 - 320 + 320 + 832 @@ -194,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
- 1632 - 320 + 1584 + 656 @@ -230,8 +250,45 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1024 - 160 + 1584 + 768 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_liability_fz53 + has_liability_fz53 + MAX + + + + N + + + recruit_id + + + N + + grp + + + 720 + 656 @@ -248,15 +305,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 752 - 320 + 912 + 656 Table input TableInput - N + Y 1 @@ -291,8 +348,11 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' ELSE NULL END AS type_punishment, -- вид наказания - i.hidden - --has_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -305,8 +365,8 @@ ${LIMIT_FW} Y - 496 - 320 + 512 + 832 @@ -403,8 +463,70 @@ ${LIMIT_FW} Y - 1024 - 320 + 720 + 832 + + + + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_liability_fz53 + has_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1136 + 656 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen
+ + has_liability_fz53 + has_liability_fz53 + +
+ N + Y + + + 1360 + 656
@@ -420,6 +542,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl index 8ccde59..c4f86aa 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Detect empty stream Change job status on success @@ -46,22 +41,47 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update Detect empty stream Y - Insert / update + Update + Filter rows + Y + + + Update Change job status on error Y @@ -82,8 +102,8 @@ 0 - 1168 - 400 + 1520 + 560 @@ -117,7 +137,7 @@ and recruitment_id = '${IDM_ID}'; - 944 + 1520 400 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 64 + 1920 + 240 @@ -180,8 +200,8 @@ where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 - 224 + 416 + 400 @@ -197,8 +217,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 224 + 1712 + 240 @@ -233,8 +253,43 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 944 - 64 + 1712 + 336 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_liability_fz53 + has_liability_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 880 + 240 @@ -251,8 +306,8 @@ and recruitment_id = '${IDM_ID}'; last_row - 736 - 224 + 1072 + 240 @@ -365,15 +420,15 @@ and recruitment_id = '${IDM_ID}'; N - 944 - 224 + 880 + 400 Table input TableInput - N + Y 1 @@ -382,6 +437,7 @@ and recruitment_id = '${IDM_ID}'; postgres.decision-document-service N + SELECT i.recruit_id, i.created_at, @@ -407,8 +463,11 @@ and recruitment_id = '${IDM_ID}'; WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' ELSE NULL END AS type_punishment, -- вид наказания - i.hidden - --has_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -421,8 +480,68 @@ ${LIMIT_FW} Y - 544 - 224 + 624 + 400 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_liability_fz53 + has_liability_fz53 + +
+ N + Y + + + 1520 + 240 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_liability_fz53 + has_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1296 + 240 @@ -438,6 +557,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl index 674370a..9bdf128 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl @@ -25,16 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - - - Filter rows - Change job status on success - Y - Detect empty stream Change job status on success @@ -46,23 +36,53 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows + Y + + + Filter rows + Change job status on success Y @@ -82,7 +102,7 @@ 0 - 1248 + 1312 400 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 960 - 400 + 1312 + 208 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1440 - 48 + 1872 + 80 @@ -212,8 +232,8 @@ DO UPDATE SET - 1440 - 208 + 1584 + 80 @@ -248,8 +268,43 @@ DO UPDATE SET Change job status on success - 960 - 48 + 1584 + 176 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_liability_fz53 + has_liability_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 672 + 80 @@ -266,8 +321,8 @@ DO UPDATE SET last_row - 720 - 208 + 864 + 80 @@ -380,7 +435,7 @@ DO UPDATE SET N - 960 + 672 208 @@ -388,7 +443,7 @@ DO UPDATE SET Table input TableInput - N + Y 1 @@ -423,8 +478,11 @@ DO UPDATE SET WHEN i.extra_info->>'punishment' = '2' THEN 'Административный штраф' ELSE NULL END AS type_punishment, -- вид наказания - i.hidden - --has_liability_fz53 + i.hidden, + CASE + WHEN i.hidden is false THEN 1 + ELSE 0 + END AS has_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -441,6 +499,66 @@ ${LIMIT_FW} 208 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_liability_fz53 + has_liability_fz53 + +
+ N + Y + + + 1312 + 80 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_liability_fz53 + has_liability_fz53 == 1 + Boolean + -1 + -1 + + + + + 1088 + 80 + + Insert / update @@ -454,6 +572,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + From d16c512e1c2fcdb34d7cfb5fddab1072e2ea2465 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Tue, 19 Aug 2025 17:34:38 +0300 Subject: [PATCH 14/21] fix flags --- ...citizen_appealing_violations_fz53_flow.hpl | 11 +- ...n_appealing_violations_fz53_flow_delta.hpl | 9 +- ..._appealing_violations_fz53_flow_repeat.hpl | 9 +- .../citizen_criminal_liability_fz53_flow.hpl | 12 +- ...zen_criminal_liability_fz53_flow_delta.hpl | 163 +++++++++--------- ...en_criminal_liability_fz53_flow_repeat.hpl | 160 +++++++++-------- .../parallel/citizen_liability_fz53_flow.hpl | 63 ++++--- .../citizen_liability_fz53_flow_delta.hpl | 13 +- .../citizen_liability_fz53_flow_repeat.hpl | 11 +- 9 files changed, 221 insertions(+), 230 deletions(-) diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl index 01420f1..5ce3669 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow.hpl @@ -270,9 +270,10 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); ${java.io.tmpdir} - has_appealing_violations_fz53 - has_appealing_violations_fz53 + has_appealing_violations_fz53_raw + is_appealing_violations_fz53 MAX + N @@ -282,6 +283,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N + grp @@ -320,7 +322,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
postgres.decision-document-service N - SELECT ad.recruit_id, ad.create_date, -- дата создания обжалования @@ -340,7 +341,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); CASE WHEN ad.hidden is false THEN 1 ELSE 0 - END AS has_appealing_violations_fz53 + END AS is_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -478,7 +479,7 @@ ${LIMIT_FW} has_appealing_violations_fz53 - has_appealing_violations_fz53 == 1 + has_appealing_violations_fz53_raw == 1 Boolean -1 -1 diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl index 6c862e6..9dfa3ed 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_delta.hpl @@ -273,8 +273,8 @@ and recruitment_id = '${IDM_ID}'; ${java.io.tmpdir} - has_appealing_violations_fz53 - has_appealing_violations_fz53 + has_appealing_violations_fz53_raw + is_appealing_violations_fz53 MAX @@ -407,7 +407,6 @@ and recruitment_id = '${IDM_ID}'; postgres.decision-document-service N - SELECT ad.recruit_id, ad.create_date, -- дата создания обжалования @@ -427,7 +426,7 @@ and recruitment_id = '${IDM_ID}'; CASE WHEN ad.hidden is false THEN 1 ELSE 0 - END AS has_appealing_violations_fz53 + END AS is_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -491,7 +490,7 @@ ${LIMIT_FW} has_appealing_violations_fz53 - has_appealing_violations_fz53 == 1 + has_appealing_violations_fz53_raw == 1 Boolean -1 -1 diff --git a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl index 4f1a565..6bb6f26 100644 --- a/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_appealing_violations_fz53/parallel/citizen_appealing_violations_fz53_flow_repeat.hpl @@ -288,8 +288,8 @@ DO UPDATE SET ${java.io.tmpdir} - has_appealing_violations_fz53 - has_appealing_violations_fz53 + has_appealing_violations_fz53_raw + is_appealing_violations_fz53 MAX @@ -329,7 +329,7 @@ DO UPDATE SET Insert / update InsertUpdate - N + Y 1 @@ -422,7 +422,6 @@ DO UPDATE SET postgres.decision-document-service N - SELECT ad.recruit_id, ad.create_date, -- дата создания обжалования @@ -442,7 +441,7 @@ DO UPDATE SET CASE WHEN ad.hidden is false THEN 1 ELSE 0 - END AS has_appealing_violations_fz53 + END AS is_appealing_violations_fz53 FROM public.appeal_document_dto ad JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl index 430f53f..ecc5a21 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl @@ -270,9 +270,10 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); ${java.io.tmpdir} - has_criminal_liability_fz53 - has_criminal_liability_fz53 + has_criminal_liability_fz53_raw + is_criminal_liability_fz53 MAX + N @@ -282,6 +283,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N + grp @@ -348,7 +350,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_criminal_liability_fz53 + END AS is_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -369,7 +371,7 @@ ${LIMIT_FW} Table output TableOutput - N + Y 1 @@ -495,7 +497,7 @@ ${LIMIT_FW} has_liability_fz53 - has_criminal_liability_fz53 == 1 + has_criminal_liability_fz53_raw == 1 Boolean -1 -1 diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl index 45f2100..ebdf8a6 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl @@ -257,11 +257,64 @@ and recruitment_id = '${IDM_ID}'; 480 + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_criminal_liability_fz53_raw + is_criminal_liability_fz53 + MAX + + + N + + + recruit_id + + + N + grp + + + 720 + 384 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 912 + 384 + + Insert / update InsertUpdate - N + Y 1 @@ -275,13 +328,11 @@ and recruitment_id = '${IDM_ID}'; = recruit_id recruit_id - = created_at created_at - ervu_dashboard citizen_criminal_liability_fz53
@@ -366,7 +417,6 @@ and recruitment_id = '${IDM_ID}';
postgres.decision-document-service N - SELECT i.recruit_id, i.created_at, @@ -394,7 +444,7 @@ and recruitment_id = '${IDM_ID}'; CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_criminal_liability_fz53 + END AS is_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -411,84 +461,6 @@ ${LIMIT_FW} 528
- - Group by - GroupBy - - Y - - 1 - - none - - - N - N - ${java.io.tmpdir} - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - MAX - - - N - - - recruit_id - - - N - grp - - - 720 - 384 - - - - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - last_row - - - 912 - 384 - - - - User defined Java expression - Janino - - Y - - 1 - - none - - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 == 1 - Boolean - -1 - -1 - - - - - 1136 - 384 - - Update Update @@ -524,6 +496,31 @@ ${LIMIT_FW} 384 + + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_criminal_liability_fz53 + has_criminal_liability_fz53_raw == 1 + Boolean + -1 + -1 + + + + + 1136 + 384 + + Insert / update diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl index 9cc8eb9..77983ed 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl @@ -272,11 +272,66 @@ DO UPDATE SET 176 + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_criminal_liability_fz53_raw + is_criminal_liability_fz53 + MAX + + + + N + + + recruit_id + + + N + + grp + + + 656 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 848 + 64 + + Insert / update InsertUpdate - N + Y 1 @@ -407,7 +462,7 @@ DO UPDATE SET CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_criminal_liability_fz53 + END AS is_criminal_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -425,57 +480,37 @@ ${LIMIT_FW} - Group by - GroupBy + Update + Update - Y + N 1 none - N - N - ${java.io.tmpdir} - - - has_criminal_liability_fz53 - has_criminal_liability_fz53 - MAX - - - - N - - + 100 + ervu-dashboard + Y + + + = + recruit_id recruit_id - - - N - - grp + + ervu_dashboard + citizen
+ + has_criminal_liability_fz53 + has_criminal_liability_fz53 + + + N + Y - 656 - 64 - -
- - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - last_row - - - 848 + 1296 64 @@ -492,7 +527,7 @@ ${LIMIT_FW} has_criminal_liability_fz53 - has_criminal_liability_fz53 == 1 + has_criminal_liability_fz53_raw == 1 Boolean -1 -1 @@ -504,43 +539,6 @@ ${LIMIT_FW} 64 - - Update - Update - - N - - 1 - - none - - - 100 - ervu-dashboard - Y - - - - = - recruit_id - recruit_id - - - ervu_dashboard - citizen
- - has_criminal_liability_fz53 - has_criminal_liability_fz53 - -
- N - Y - - - 1296 - 64 - -
Insert / update diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl index 7f929bb..cd944ae 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow.hpl @@ -270,10 +270,9 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); ${java.io.tmpdir} - has_liability_fz53 - has_liability_fz53 + has_liability_fz53_raw + is_liability_fz53 MAX - N @@ -283,7 +282,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N - grp @@ -322,7 +320,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); postgres.decision-document-service N - SELECT i.recruit_id, i.created_at, @@ -352,7 +349,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_liability_fz53 + END AS is_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -373,7 +370,7 @@ ${LIMIT_FW} Table output TableOutput - N + Y 1 @@ -467,31 +464,6 @@ ${LIMIT_FW} 832 - - User defined Java expression - Janino - - Y - - 1 - - none - - - - has_liability_fz53 - has_liability_fz53 == 1 - Boolean - -1 - -1 - - - - - 1136 - 656 - - Update Update @@ -506,13 +478,11 @@ ${LIMIT_FW} 100 ervu-dashboard Y - = recruit_id recruit_id - ervu_dashboard citizen
@@ -529,6 +499,31 @@ ${LIMIT_FW} 656
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_liability_fz53 + has_liability_fz53_raw == 1 + Boolean + -1 + -1 + + + + + 1136 + 656 + + Table output diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl index c4f86aa..a39fd49 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_delta.hpl @@ -273,9 +273,10 @@ and recruitment_id = '${IDM_ID}'; ${java.io.tmpdir} - has_liability_fz53 - has_liability_fz53 + has_liability_fz53_raw + is_liability_fz53 MAX + N @@ -285,6 +286,7 @@ and recruitment_id = '${IDM_ID}'; N + grp @@ -314,7 +316,7 @@ and recruitment_id = '${IDM_ID}'; Insert / update InsertUpdate - N + Y 1 @@ -437,7 +439,6 @@ and recruitment_id = '${IDM_ID}'; postgres.decision-document-service N - SELECT i.recruit_id, i.created_at, @@ -467,7 +468,7 @@ and recruitment_id = '${IDM_ID}'; CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_liability_fz53 + END AS is_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -532,7 +533,7 @@ ${LIMIT_FW} has_liability_fz53 - has_liability_fz53 == 1 + has_liability_fz53_raw == 1 Boolean -1 -1 diff --git a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl index 9bdf128..6a020cb 100644 --- a/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_liability_fz53/parallel/citizen_liability_fz53_flow_repeat.hpl @@ -288,8 +288,8 @@ DO UPDATE SET ${java.io.tmpdir} - has_liability_fz53 - has_liability_fz53 + has_liability_fz53_raw + is_liability_fz53 MAX @@ -329,7 +329,7 @@ DO UPDATE SET Insert / update InsertUpdate - N + Y 1 @@ -452,7 +452,6 @@ DO UPDATE SET postgres.decision-document-service N - SELECT i.recruit_id, i.created_at, @@ -482,7 +481,7 @@ DO UPDATE SET CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS has_liability_fz53 + END AS is_liability_fz53 FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' @@ -547,7 +546,7 @@ ${LIMIT_FW} has_liability_fz53 - has_liability_fz53 == 1 + has_liability_fz53_raw == 1 Boolean -1 -1 From d8fbebc9d31646297b3e8f34720c7a20b6343168 Mon Sep 17 00:00:00 2001 From: "r.gaztdinov" Date: Mon, 25 Aug 2025 09:28:18 +0300 Subject: [PATCH 15/21] / --- .../subpoena/check_if_need_to_repeat_job.hpl | 86 ++++ .../check_if_subpoena_job_exists.hpl | 113 ++++ .../subpoena/parallel/subpoena_flow.hpl | 388 ++++++++++++++ .../subpoena/parallel/subpoena_flow_delta.hpl | 389 ++++++++++++++ .../parallel/subpoena_flow_repeat.hpl | 484 ++++++++++++++++++ .../subpoena/recruitment_five_flow_delta.hpl | 360 +++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++ .../subpoena/recruitments_five_flow.hpl | 373 ++++++++++++++ .../citizen_tables/subpoena/subpoena_job.hwf | 366 +++++++++++++ .../reference_data/subpoena_reason.hpl | 104 ++++ 10 files changed, 3023 insertions(+) create mode 100644 mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/checkpoints/check_if_subpoena_job_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/subpoena/subpoena_job.hwf create mode 100644 mappings/info_recruits/reference_data/subpoena_reason.hpl diff --git a/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..f15ccdf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/checkpoints/check_if_subpoena_job_exists.hpl b/mappings/info_recruits/citizen_tables/subpoena/checkpoints/check_if_subpoena_job_exists.hpl new file mode 100644 index 0000000..e5f59bb --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/checkpoints/check_if_subpoena_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_subpoena_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'subpoena_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl new file mode 100644 index 0000000..ca99475 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl @@ -0,0 +1,388 @@ + + + + subpoena_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + SELECT + s.id AS subpoena_id, --id повестки + --???, --факт направления повестки + s.send_date, --дата направления повестки + s.series, --серия повестки + s.number, --новер повестки + s.reason_id AS subpoena_reason, --причина вызова по повестке /// код передавать или сразу наименование? + s.full_name_responsible_user AS fio_commiss, --фио военного комиссара(фио пользователя сформировавшео повестку) + s.sig_info, --сертификат ключа проверки ЭП + s.recruitment_name, --наименование ВК + s.recruitment_address, --адрес, по которому необходимо явиться + s.visit_date, --дата и время явки + --, --способ направления // искать в subpoena_send_info + --, --УН заказного почтового отправления // искать в subpoena_send_info + s.status_id AS subpoena_status, --статус // ссылка на справочник subpoena_status + s.create_date, --дата создания // для загрузки данных + s.status_change_date --дата обновления // для загрузки данных (timestamp without time zone) + +-- поля для карточки, раздел "Сведения о направлении повестки военного комиссариата" + +FROM subpoena s +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND department_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= s.create_date + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + info + info + + + gir_import_data_version_id + gir_import_data_version_id + + + current_recruitment_id + current_recruitment_id + + + target_recruitment_id + target_recruitment_id + + + full_name + full_name + + + addresses + addresses + + + N + N + N + N + Y + N + ervu_dashboard + Y + recruits_info
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl new file mode 100644 index 0000000..5f60fb2 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl @@ -0,0 +1,389 @@ + + + + subpoena_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Insert / update + Change job status on error + Y + + + Change job status on error + Abort + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + addresses + addresses + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + --AND '${M_R_CR_DATE}' >= r.system_create_date + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl new file mode 100644 index 0000000..582920a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl @@ -0,0 +1,484 @@ + + + + subpoena_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + addresses + addresses + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 480 + 208 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + info + info + + + gir_import_data_version_id + gir_import_data_version_id + + + current_recruitment_id + current_recruitment_id + + + target_recruitment_id + target_recruitment_id + + + full_name + full_name + + + addresses + addresses + + + N + N + N + N + Y + N + ervu_dashboard + Y + recruits_info
+ N + Y + N + Y + + + 816 + 544 + +
+ + + Insert / update + Change job status on error + Y + + + + + + + + + + Table output + Change job status on error + N + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..e69b190 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + subpoena_flow_delta.hpl + Y + + + Table input + subpoena_flow_delta.hpl 2 + Y + + + Table input + subpoena_flow_delta.hpl 3 + Y + + + Table input + subpoena_flow_delta.hpl 4 + Y + + + Table input + subpoena_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + subpoena_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 128 + + + + subpoena_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 208 + + + + subpoena_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 288 + + + + subpoena_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 368 + + + + subpoena_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..b6fa112 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + subpoena_flow_repeat.hpl + Y + + + Table input + subpoena_flow_repeat.hpl 2 + Y + + + Table input + subpoena_flow_repeat.hpl 3 + Y + + + Table input + subpoena_flow_repeat.hpl 4 + Y + + + Table input + subpoena_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + subpoena_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 208 + + + + subpoena_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 288 + + + + subpoena_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 368 + + + + subpoena_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 448 + + + + subpoena_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/subpoena/recruitments_five_flow.hpl new file mode 100644 index 0000000..6bd1738 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + subpoena_flow.hpl + Y + + + Get all recruitments ordered by created_date + subpoena_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + subpoena_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + subpoena_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + subpoena_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + subpoena_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 144 + + + + subpoena_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 224 + + + + subpoena_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 304 + + + + subpoena_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 384 + + + + subpoena_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/subpoena_job.hwf b/mappings/info_recruits/citizen_tables/subpoena/subpoena_job.hwf new file mode 100644 index 0000000..4773d5e --- /dev/null +++ b/mappings/info_recruits/citizen_tables/subpoena/subpoena_job.hwf @@ -0,0 +1,366 @@ + + + subpoena_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_subpoena_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/checkpoints/check_if_subpoena_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + subpoena_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/recruitments_five_flow.hpl + + + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/recruitment_five_flow_on_error.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_subpoena_job_exists.hpl + Y + Y + Y + + + check_if_subpoena_job_exists.hpl + subpoena_job_exists_check + Y + Y + N + + + subpoena_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + subpoena_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + subpoena_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/reference_data/subpoena_reason.hpl b/mappings/info_recruits/reference_data/subpoena_reason.hpl new file mode 100644 index 0000000..c2fc8d8 --- /dev/null +++ b/mappings/info_recruits/reference_data/subpoena_reason.hpl @@ -0,0 +1,104 @@ + + + + subpoena_reason + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/21 14:45:11.431 + - + 2025/08/21 14:45:11.431 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + ervu_dashboard + subpoena_reason
+ + id + id + N + + + name + name + Y + + + code + code + Y + + + type + type + Y + +
+ N + + + 1264 + 464 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + SELECT * FROM public.subpoena_reason + N + + + 768 + 464 + + + + + +
From 2a953f4a6b240451422292a06c293080c56a271b Mon Sep 17 00:00:00 2001 From: Fusionshh Date: Tue, 26 Aug 2025 14:59:00 +0300 Subject: [PATCH 16/21] ERVU-480 : work flow --- .../work/employer/employer_job.hwf | 23 +- .../work/employer/parallel/employer_flow.hpl | 357 +++----- .../employer/parallel/employer_flow_delta.hpl | 746 +++++++--------- .../parallel/employer_flow_repeat.hpl | 365 +++----- .../work/employer/recruitment_five_flow.hpl | 15 +- .../employer/recruitment_five_flow_delta.hpl | 91 +- ...r.hpl => recruitment_five_flow_repeat.hpl} | 22 +- ...check_if_employer_job_execution_exists.hpl | 11 +- .../support/check_if_need_to_repeat.hpl | 3 +- .../parallel/individual_entrepreneur_flow.hpl | 463 ++++++---- .../individual_entrepreneur_flow_delta.hpl | 299 ++++--- .../individual_entrepreneur_flow_repeat.hpl | 378 ++++---- .../recruitment_five_flow_delta.hpl | 67 +- .../recruitment_five_flow_repeat.hpl | 20 +- ...dividual_entrepreneur_execution_exists.hpl | 3 +- .../support/check_if_need_to_repeat.hpl | 3 +- .../parallel/self_employed_flow.hpl | 523 +++++------ .../parallel/self_employed_flow_delta.hpl | 394 ++++---- ...rror.hpl => self_employed_flow_repeat.hpl} | 218 ++--- .../recruitment_five_flow_delta.hpl | 75 +- .../recruitments_five_flow_repeat.hpl | 40 +- .../support/check_if_need_to_repeat.hpl | 2 +- ..._if_self_employed_job_execution_exists.hpl | 2 +- .../parallel/work_activity_flow.hpl | 839 +++--------------- .../parallel/work_activity_flow_delta.hpl | 514 ++++++----- .../parallel/work_activity_flow_repeat.hpl | 553 ++++++------ .../recruitment_five_flow_delta.hpl | 67 +- ...r.hpl => recruitment_five_flow_repeat.hpl} | 2 +- .../support/check_if_need_to_repeat_job.hpl | 3 +- .../check_if_work_activity_job_exists.hpl | 32 +- .../work/work_activity/work_activity_job.hwf | 10 +- 31 files changed, 2819 insertions(+), 3321 deletions(-) rename mappings/info_recruits/citizen_tables/work/employer/{recruitment_five_flow_on_error.hpl => recruitment_five_flow_repeat.hpl} (96%) rename mappings/info_recruits/citizen_tables/work/self_employed/parallel/{self_employed_flow_on_error.hpl => self_employed_flow_repeat.hpl} (69%) rename mappings/info_recruits/citizen_tables/work/work_activity/{recruitment_five_flow_on_error.hpl => recruitment_five_flow_repeat.hpl} (99%) diff --git a/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf b/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf index d971adf..8c0ba80 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf +++ b/mappings/info_recruits/citizen_tables/work/employer/employer_job.hwf @@ -42,8 +42,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl - - Basic Y @@ -63,12 +61,7 @@ SIMPLE_EVAL - - boolean - - - false equal equal @@ -92,8 +85,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl - - Basic Y @@ -109,7 +100,7 @@ - recruitment_five_flow_on_error.hpl + recruitment_five_flow_repeat.hpl PIPELINE @@ -119,9 +110,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl - - + ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow_repeat.hpl Basic Y @@ -148,8 +137,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl - - Basic Y @@ -161,7 +148,7 @@ Y N 576 - 208 + 192 @@ -193,8 +180,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl - - Basic Y @@ -241,7 +226,7 @@ Simple evaluation - recruitment_five_flow_on_error.hpl + recruitment_five_flow_repeat.hpl Y Y N diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl index 001f345..e519d93 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow.hpl @@ -25,16 +25,6 @@ employer_input Y - - actual_employer_output - pred_employer_output - N - - - pred_employer_output - Change job status on error - Y - Change job status on error Abort @@ -47,33 +37,33 @@ Identify last row in a stream - actual_employer_output + employer_output Y - actual_employer_output + employer_output Change job status on error Y - - pred_employer_output - Detect empty stream - N - Detect empty stream Change job status on success - N - - - pred_employer_output - Filter rows - N + Y Filter rows Change job status on success - N + Y + + + employer_output + Filter rows + Y + + + Identify last row in a stream + Detect empty stream + Y @@ -92,7 +82,7 @@ 0 - 1120 + 944 448 @@ -112,7 +102,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -127,7 +117,7 @@ and recruitment_id = '${IDM_ID}'; - 896 + 720 448 @@ -144,7 +134,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -158,7 +148,7 @@ and recruitment_id = '${IDM_ID}'; - 1120 + 944 112 @@ -175,7 +165,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y @@ -204,8 +194,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 1120 - 288 + 528 + 112 @@ -223,24 +213,32 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - TRUE + = last_row N - + + N + -1 + constant + -1 + Y + String + Change job status on success - 896 - 112 + 944 + 288 Identify last row in a stream DetectLastRow - Y + N 1 @@ -254,95 +252,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); 288
- - actual_employer_output - TableOutput - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - source_id - - - source_update_date - akt_source_update_date - - - address - akt_address - - - separate_unit_type_code - akt_separate_unit_type - - - separate_unit_address - akt_separate_unit_address - - - employer_category_name - akt_employer_category_name - - - name - akt_name - - - inn - akt_inn - - - ogrn - akt_ogrn - - - kpp - akt_kpp - - - actual_employer - akt_actual_employer - - - is_opk_org - akt_is_opk_org - - - N - N - N - N - - Y - - N - ervu_dashboard - Y - employer
- - N - Y - N - Y - - - 720 - 288 - -
employer_input TableInput @@ -354,108 +263,76 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 - with filteredData as ( - select ri.recruit_id, - (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id')::uuid as source_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' - --and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - fd.source_id::uuid, --- aktRabotodat - aktRabotodat -> 'dataSved' as akt_source_update_date, - aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, - aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, - aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, - case - when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as akt_employer_category_name, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' - END - as akt_name, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' - when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' - when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as akt_inn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' - END - as akt_ogrn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as akt_kpp, - true as akt_actual_employer, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as akt_is_opk_org, --- predRabotodat - predRabotodat -> 'dataSved' as pred_source_update_date, - predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, - predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, - predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, - case - when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as pred_employer_category_name, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' - END - as pred_name, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' - when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' - when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as pred_inn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' - END - as pred_ogrn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as pred_kpp, - false as pred_actual_employer, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as pred_is_opk_org + with filteredData as (select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as rabotodat, + true as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'aktRabotodat' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as rabotodat, + false as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'predRabotodat' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.source_id, + fd.recruit_id, + to_date(rabotodat ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + COALESCE(rabotodat -> 'extend' ->> 'status', '0') = '1' AS status, + rabotodat -> 'extend' ->> 'adresRabotodat' as address, + rabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as separate_unit_type, + rabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as separate_unit_address, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then 'Индивидуальный предприниматель' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + end as employer_category_name, + rabotodat -> 'svedYUL' -> 'naimOrg' as name, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'svedIP' ->> 'innfl' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedYUL' ->> 'innyul' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' + then rabotodat -> 'svedGlKFH' ->> 'innfl' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' + then rabotodat -> 'svedPlatFL' ->> 'innfl' + end as inn, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedIP' ->> 'ogrnip' + end as ogrn, + case + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + end as kpp, + coalesce(rabotodat -> 'svedYUL' -> 'extend' ->> 'priznakOpk', '0') = '1' as is_opk_org, + actual_employer from filteredData fd; Y - 368 + 352 288 - pred_employer_output + employer_output TableOutput - N + Y 1 @@ -463,55 +340,59 @@ from filteredData fd; 10000 - ervu-dashboard-test + ervu-dashboard - - source_id - source_id - recruit_id recruit_id + + source_id + source_id + source_update_date - pred_source_update_date + source_update_date address - pred_address + address + + + separate_unit_type_code + separate_unit_type separate_unit_address - pred_separate_unit_address + separate_unit_address employer_category_name - pred_employer_category_name + employer_category_name name - pred_name + name inn - pred_inn + inn ogrn - pred_ogrn + ogrn kpp - pred_kpp + kpp actual_employer - pred_actual_employer + actual_employer is_opk_org - pred_is_opk_org + is_opk_org N @@ -529,25 +410,13 @@ from filteredData fd; Y - 896 + 720 288 - actual_employer_output - Change job status on error - Y - - error_description - - - - - - - - pred_employer_output + employer_output Change job status on error Y diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl index 9043783..79fcd74 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_delta.hpl @@ -25,38 +25,23 @@ Abort Y - - Insert / update 2 - Change job status on success - Y - Create job execution record employer_input Y - Insert / update - Insert / update 2 - Y - - - Filter rows - Change job status on success - Y - - - Insert / update + employer_upsert Filter rows Y Identify last row in a stream - Insert / update + employer_upsert Y - Insert / update + employer_upsert Change job status on error Y @@ -65,10 +50,25 @@ Identify last row in a stream Y + + Detect empty stream + Change job status on success + Y + + + Identify last row in a stream + Detect empty stream + Y + + + Filter rows + Change job status on success + Y + - Insert / update 2 - InsertUpdate + Abort + Abort Y @@ -77,396 +77,13 @@ none - 10000 - ervu-dashboard-test - - - = - source_id - source_id - - ervu_dashboard - employer
- - source_id - source_id - Y - - - recruit_id - recruit_id - Y - - - source_update_date - pred_source_update_date - Y - - - address - pred_address - Y - - - separate_unit_type_code - pred_separate_unit_type_code - Y - - - separate_unit_address - pred_separate_unit_address - Y - - - employer_category_name - pred_employer_category_name - Y - - - name - pred_name - Y - - - inn - pred_inn - Y - - - ogrn - pred_ogrn - Y - - - kpp - pred_kpp - Y - - - actual_employer - pred_actual_employer - Y - - - is_opk_org - pred_is_opk_org - Y - -
- N + ABORT + Y + 0 1040 - 384 - -
- - Insert / update - InsertUpdate - - N - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - source_id - - ervu_dashboard - employer
- - source_id - source_id - Y - - - recruit_id - recruit_id - Y - - - source_update_date - akt_source_update_date - Y - - - address - akt_address - Y - - - separate_unit_type_code - akt_separate_unit_type - Y - - - separate_unit_address - akt_separate_unit_address - Y - - - employer_category_name - akt_employer_category_name - Y - - - name - akt_name - Y - - - inn - akt_inn - Y - - - ogrn - akt_ogrn - Y - - - kpp - akt_kpp - Y - - - actual_employer - akt_actual_employer - Y - - - is_opk_org - akt_is_opk_org - Y - -
- N - - - 864 - 384 - -
- - employer_input - TableInput - - Y - - 1 - - none - - - ervu-dashboard-test - N - 0 - with filtered_data as (select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat - from recruits_info ri --- join на военкомат - where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' - and (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' ->> 'dataSved' >= '${MAX_SOURCE_DATE}' - or ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' ->> 'dataSved' >= '${MAX_SOURCE_DATE}')) -select fd.source_id, - fd.recruit_id, --- aktRabotodat - aktRabotodat -> 'dataSved' as akt_source_update_date, - aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, - aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, - aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, - case - when aktRabotodat -> 'svedIP' then 'Индивидуальный предприниматель' - when aktRabotodat -> 'svedYUL' then 'Юридическое лицо' - when aktRabotodat -> 'svedGlKFH' then 'Глава КФХ' - when aktRabotodat -> 'svedPlatFL' then 'Физическое лицо' - END - as akt_employer_category_name, - case - when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' -> 'naimOrg' - END - as akt_name, - case - when aktRabotodat -> 'svedIP' then aktRabotodat -> 'svedIP' ->> 'innfl' - when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' ->> 'innyul' - when aktRabotodat -> 'svedGlKFH' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' - when aktRabotodat -> 'svedPlatFL' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as akt_inn, - case - when aktRabotodat -> 'svedIP' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedIP' ->> 'ogrnip' - END - as akt_ogrn, - case - when aktRabotodat -> 'svedIP' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as akt_kpp, - true as akt_actual_employer, - case - when aktRabotodat -> 'svedYUL' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as akt_is_opk_org, --- predRabotodat - predRabotodat -> 'dataSved' as akt_source_update_date, - predRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, - predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, - predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, - case - when predRabotodat -> 'svedIP' then 'Индивидуальный предприниматель' - when predRabotodat -> 'svedYUL' then 'Юридическое лицо' - when predRabotodat -> 'svedGlKFH' then 'Глава КФХ' - when predRabotodat -> 'svedPlatFL' then 'Физическое лицо' - END - as akt_employer_category_name, - case - when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' -> 'naimOrg' - END - as akt_name, - case - when predRabotodat -> 'svedIP' then predRabotodat -> 'svedIP' ->> 'innfl' - when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' ->> 'innyul' - when predRabotodat -> 'svedGlKFH' then predRabotodat -> 'svedGlKFH' ->> 'innfl' - when predRabotodat -> 'svedPlatFL' then predRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as akt_inn, - case - when predRabotodat -> 'svedIP' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedIP' ->> 'ogrnip' - END - as akt_ogrn, - case - when predRabotodat -> 'svedIP' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as akt_kpp, - true as akt_actual_employer, - case - when predRabotodat -> 'svedYUL' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as akt_is_opk_org -from filtered_data fd; - Y - - - 512 - 384 - - - - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - result - - - 672 - 384 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - TRUE - result - N - - - - - Change job status on success - Change job status on success - - - 864 - 240 - - - - Create job execution record - ExecSql - - Y - - 1 - - none - - - - - ervu-dashboard-test - N - N - Y - N - N - INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - - - - 320 - 384 - - - - Change job status on success - ExecSql - - Y - - 1 - - none - - - - - ervu-dashboard-test - Y - N - Y - N - N - UPDATE etl.job_execution -SET status = 'SUCCESS' -WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; - - - - - 1040 - 240 + 544 @@ -485,7 +102,7 @@ and recruitment_id = '${IDM_ID}'; error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -500,13 +117,13 @@ and recruitment_id = '${IDM_ID}'; - 1040 + 864 544 - Abort - Abort + Change job status on success + ExecSql Y @@ -515,22 +132,315 @@ and recruitment_id = '${IDM_ID}'; none - ABORT - Y - 0 + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + - 1216 - 544 + 1040 + 240 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = current_timestamp, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 320 + 384 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 672 + 240 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1040 + 384 + + + + Identify last row in a stream + DetectLastRow + + N + + 1 + + none + + + last_row + + + 672 + 384 + + + + employer_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with filteredData as (select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as rabotodat, + true as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'aktRabotodat' != 'null' + and to_date(ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' ->> + 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as rabotodat, + false as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'predRabotodat' != 'null' + and to_date(ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' ->> + 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.source_id, + fd.recruit_id, + to_date(rabotodat ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + COALESCE(rabotodat -> 'extend' ->> 'status', '0') = '1' AS status, + rabotodat -> 'extend' ->> 'adresRabotodat' as address, + rabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as separate_unit_type, + rabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as separate_unit_address, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then 'Индивидуальный предприниматель' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + end as employer_category_name, + rabotodat -> 'svedYUL' -> 'naimOrg' as name, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'svedIP' ->> 'innfl' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedYUL' ->> 'innyul' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' + then rabotodat -> 'svedGlKFH' ->> 'innfl' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' + then rabotodat -> 'svedPlatFL' ->> 'innfl' + end as inn, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedIP' ->> 'ogrnip' + end as ogrn, + case + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + end as kpp, + coalesce(rabotodat -> 'svedYUL' -> 'extend' ->> 'priznakOpk', '0') = '1' as is_opk_org, + actual_employer +from filteredData fd; + Y + + + 496 + 384 + + + + employer_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard + + + = + source_id + source_id + + + = + actual_employer + actual_employer + + ervu_dashboard + employer
+ + source_id + source_id + N + + + recruit_id + recruit_id + N + + + source_update_date + source_update_date + Y + + + address + address + Y + + + separate_unit_type_code + separate_unit_type + Y + + + separate_unit_address + separate_unit_address + Y + + + employer_category_name + employer_category_name + Y + + + name + name + Y + + + inn + inn + Y + + + ogrn + ogrn + Y + + + kpp + kpp + Y + + + actual_employer + actual_employer + Y + + + is_opk_org + is_opk_org + Y + +
+ N + + + 864 + 384
- Insert / update + employer_upsert Change job status on error Y - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl index 3f48109..24d9cec 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/parallel/employer_flow_repeat.hpl @@ -30,11 +30,6 @@ employer_input Y - - Filter rows - Change job status on success - Y - employer_input Identify last row in a stream @@ -42,26 +37,31 @@ Identify last row in a stream - akt_employer_upsert + employer_upsert Y - akt_employer_upsert - pred_employer_upsert - Y - - - akt_employer_upsert + employer_upsert Filter rows Y - akt_employer_upsert + employer_upsert Change job status on error Y - pred_employer_upsert + Detect empty stream + Change job status on success + Y + + + Identify last row in a stream + Detect empty stream + Y + + + Filter rows Change job status on success Y @@ -82,7 +82,7 @@ 0 - 1248 + 1072 560 @@ -102,7 +102,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -117,7 +117,7 @@ and recruitment_id = '${IDM_ID}'; - 1072 + 896 560 @@ -134,7 +134,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -165,22 +165,46 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard + N + N + Y N N INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}') +ON CONFLICT (job_name, recruitment_id) +DO UPDATE +SET status = 'PROCESSING', + error_description = null, + execution_datetime = current_timestamp; + 352 400 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 704 + 256 + + Filter rows FilterRows @@ -196,32 +220,40 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success Change job status on success - 896 - 256 + 1072 + 400 Identify last row in a stream DetectLastRow - Y + N 1 none - result + last_row 704 @@ -239,95 +271,63 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 - with filteredData as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.source_id, - fd.recruit_id, --- aktRabotodat - aktRabotodat -> 'dataSved' as akt_source_update_date, - aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, - aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, - aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, - case - when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as akt_employer_category_name, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' - END - as akt_name, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' - when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' - when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as akt_inn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' - END - as akt_ogrn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as akt_kpp, - true as akt_actual_employer, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as akt_is_opk_org, --- predRabotodat - predRabotodat -> 'dataSved' as pred_source_update_date, - predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, - predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, - predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, - case - when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as pred_employer_category_name, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' - END - as pred_name, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' - when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' - when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as pred_inn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' - END - as pred_ogrn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as pred_kpp, - false as pred_actual_employer, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as pred_is_opk_org + with filteredData as (select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as rabotodat, + true as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'aktRabotodat' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + (ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id') as source_id, + ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as rabotodat, + false as actual_employer + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'predRabotodat' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.source_id, + fd.recruit_id, + to_date(rabotodat ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + COALESCE(rabotodat -> 'extend' ->> 'status', '0') = '1' AS status, + rabotodat -> 'extend' ->> 'adresRabotodat' as address, + rabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as separate_unit_type, + rabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as separate_unit_address, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then 'Индивидуальный предприниматель' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' + end as employer_category_name, + rabotodat -> 'svedYUL' -> 'naimOrg' as name, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'svedIP' ->> 'innfl' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedYUL' ->> 'innyul' + when rabotodat ->> 'svedGlKFH' is not null and rabotodat ->> 'svedGlKFH' != 'null' + then rabotodat -> 'svedGlKFH' ->> 'innfl' + when rabotodat ->> 'svedPlatFL' is not null and rabotodat ->> 'svedPlatFL' != 'null' + then rabotodat -> 'svedPlatFL' ->> 'innfl' + end as inn, + case + when rabotodat ->> 'svedIP' is not null and rabotodat ->> 'svedIP' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'svedIP' ->> 'ogrnip' + end as ogrn, + case + when rabotodat ->> 'svedYUL' is not null and rabotodat ->> 'svedYUL' != 'null' + then rabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' + end as kpp, + coalesce(rabotodat -> 'svedYUL' -> 'extend' ->> 'priznakOpk', '0') = '1' as is_opk_org, + actual_employer from filteredData fd; Y @@ -337,102 +337,7 @@ from filteredData fd; - akt_employer_upsert - InsertUpdate - - N - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - source_id - - - ervu_dashboard - employer
- - source_id - source_id - Y - - - recruit_id - recruit_id - Y - - - source_update_date - akt_source_update_date - Y - - - address - akt_address - Y - - - separate_unit_type_code - akt_separate_unit_type - Y - - - separate_unit_address - akt_separate_unit_address - Y - - - employer_category_name - akt_employer_category_name - Y - - - name - akt_name - Y - - - inn - akt_inn - Y - - - ogrn - akt_ogrn - Y - - - kpp - akt_kpp - Y - - - actual_employer - akt_actual_employer - Y - - - is_opk_org - akt_is_opk_org - Y - -
- N - - - 896 - 400 - -
- - pred_employer_upsert + employer_upsert InsertUpdate Y @@ -449,90 +354,94 @@ from filteredData fd; = source_id source_id - + + + = + actual_employer + actual_employer ervu_dashboard employer
source_id source_id - Y + N recruit_id recruit_id - Y + N source_update_date - pred_source_update_date + source_update_date Y address - pred_address + address Y separate_unit_type_code - pred_separate_unit_type_code + separate_unit_type Y separate_unit_address - pred_separate_unit_address + separate_unit_address Y employer_category_name - pred_employer_category_name + employer_category_name Y name - pred_name + name Y inn - pred_inn + inn Y ogrn - pred_ogrn + ogrn Y kpp - pred_kpp + kpp Y actual_employer - pred_actual_employer + actual_employer Y is_opk_org - pred_is_opk_org + is_opk_org Y N - 1072 + 896 400
- akt_employer_upsert + employer_upsert Change job status on error Y - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl index a0965cf..15d97f9 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow.hpl @@ -59,15 +59,14 @@ ervu-dashboard-test N - SELECT -idm_id AS recruitment +idm_id FROM ervu_dashboard.recruitment; N 416 - 432 + 416 @@ -91,7 +90,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + idm_id @@ -147,7 +146,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + idm_id @@ -203,7 +202,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + idm_id @@ -259,7 +258,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + idm_id @@ -315,7 +314,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + idm_id diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl index 1e7c811..cbf15f2 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_delta.hpl @@ -26,8 +26,8 @@ Y - Table input - employer_flow_delta.hpl 3 + get_max_source_update_date + Table input Y @@ -35,6 +35,11 @@ employer_flow_delta.hpl 2 Y + + Table input + employer_flow_delta.hpl 3 + Y + Table input employer_flow_delta.hpl 4 @@ -60,12 +65,22 @@ ervu-dashboard-test N 0 + get_max_source_update_date SELECT - r.idm_id as recruitment_id + r.idm_id, + ? max_source_update_date FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'employer_job' + JOIN recruits_info ri + ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id + AND ri.updated_at > ( + SELECT MAX(execution_datetime) + FROM etl.job_execution + WHERE job_name = 'employer_job' + AND recruitment_id = r.idm_id + ) where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); N @@ -74,6 +89,29 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING 336 + + get_max_source_update_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select max(source_update_date) +from employer; + N + + + 400 + 336 + + employer_flow_delta.hpl PipelineExecutor @@ -95,13 +133,18 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING IDM_ID - recruitment_id + idm_id JOB_NAME - work_activity_job + employer_job + + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + Y @@ -151,13 +194,18 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING IDM_ID - recruitment_id + idm_id JOB_NAME - work_activity_job + employer_job + + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + Y @@ -207,13 +255,18 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING IDM_ID - recruitment_id + idm_id JOB_NAME - work_activity_job + employer_job + + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + Y @@ -263,13 +316,18 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING IDM_ID - recruitment_id + idm_id JOB_NAME - work_activity_job + employer_job + + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + Y @@ -319,13 +377,18 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING IDM_ID - recruitment_id + idm_id JOB_NAME - work_activity_job + employer_job + + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + Y diff --git a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_repeat.hpl similarity index 96% rename from mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl rename to mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_repeat.hpl index 54c5766..fd60da1 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/recruitment_five_flow_repeat.hpl @@ -1,7 +1,7 @@ - recruitment_five_flow_on_error + recruitment_five_flow_repeat Y @@ -60,13 +60,13 @@ ervu-dashboard-test N 0 - SELECT - r.idm_id as recruitment_id + SELECT r.idm_id AS recruitment_id FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - and job_name = 'employer_job' -where je.status is null or je.status in('ERROR', 'PROCESSING'); + AND je.job_name = 'employer_job' +WHERE je.id IS NULL + OR je.status IN ('ERROR', 'PROCESSING'); N @@ -101,7 +101,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + employer_job Y @@ -157,7 +157,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + employer_job Y @@ -213,7 +213,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + employer_job Y @@ -269,7 +269,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + employer_job Y @@ -325,7 +325,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + employer_job Y diff --git a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl index ad27771..548f683 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_employer_job_execution_exists.hpl @@ -62,15 +62,14 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS ( - SELECT 1 - FROM etl.job_execution - WHERE job_name = 'employer_job' - limit 1 - ) AS job_executed_flag; + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'employer_job' +) AS job_executed_flag; N diff --git a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl index 785a778..9e14dda 100644 --- a/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/employer/support/check_if_need_to_repeat.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS (SELECT 1 @@ -71,7 +71,6 @@ FROM ervu_dashboard.recruitment r ON r.idm_id = je.recruitment_id and job_name = 'employer_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') -limit 1 ) as need_to_repeat_job; N diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl index 401487b..a34334f 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow.hpl @@ -37,39 +37,54 @@ Identify last row in a stream - akt_individual_entrepreneur_output + individual_entrepreneur_output Y - akt_individual_entrepreneur_output - Change job status on error - Y - - - akt_individual_entrepreneur_output + individual_entrepreneur_output Filter rows Y - - akt_individual_entrepreneur_output - pred_individual_entrepreneur_output - Y - - - pred_individual_entrepreneur_output - Change job status on error - Y - - - pred_individual_entrepreneur_output - Change job status on success - Y - individual_entrepreneur_input Identify last row in a stream Y + + Identify last row in a stream + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + filter_null_npd_dates + unique_by_rec_id + Y + + + unique_by_rec_id + individual_entrepreneur_npd_output + Y + + + individual_entrepreneur_npd_output + Change job status on error + Y + + + individual_entrepreneur_output + Change job status on error + Y + + + Identify last row in a stream + filter_null_npd_dates + Y + Abort @@ -87,8 +102,8 @@ 0 - 1536 - 624 + 1648 + 576 @@ -107,7 +122,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -122,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1360 - 624 + 1440 + 576 @@ -139,7 +154,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -153,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1360 - 272 + 1440 + 288 @@ -170,7 +185,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y @@ -186,6 +201,23 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); 448 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 800 + 288 + + Filter rows FilterRows @@ -201,41 +233,31 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success - 1040 - 272 + 1440 + 448 Identify last row in a stream DetectLastRow - Y - - 1 - - none - - - result - - - 800 - 448 - - - - akt_individual_entrepreneur_output - TableOutput - N 1 @@ -243,67 +265,16 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - source_id - - - ogrnip - akt_ogrnip - - - source_update_date - akt_source_update_date - - - registration_date - akt_registration_date - - - reg_npd_date - akt_reg_npd_date - - - dereg_npd_date - akt_dereg_npd_date - - - actual - akt_actual - - - N - N - N - N - - Y - - N - ervu_dashboard - Y - individual_entrepreneur
- - N - Y - N - Y + last_row - 1040 + 800 448
- pred_individual_entrepreneur_output - TableOutput + filter_null_npd_dates + FilterRows Y @@ -312,66 +283,21 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - source_id - - - ogrnip - pred_ogrnip - - - source_update_date - pred_source_update_date - - - registration_date - pred_registration_date - - - deregistration_date - pred_deregistration_date - - - reg_npd_date - pred_reg_npd_date - - - dereg_npd_date - pred_dereg_npd_date - - - actual - pred_actual - - - N - N - N - N - - Y - - N - ervu_dashboard - Y - individual_entrepreneur
- - N - Y - N - Y + + + + + IS NOT NULL + reg_npd_date + N + - + + + unique_by_rec_id - 1360 - 448 + 800 + 576
@@ -385,34 +311,42 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 - with filtered_data as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' --- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - fd.source_id, - aktIp ->> 'ogrnip' as akt_ogrnip, - aktIp ->> 'dataSved' as akt_source_update_date, - aktIp ->> 'dataRegIP' as akt_registration_date, - aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, - aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, - true as akt_actual, - predIp ->> 'ogrnip' as pred_ogrnip, - predIp ->> 'dataSved' as pred_source_update_date, - predIp ->> 'dataRegIP' as pred_registration_date, - predIp ->> 'dataINNNed' as pred_deregistration_date, - predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, - predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, - false as pred_actual + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + true as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'predRegIP' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.recruit_id, + fd.source_id, + ip_elem ->> 'ogrnip' as ogrnip, + to_date(ip_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(ip_elem ->> 'dataRegIP', 'YYYY-MM-DD') as registration_date, + to_date(ip_elem ->> 'dataINNNed', 'YYYY-MM-DD') as deregistration_date, + reg_npd_date, + dereg_npd_date, + fd.actual as actual from filtered_data fd; Y @@ -421,13 +355,150 @@ from filtered_data fd; 448 + + individual_entrepreneur_npd_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard + + + recruit_id + recruit_id + + + source_id + source_id + + + register_date + reg_npd_date + + + deregistration_date + dereg_npd_date + + + N + N + N + N + Y + N + ervu_dashboard + Y + individual_entrepreneur_npd
+ N + Y + N + Y + + + 1184 + 576 + +
+ + individual_entrepreneur_output + TableOutput + + Y + + 1 + + none + + + 10000 + ervu-dashboard-test + + + recruit_id + recruit_id + + + source_id + source_id + + + ogrnip + ogrnip + + + source_update_date + source_update_date + + + registration_date + registration_date + + + deregistration_date + deregistration_date + + + actual + actual + + + N + N + N + N + Y + N + ervu_dashboard + Y + individual_entrepreneur
+ N + Y + N + Y + + + 1232 + 448 + +
+ + unique_by_rec_id + UniqueRowsByHashSet + + Y + + 1 + + none + + + N + N + + + + recruit_id + + + + + 976 + 576 + + - akt_individual_entrepreneur_output + individual_entrepreneur_npd_output Change job status on error Y - + error_description @@ -435,11 +506,11 @@ from filtered_data fd; - pred_individual_entrepreneur_output + individual_entrepreneur_output Change job status on error Y - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl index 7266814..686b0be 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_delta.hpl @@ -37,7 +37,7 @@ Identify last row in a stream - akt_individual_entrepreneur_upsert + individual_entrepreneur_upsert Y @@ -46,27 +46,42 @@ Y - akt_individual_entrepreneur_upsert - Change job status on error - Y - - - akt_individual_entrepreneur_upsert + individual_entrepreneur_upsert Filter rows Y - akt_individual_entrepreneur_upsert - pred_individual_entrepreneur_upsert + filter_null_npd_dates + unique_by_rec_id Y - pred_individual_entrepreneur_upsert + unique_by_rec_id + individual_entrepreneur_npd_upsert + Y + + + Identify last row in a stream + Detect empty stream + Y + + + Identify last row in a stream + filter_null_npd_dates + Y + + + individual_entrepreneur_upsert Change job status on error Y - pred_individual_entrepreneur_upsert + individual_entrepreneur_npd_upsert + Change job status on error + Y + + + Detect empty stream Change job status on success Y @@ -87,8 +102,8 @@ 0 - 1456 - 624 + 1616 + 592 @@ -107,14 +122,14 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y Y N UPDATE etl.job_execution -SET status = 'ERROR', +SET status = 'DELTA_ERROR', error_description = ? WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; @@ -122,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1280 - 624 + 1328 + 592 @@ -139,21 +154,21 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y N N UPDATE etl.job_execution -SET status = 'SUCCESS' +SET status = 'DELTA_SUCCESS' WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 1280 + 1616 272 @@ -170,22 +185,42 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y N N - INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = current_timestamp, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; 272 448 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 736 + 272 + + Filter rows FilterRows @@ -201,23 +236,49 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success - 992 - 272 + 1616 + 448 Identify last row in a stream DetectLastRow + N + + 1 + + none + + + last_row + + + 736 + 448 + + + + filter_null_npd_dates + FilterRows + Y 1 @@ -225,11 +286,21 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - result + + + + + IS NOT NULL + reg_npd_date + N + - + + + unique_by_rec_id 736 - 448 + 592 @@ -243,36 +314,46 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 - with filtered_data as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' - and (ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' - or ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}') --- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - fd.source_id, - aktIp ->> 'ogrnip' as akt_ogrnip, - aktIp ->> 'dataSved' as akt_source_update_date, - aktIp ->> 'dataRegIP' as akt_registration_date, - aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, - aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, - true as akt_actual, - predIp ->> 'ogrnip' as pred_ogrnip, - predIp ->> 'dataSved' as pred_source_update_date, - predIp ->> 'dataRegIP' as pred_registration_date, - predIp ->> 'dataINNNed' as pred_deregistration_date, - predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, - predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, - false as pred_actual + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + true as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'aktRegIP' != 'null' + and to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' ->> 'dataSved', + 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'predRegIP' != 'null' + and to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' ->> 'dataSved', + 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.recruit_id, + fd.source_id, + ip_elem ->> 'ogrnip' as ogrnip, + to_date(ip_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(ip_elem ->> 'dataRegIP', 'YYYY-MM-DD') as registration_date, + to_date(ip_elem ->> 'dataINNNed', 'YYYY-MM-DD') as deregistration_date, + reg_npd_date, + dereg_npd_date, + fd.actual as actual from filtered_data fd; Y @@ -282,10 +363,10 @@ from filtered_data fd; - akt_individual_entrepreneur_upsert + individual_entrepreneur_npd_upsert InsertUpdate - N + Y 1 @@ -293,16 +374,15 @@ from filtered_data fd; 10000 - ervu-dashboard-test + ervu-dashboard = - source_id - source_id - + recruit_id + recruit_id ervu_dashboard - individual_entrepreneur
+ individual_entrepreneur_npd
recruit_id recruit_id @@ -314,45 +394,25 @@ from filtered_data fd; N - ogrnip - akt_ogrnip - Y - - - source_update_date - akt_source_update_date - Y - - - registration_date - akt_registration_date - Y - - - reg_npd_date - akt_reg_npd_date + register_date + reg_npd_date Y deregistration_date - akt_dereg_npd_date - Y - - - actual - akt_actual + dereg_npd_date Y
N - 992 - 448 + 1104 + 592
- pred_individual_entrepreneur_upsert + individual_entrepreneur_upsert InsertUpdate Y @@ -384,54 +444,69 @@ from filtered_data fd; ogrnip - pred_ogrnip + ogrnip Y source_update_date - pred_source_update_date + source_update_date Y registration_date - pred_registration_date + registration_date Y deregistration_date - pred_deregistration_date - Y - - - reg_npd_date - pred_reg_npd_date - Y - - - dereg_npd_date - pred_dereg_npd_date + dereg_npd_date Y actual - pred_actual + actual Y N - 1280 + 1328 448 + + unique_by_rec_id + UniqueRowsByHashSet + + Y + + 1 + + none + + + N + N + + + + recruit_id + + + + + 912 + 592 + + - akt_individual_entrepreneur_upsert + individual_entrepreneur_npd_upsert Change job status on error Y - + error_description @@ -439,11 +514,11 @@ from filtered_data fd; - pred_individual_entrepreneur_upsert + individual_entrepreneur_upsert Change job status on error Y - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl index a9ef581..2234039 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/parallel/individual_entrepreneur_flow_repeat.hpl @@ -40,33 +40,48 @@ Identify last row in a stream Y + + filter_null_npd_dates + unique_by_rec_id + Y + Identify last row in a stream - akt_individual_entrepreneur_upsert + Detect empty stream Y - akt_individual_entrepreneur_upsert - pred_individual_entrepreneur_upsert - Y - - - akt_individual_entrepreneur_upsert - Filter rows - Y - - - pred_individual_entrepreneur_upsert + Detect empty stream Change job status on success Y - pred_individual_entrepreneur_upsert + Identify last row in a stream + individual_entrepreneur_upsert + Y + + + individual_entrepreneur_upsert + Filter rows + Y + + + individual_entrepreneur_upsert Change job status on error Y - akt_individual_entrepreneur_upsert + unique_by_rec_id + individual_entrepreneur_npd_upsert + Y + + + Identify last row in a stream + filter_null_npd_dates + Y + + + individual_entrepreneur_npd_upsert Change job status on error Y @@ -87,8 +102,8 @@ 0 - 1696 - 640 + 1856 + 624 @@ -107,7 +122,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -122,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1520 - 640 + 1568 + 624 @@ -139,7 +154,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -153,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1520 - 288 + 1856 + 304 @@ -170,22 +185,46 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard + N + N + Y N N INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}') +ON CONFLICT (job_name, recruitment_id) +DO UPDATE +SET status = 'PROCESSING', + error_description = null, + execution_datetime = current_timestamp; + 512 464 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 976 + 304 + + Filter rows FilterRows @@ -201,23 +240,49 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success - 1232 - 288 + 1856 + 464 Identify last row in a stream DetectLastRow + N + + 1 + + none + + + last_row + + + 976 + 464 + + + + filter_null_npd_dates + FilterRows + Y 1 @@ -225,11 +290,21 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - result + + + + + IS NOT NULL + reg_npd_date + N + - + + + unique_by_rec_id 976 - 464 + 624 @@ -243,34 +318,42 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 - with filtered_data as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' --- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - fd.source_id, - aktIp ->> 'ogrnip' as akt_ogrnip, - aktIp ->> 'dataSved' as akt_source_update_date, - aktIp ->> 'dataRegIP' as akt_registration_date, - aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, - aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, - true as akt_actual, - predIp ->> 'ogrnip' as pred_ogrnip, - predIp ->> 'dataSved' as pred_source_update_date, - predIp ->> 'dataRegIP' as pred_registration_date, - predIp ->> 'dataINNNed' as pred_deregistration_date, - predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, - predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, - false as pred_actual + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + true as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'aktRegIP' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, + ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as ip_elem, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataUchNPD', + 'YYYY-MM-DD') as reg_npd_date, + to_date(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'extend' ->> 'dataSnUchNPD', + 'YYYY-MM-DD') as dereg_npd_date, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'predRegIP' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.recruit_id, + fd.source_id, + ip_elem ->> 'ogrnip' as ogrnip, + to_date(ip_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(ip_elem ->> 'dataRegIP', 'YYYY-MM-DD') as registration_date, + to_date(ip_elem ->> 'dataINNNed', 'YYYY-MM-DD') as deregistration_date, + reg_npd_date, + dereg_npd_date, + fd.actual as actual from filtered_data fd; Y @@ -280,77 +363,7 @@ from filtered_data fd; - akt_individual_entrepreneur_upsert - InsertUpdate - - N - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - source_id - - - ervu_dashboard - individual_entrepreneur
- - recruit_id - recruit_id - N - - - source_id - source_id - N - - - ogrnip - akt_ogrnip - Y - - - source_update_date - akt_source_update_date - Y - - - registration_date - akt_registration_date - Y - - - reg_npd_date - akt_reg_npd_date - Y - - - deregistration_date - akt_dereg_npd_date - Y - - - actual - akt_actual - Y - -
- N - - - 1232 - 464 - -
- - pred_individual_entrepreneur_upsert + individual_entrepreneur_npd_upsert InsertUpdate Y @@ -361,13 +374,61 @@ from filtered_data fd; 10000 - ervu-dashboard-test + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + individual_entrepreneur_npd
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + register_date + reg_npd_date + Y + + + deregistration_date + dereg_npd_date + Y + +
+ N + + + 1328 + 624 + +
+ + individual_entrepreneur_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard = source_id source_id - ervu_dashboard individual_entrepreneur
@@ -383,54 +444,69 @@ from filtered_data fd; ogrnip - pred_ogrnip + ogrnip Y source_update_date - pred_source_update_date + source_update_date Y registration_date - pred_registration_date + registration_date Y deregistration_date - pred_deregistration_date - Y - - - reg_npd_date - pred_reg_npd_date - Y - - - dereg_npd_date - pred_dereg_npd_date + dereg_npd_date Y actual - pred_actual + actual Y
N - 1520 + 1568 464
+ + unique_by_rec_id + UniqueRowsByHashSet + + Y + + 1 + + none + + + N + N + + + + recruit_id + + + + + 1136 + 624 + + - akt_individual_entrepreneur_upsert + individual_entrepreneur_npd_upsert Change job status on error Y - + error_description @@ -438,11 +514,11 @@ from filtered_data fd; - pred_individual_entrepreneur_upsert + individual_entrepreneur_upsert Change job status on error Y - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl index d9de951..afcab3f 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_delta.hpl @@ -25,6 +25,11 @@ individual_entrepreneur_flow_delta.hpl Y + + Get_max_source_update_date + Table input + Y + Table input individual_entrepreneur_flow_delta.hpl 2 @@ -46,6 +51,29 @@ Y + + Get_max_source_update_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select max(source_update_date) + from individual_entrepreneur; + N + + + 368 + 384 + + Table input TableInput @@ -60,12 +88,22 @@ ervu-dashboard-test N 0 + Get_max_source_update_date SELECT - r.idm_id as recruitment_id + r.idm_id as recruitment_id, + ? as max_source_update_date FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'individual_entrepreneur_job' +JOIN recruits_info ri + ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id + AND ri.updated_at > ( + SELECT MAX(execution_datetime) + FROM etl.job_execution + WHERE job_name = 'individual_entrepreneur_job' + AND recruitment_id = r.idm_id + ) where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); N @@ -103,6 +141,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING individual_entrepreneur_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -159,6 +202,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING individual_entrepreneur_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -215,6 +263,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING individual_entrepreneur_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -271,6 +324,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING individual_entrepreneur_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -327,6 +385,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING individual_entrepreneur_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl index d7eab5d..f22131b 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/recruitment_five_flow_repeat.hpl @@ -60,9 +60,13 @@ ervu-dashboard-test N 0 - SELECT -idm_id AS recruitment -FROM ervu_dashboard.recruitment; + SELECT r.idm_id AS recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + AND je.job_name = 'individual_entrepreneur_job' +WHERE je.id IS NULL + OR je.status IN ('ERROR', 'PROCESSING'); N @@ -91,7 +95,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + recruitment_id @@ -147,7 +151,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + recruitment_id @@ -203,7 +207,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + recruitment_id @@ -259,7 +263,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + recruitment_id @@ -315,7 +319,7 @@ FROM ervu_dashboard.recruitment; IDM_ID - recruitment + recruitment_id diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl index 375b3bb..ad8c141 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl @@ -62,14 +62,13 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS ( SELECT 1 FROM etl.job_execution WHERE job_name = 'individual_entrepreneur_job' - limit 1 ) AS job_executed_flag; N diff --git a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl index 44e3f9a..ba373bd 100644 --- a/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_need_to_repeat.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS (SELECT 1 @@ -71,7 +71,6 @@ FROM ervu_dashboard.recruitment r ON r.idm_id = je.recruitment_id and job_name = 'individual_entrepreneur_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') -limit 1 ) as need_to_repeat_job; N diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl index 32777a0..e40fee1 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow.hpl @@ -30,11 +30,6 @@ self_employed_input Y - - akt_self_employed_output - pred_self_employed_output - Y - self_employed_input Identify last row in a stream @@ -42,35 +37,129 @@ Identify last row in a stream - akt_self_employed_output + self_employed_output Y - akt_self_employed_output + self_employed_output Filter rows Y - - pred_self_employed_output - Change job status on success - Y - Filter rows Change job status on success Y - akt_self_employed_output + self_employed_output Change job status on error Y - pred_self_employed_output - Change job status on error + Identify last row in a stream + Detect empty stream + Y + + + Detect empty stream + Change job status on success Y + + Abort + Abort + + Y + + 1 + + none + + + ABORT + Y + 0 + + + 1040 + 384 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + + Y + + N + + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 832 + 384 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + + Y + + N + + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + + 1040 + 48 + + Create job execution record ExecSql @@ -84,7 +173,7 @@ - ervu-dashboard-test + ervu-dashboard N @@ -105,8 +194,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - Change job status on success - ExecSql + Detect empty stream + DetectEmptyStream Y @@ -115,254 +204,10 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - - - ervu-dashboard-test - Y - N - Y - N - N - UPDATE etl.job_execution -SET status = 'SUCCESS' -WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; - - - - - 1040 - 48 - - - - Abort - Abort - - Y - - 1 - - none - - - ABORT - Y - 0 - - - 1216 - 400 - - - - Change job status on error - ExecSql - - Y - - 1 - - none - - - - - error_description - - - ervu-dashboard-test - Y - N - Y - Y - N - UPDATE etl.job_execution -SET status = 'ERROR', - error_description = ? -WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; - - - - - 1040 - 400 - - - - self_employed_input - TableInput - - Y - - 1 - - none - - - ervu-dashboard-test - N - 0 - with filtered_data as (select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' - limit 1) -select fd.recruit_id, - aktNpd ->> 'id' as akt_source_id, - aktNpd ->> 'dataSved' as akt_source_update_date, - aktNpd ->> 'dataUchNPD' as akt_register_date, - true as akt_actual, - predNpd ->> 'id' as pred_source_id, - predNpd ->> 'dataSved' as pred_source_update_date, - predNpd ->> 'dataUchNPD' as pred_register_date, - predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, - false as pred_actual -from filtered_data fd; - Y - - - 432 - 224 - - - - akt_self_employed_output - TableOutput - - N - - 1 - - none - - - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - akt_source_id - - - source_update_date - akt_source_update_date - - - register_date - akt_register_date - - - actual - akt_actual - - - N - N - N - N - - Y - - N - ervu_dashboard - Y - self_employed
- - N - Y - N - Y - - - 832 - 224 - -
- - pred_self_employed_output - TableOutput - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - pred_source_id - - - source_update_date - pred_source_update_date - - - register_date - pred_register_date - - - deregistration_date - pred_deregistration_date - - - actual - pred_actual - - - N - N - N - N - - Y - - N - ervu_dashboard - Y - self_employed
- - N - Y - N - Y - - - 1040 - 224 - -
- - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - result 624 - 224 + 48 @@ -380,38 +225,156 @@ from filtered_data fd; - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success + + 1040 + 224 + + + + Identify last row in a stream + DetectLastRow + + N + + 1 + + none + + + last_row + + + 624 + 224 + + + + self_employed_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as npd_elem, + true as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'aktNPD' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as npd_elem, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'predNPD' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.recruit_id, + npd_elem ->> 'id' as source_id, + to_date(npd_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(npd_elem ->> 'dataUchNPD', 'YYYY-MM-DD') as register_date, + to_date(npd_elem ->> 'dataSnUchNPD', 'YYYY-MM-DD') as deregistration_date, + actual +from filtered_data fd; + Y + + + 432 + 224 + + + + self_employed_output + TableOutput + + N + + 1 + + none + + + 10000 + ervu-dashboard + + + recruit_id + recruit_id + + + source_id + source_id + + + source_update_date + source_update_date + + + register_date + register_date + + + deregistration_date + deregistration_date + + + actual + actual + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + self_employed
+ + N + Y + N + Y + 832 - 48 + 224
- akt_self_employed_output + self_employed_output Change job status on error Y - - - - - - - - - pred_self_employed_output - Change job status on error - Y - - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl index 5f4390a..5d0789d 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_delta.hpl @@ -22,21 +22,11 @@ Create job execution record - Table input + self_employed_input Y self_employed_upsert - pred_self_employed_upsert - Y - - - self_employed_upsert - Change job status on error - Y - - - pred_self_employed_upsert Change job status on error Y @@ -46,7 +36,7 @@ Y - Table input + self_employed_input Identify last row in a stream Y @@ -66,11 +56,36 @@ Y - pred_self_employed_upsert + Detect empty stream Change job status on success Y + + Identify last row in a stream + Detect empty stream + Y + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1040 + 416 + + Change job status on error ExecSql @@ -87,12 +102,9 @@ error_description - ervu-dashboard-test - + ervu-dashboard Y - N - Y Y N @@ -103,11 +115,10 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 1040 - 432 + 848 + 416 @@ -123,7 +134,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -154,7 +165,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y @@ -163,20 +174,19 @@ and recruitment_id = '${IDM_ID}'; UPDATE etl.job_execution SET status = 'DELTA_PROCESSING', - execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL + execution_datetime = current_timestamp, + error_description = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 256 + 272 224 - Table input - TableInput + Detect empty stream + DetectEmptyStream Y @@ -185,188 +195,10 @@ and recruitment_id = '${IDM_ID}'; none - ervu-dashboard-test - N - 0 - with filtered_data as (select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' - --and ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' - --or ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' ->> 'dataSved' > '${MAX_SOURCE_UPDATE_DATE}' - limit 1) -select fd.recruit_id, - aktNpd ->> 'id' as akt_source_id, - aktNpd ->> 'dataSved' as akt_source_update_date, - aktNpd ->> 'dataUchNPD' as akt_register_date, - true as akt_actual, - predNpd ->> 'id' as pred_source_id, - predNpd ->> 'dataSved' as pred_source_update_date, - predNpd ->> 'dataUchNPD' as pred_register_date, - predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, - false as pred_actual -from filtered_data fd; - Y - - - 464 - 224 - - - - self_employed_upsert - InsertUpdate - - N - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - akt_source_id - - - ervu_dashboard - self_employed
- - recruit_id - recruit_id - N - - - source_id - akt_source_id - N - - - source_update_date - akt_source_update_date - Y - - - register_date - akt_register_date - Y - - - actual - akt_actual - Y - -
- N - - - 816 - 224 - -
- - pred_self_employed_upsert - InsertUpdate - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - akt_source_id - - - ervu_dashboard - self_employed
- - recruit_id - recruit_id - N - - - source_id - pred_source_id - N - - - source_update_date - pred_source_update_date - Y - - - register_date - pred_register_date - Y - - - deregistration_date - pred_deregistration_date - Y - - - actual - pred_actual - Y - -
- N - - - 1040 - 224 - -
- - Abort - Abort - - Y - - 1 - - none - - - ABORT_WITH_ERROR - Y - - 0 - - - 1296 - 432 - - - - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - result 624 - 224 + 16 @@ -384,17 +216,143 @@ from filtered_data fd; - TRUE - result + = + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success - 816 - 16 + 1040 + 224 + + + + Identify last row in a stream + DetectLastRow + + N + + 1 + + none + + + last_row + + + 624 + 224 + + + + self_employed_input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + with filtered_data as (select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as npd_elem, + true as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'aktNPD' != 'null' + and + to_date(ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' ->> 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as npd_elem, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'predNPD' != 'null' + and to_date(ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' ->> 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +select fd.recruit_id, + npd_elem ->> 'id' as source_id, + to_date(npd_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(npd_elem ->> 'dataUchNPD', 'YYYY-MM-DD') as register_date, + to_date(npd_elem ->> 'dataSnUchNPD', 'YYYY-MM-DD') as deregistration_date, + actual +from filtered_data fd; + Y + + + 448 + 224 + + + + self_employed_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard + + + = + source_id + source_id + + ervu_dashboard + self_employed
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + source_update_date + source_update_date + Y + + + register_date + register_date + Y + + + actual + actual + Y + +
+ N + + + 848 + 224
@@ -403,19 +361,7 @@ from filtered_data fd; Change job status on error Y - - - - - - -
- - pred_self_employed_upsert - Change job status on error - Y - - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl similarity index 69% rename from mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl rename to mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl index b84e7fe..405ec68 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl @@ -1,7 +1,7 @@ - self_employed_flow_on_error + self_employed_flow_repeat Y @@ -42,34 +42,29 @@ Identify last row in a stream - akt_self_employed_output + self_employed_output Y - akt_self_employed_output - pred_self_employed_output - Y - - - akt_self_employed_output + self_employed_output Filter rows Y - pred_self_employed_output + self_employed_output + Change job status on error + Y + + + Identify last row in a stream + Detect empty stream + Y + + + Detect empty stream Change job status on success Y - - pred_self_employed_output - Change job status on error - Y - - - akt_self_employed_output - Change job status on error - Y - Abort @@ -87,8 +82,8 @@ 0 - 1248 - 592 + 1072 + 576 @@ -107,7 +102,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -122,8 +117,8 @@ and recruitment_id = '${IDM_ID}'; - 1072 - 592 + 864 + 576 @@ -139,7 +134,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -170,22 +165,42 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y N N INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - - +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}') +ON CONFLICT (job_name, recruitment_id) +DO UPDATE +SET status = 'PROCESSING', + error_description = null, + execution_datetime = current_timestamp; 256 416 + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 656 + 240 + + Filter rows FilterRows @@ -202,30 +217,38 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); TRUE - result + last_row N - + + N + -1 + constant + -1 + Y + Boolean + Change job status on success - 864 - 240 + 1072 + 416 Identify last row in a stream DetectLastRow - Y + N 1 none - result + last_row 656 @@ -243,26 +266,30 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N 0 with filtered_data as (select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as npd_elem, + true as actual from recruits_info ri - where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' - limit 1) + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'aktNPD' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + + union all + + select ri.recruit_id, + ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as npd_elem, + false as actual + from recruits_info ri + where ri.info -> 'svedFL' -> 'svedNPD' ->> 'predNPD' != 'null' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') select fd.recruit_id, - aktNpd ->> 'id' as akt_source_id, - aktNpd ->> 'dataSved' as akt_source_update_date, - aktNpd ->> 'dataUchNPD' as akt_register_date, - true as akt_actual, - predNpd ->> 'id' as pred_source_id, - predNpd ->> 'dataSved' as pred_source_update_date, - predNpd ->> 'dataUchNPD' as pred_register_date, - predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, - false as pred_actual + npd_elem ->> 'id' as source_id, + to_date(npd_elem ->> 'dataSved', 'YYYY-MM-DD') as source_update_date, + to_date(npd_elem ->> 'dataUchNPD', 'YYYY-MM-DD') as register_date, + to_date(npd_elem ->> 'dataSnUchNPD', 'YYYY-MM-DD') as deregistration_date, + actual from filtered_data fd; Y @@ -272,7 +299,7 @@ from filtered_data fd; - akt_self_employed_output + self_employed_output InsertUpdate N @@ -283,13 +310,12 @@ from filtered_data fd; 10000 - ervu-dashboard-test + ervu-dashboard = source_id - akt_source_id - + source_id ervu_dashboard self_employed
@@ -300,22 +326,22 @@ from filtered_data fd; source_id - akt_source_id - Y + source_id + N source_update_date - akt_source_update_date + source_update_date Y register_date - akt_register_date + register_date Y actual - akt_actual + actual Y
@@ -326,85 +352,13 @@ from filtered_data fd; 416
- - pred_self_employed_output - InsertUpdate - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - = - source_id - pred_source_id - - - ervu_dashboard - self_employed
- - recruit_id - recruit_id - N - - - source_id - pred_source_id - Y - - - source_update_date - pred_source_update_date - Y - - - register_date - pred_register_date - Y - - - deregistration_date - pred_deregistration_date - Y - - - actual - pred_actual - Y - -
- N - - - 1072 - 416 - -
- akt_self_employed_output + self_employed_output Change job status on error Y - - - - - - - - - pred_self_employed_output - Change job status on error - Y - - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl index ced7307..a5979c8 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/recruitment_five_flow_delta.hpl @@ -20,6 +20,11 @@ + + Get_max_source_update_date + Table input + Y + Table input self_employed_flow_delta.hpl @@ -46,6 +51,29 @@ Y + + Get_max_source_update_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select max(source_update_date) + from self_employed; + N + + + 208 + 496 + + Table input TableInput @@ -57,20 +85,30 @@ none - ervu-dashboard-test + ervu-dashboard N 0 + Get_max_source_update_date SELECT - r.idm_id as recruitment_id + r.idm_id AS recruitment_id, + ? as max_source_update_date FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - and job_name = 'self_employed_job' -where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + AND je.job_name = 'self_employed_job' + JOIN recruits_info ri + ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id + AND ri.updated_at > ( + SELECT MAX(execution_datetime) + FROM etl.job_execution + WHERE job_name = 'self_employed_job' + AND recruitment_id = r.idm_id + ) +WHERE je.status IN ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); N - 416 + 384 496 @@ -103,6 +141,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING self_employed_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -159,6 +202,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING self_employed_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -215,6 +263,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING self_employed_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -271,6 +324,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING self_employed_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -327,6 +385,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING self_employed_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl index 7d0f996..683de97 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/recruitments_five_flow_repeat.hpl @@ -22,27 +22,27 @@ Table input - self_employed_flow_on_error.hpl + self_employed_flow_repeat.hpl Y Table input - self_employed_flow_on_error.hpl 2 + self_employed_flow_repeat.hpl 2 Y Table input - self_employed_flow_on_error.hpl 3 + self_employed_flow_repeat.hpl 3 Y Table input - self_employed_flow_on_error.hpl 4 + self_employed_flow_repeat.hpl 4 Y Table input - self_employed_flow_on_error.hpl 5 + self_employed_flow_repeat.hpl 5 Y @@ -75,7 +75,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); - self_employed_flow_on_error.hpl + self_employed_flow_repeat.hpl PipelineExecutor Y @@ -86,7 +86,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl N 1 @@ -101,7 +101,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + self_employed_job Y @@ -131,7 +131,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); - self_employed_flow_on_error.hpl 2 + self_employed_flow_repeat.hpl 2 PipelineExecutor Y @@ -142,7 +142,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl N 1 @@ -157,7 +157,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + self_employed_job Y @@ -187,7 +187,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); - self_employed_flow_on_error.hpl 3 + self_employed_flow_repeat.hpl 3 PipelineExecutor Y @@ -198,7 +198,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl N 1 @@ -213,7 +213,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + self_employed_job Y @@ -243,7 +243,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); - self_employed_flow_on_error.hpl 4 + self_employed_flow_repeat.hpl 4 PipelineExecutor Y @@ -254,7 +254,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl N 1 @@ -269,7 +269,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + self_employed_job Y @@ -299,7 +299,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); - self_employed_flow_on_error.hpl 5 + self_employed_flow_repeat.hpl 5 PipelineExecutor Y @@ -310,7 +310,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); local - ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/self_employed/parallel/self_employed_flow_repeat.hpl N 1 @@ -325,7 +325,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING'); JOB_NAME - work_activity_job + self_employed_job Y diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl index 652acfd..a7a966c 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_need_to_repeat.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS (SELECT 1 diff --git a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl index e02aaf2..494e70f 100644 --- a/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/self_employed/support/check_if_self_employed_job_execution_exists.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS ( diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl index c21323a..3b7cbfc 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow.hpl @@ -20,51 +20,11 @@ - - individual_entrepreneur_input - akt_individual_entrepreneur_output - Y - - - npd_input - akt_npd_output - Y - - - employer_input - actual_employer_output - Y - - - employer_input - pred_employer_output - Y - - - npd_input - pred_npd_output - Y - - - individual_entrepreneur_input - Table output - Y - - - citizen_work_activity_output - employee_parental_leave_output - Y - Create job execution record citizen_work_activity_input Y - - employee_parental_leave_output - Change job status on error - Y - citizen_work_activity_output Change job status on error @@ -75,11 +35,6 @@ Abort Y - - employee_parental_leave_output - Change job status on success - Y - citizen_work_activity_input Identify last row in a stream @@ -100,6 +55,31 @@ Change job status on success Y + + Identify last row in a stream + Detect empty stream + Y + + + Detect empty stream + Filter rows + Y + + + Identify last row in a stream + Filter_null_parental_leave_dates + Y + + + Filter_null_parental_leave_dates + employee_parental_leave_output + Y + + + employee_parental_leave_output + Change job status on error + Y + Abort @@ -117,7 +97,7 @@ 0 - 1248 + 1424 528 @@ -137,7 +117,7 @@ error_description - ervu-dashboard-test + ervu-dashboard Y N Y @@ -152,7 +132,7 @@ and recruitment_id = '${IDM_ID}'; - 1056 + 1200 528 @@ -169,7 +149,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard Y N Y @@ -183,7 +163,7 @@ and recruitment_id = '${IDM_ID}'; - 1168 + 1424 144 @@ -200,7 +180,7 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test + ervu-dashboard N N Y @@ -217,8 +197,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - Table output - TableOutput + Detect empty stream + DetectEmptyStream Y @@ -227,29 +207,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - 1000 - - - N - N - N - N - Y - N - N - N - Y - N - Y - 976 - 1376 + 704 + 144 - actual_employer_output - TableOutput + Filter rows + FilterRows Y @@ -258,84 +224,34 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - 10000 - ervu-dashboard-test - - - source_id - source_id - - - recruit_id - recruit_id - - - source_update_date - akt_source_update_date - - - address - akt_address - - - separate_unit_type_code - akt_separate_unit_type_code - - - separate_unit_address - akt_separate_unit_address - - - employer_category_name - akt_employer_category_name - - - name - akt_name - - - inn - akt_inn - - - ogrn - akt_ogrn - - - kpp - akt_kpp - - - actual_employer - akt_actual_employer - - - is_opk_org - akt_is_opk_org - - - N - N - N - N - Y - N - ervu_dashboard - Y - employer
- N - Y - N - Y + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success - 976 - 816 + 1200 + 144
- akt_individual_entrepreneur_output - TableOutput + Filter_null_parental_leave_dates + FilterRows Y @@ -344,113 +260,39 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - source_id - - - ogrnip - akt_ogrnip - - - source_update_date - akt_source_update_date - - - registration_date - akt_registration_date - - - reg_npd_date - akt_reg_npd_date - - - dereg_npd_date - akt_dereg_npd_date - - - actual - akt_actual - - - N - N - N - N - Y - N - ervu_dashboard - Y - individual_entrepreneur
- N - Y - N - Y + + + + + IS NOT NULL + parental_leave_start_date + N + - + + + employee_parental_leave_output - 976 - 1248 + 704 + 528
- akt_npd_output - TableOutput + Identify last row in a stream + DetectLastRow - Y + N 1 none - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - akt_source_id - - - source_update_date - akt_source_update_id - - - register_date - akt_register_date - - - actual - akt_actual - - - N - N - N - N - Y - N - ervu_dashboard - Y - self_employed
- N - Y - N - Y + last_row - 976 - 1056 + 704 + 320
@@ -464,35 +306,36 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard-test + ervu-dashboard N - with filteredData as ( - select ri.recruit_id, - ri.info - from recruits_info ri - where jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' - and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -SELECT - fd.recruit_id, - trud_elem ->> 'id' AS source_id, - trud_elem -> 'svedOrg' ->> 'naimOrg' AS employer_name, - trud_elem ->> 'trudFunkcziya' AS position, - trud_elem ->> 'dataMeropr' AS personnel_event_date, - trud_elem ->> 'naimTipKadrMeropr' AS personnel_event_type, - trud_elem ->> 'dataSved' AS source_update_date, - (trud_elem ->> 'prAktMestRab') = '1' AS actual_employer, - uhod_elem ->> 'dataNachUhodReb' AS parental_leave_start_date, - uhod_elem ->> 'dataKonUhodReb' AS parental_leave_end_date -from filteredData fd - cross join jsonb_array_elements(fd.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') as trud_elem - LEFT JOIN LATERAL jsonb_array_elements( - CASE - WHEN jsonb_typeof(trud_elem -> 'svedUhodReb') = 'array' - THEN trud_elem -> 'svedUhodReb' - ELSE '[]'::jsonb - END - ) AS uhod_elem ON true; + WITH filteredData AS (SELECT ri.recruit_id, + trud_elem, + uhod_elem + FROM recruits_info ri + CROSS JOIN LATERAL jsonb_array_elements( + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' + ) AS trud_elem + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(trud_elem -> 'svedUhodReb') = 'array' + THEN trud_elem -> 'svedUhodReb' + ELSE '[]'::jsonb + END + ) AS uhod_elem ON true + WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +SELECT fd.recruit_id, + trud_elem ->> 'id' AS source_id, + trud_elem -> 'svedOrg' ->> 'naimOrg' AS employer_name, + trud_elem ->> 'trudFunkcziya' AS position, + to_date(trud_elem ->> 'dataMeropr', 'YYYY-MM-DD') AS personnel_event_date, + trud_elem ->> 'naimTipKadrMeropr' AS personnel_event_type, + to_date(trud_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, + (trud_elem ->> 'prAktMestRab') = '1' AS actual_employer, + to_date(uhod_elem ->> 'dataNachUhodReb', 'YYYY-MM-DD') AS parental_leave_start_date, + to_date(uhod_elem ->> 'dataKonUhodReb', 'YYYY-MM-DD') AS parental_leave_end_date +FROM filteredData fd; + Y @@ -504,7 +347,7 @@ from filteredData fd citizen_work_activity_output TableOutput - N + Y 1 @@ -512,7 +355,7 @@ from filteredData fd 10000 - ervu-dashboard-test + ervu-dashboard source_id @@ -562,7 +405,7 @@ from filteredData fd Y - 944 + 1200 320 @@ -578,18 +421,18 @@ from filteredData fd 10000 - ervu-dashboard-test + ervu-dashboard citizen_work_activity_source_id source_id - start_date + parental_leave_start_date parental_leave_start_date - end_date + parental_leave_end_date parental_leave_end_date @@ -608,451 +451,17 @@ from filteredData fd Y - 1168 - 320 - - - - employer_input - TableInput - - N - - 1 - - none - - - ervu-dashboard-test - N - 0 - with filteredData as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat' as aktRabotodat, - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' as predRabotodat - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRabotodat' ->> 'rabotodat' != 'null' - -- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.source_id, - fd.recruit_id, --- aktRabotodat - aktRabotodat -> 'dataSved' as akt_source_update_date, - aktRabotodat -> 'extend' ->> 'adresRabotodat' as akt_address, - aktRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as akt_separate_unit_type, - aktRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as akt_separate_unit_address, - case - when aktRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when aktRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when aktRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when aktRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as akt_employer_category_name, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'naimOrg' - END - as akt_name, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'svedIP' ->> 'innfl' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' ->> 'innyul' - when aktRabotodat ->> 'svedGlKFH' != 'null' then aktRabotodat -> 'svedGlKFH' ->> 'innfl' - when aktRabotodat ->> 'svedPlatFL' != 'null' then aktRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as akt_inn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedIP' ->> 'ogrnip' - END - as akt_ogrn, - case - when aktRabotodat ->> 'svedIP' != 'null' then aktRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as akt_kpp, - true as akt_actual_employer, - case - when aktRabotodat ->> 'svedYUL' != 'null' then aktRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as akt_is_opk_org, --- predRabotodat - predRabotodat -> 'dataSved' as pred_source_update_date, - predRabotodat -> 'extend' ->> 'adresRabotodat' as pred_address, - predRabotodat -> 'extend' ->> 'tipPodrazdRabotodat' as pred_separate_unit_type_code, - predRabotodat -> 'extend' ->> 'adresPodrazdRabotodat' as pred_separate_unit_address, - case - when predRabotodat ->> 'svedIP' != 'null' then 'Индивидуальный предприниматель' - when predRabotodat ->> 'svedYUL' != 'null' then 'Юридическое лицо' - when predRabotodat ->> 'svedGlKFH' != 'null' then 'Глава КФХ' - when predRabotodat ->> 'svedPlatFL' != 'null' then 'Физическое лицо' - END - as pred_employer_category_name, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'naimOrg' - END - as pred_name, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'svedIP' ->> 'innfl' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' ->> 'innyul' - when predRabotodat ->> 'svedGlKFH' != 'null' then predRabotodat -> 'svedGlKFH' ->> 'innfl' - when predRabotodat ->> 'svedPlatFL' != 'null' then predRabotodat -> 'svedPlatFL' ->> 'innfl' - END - as pred_inn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'ogrn' - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedIP' ->> 'ogrnip' - END - as pred_ogrn, - case - when predRabotodat ->> 'svedIP' != 'null' then predRabotodat -> 'extend' -> 'svedYUL' ->> 'kpp' - END - as pred_kpp, - false as akt_actual_employer, - case - when predRabotodat ->> 'svedYUL' != 'null' then predRabotodat -> 'svedYUL' -> 'extend' -> 'priznakOpk' - END - as pred_is_opk_org -from filteredData fd; - Y - - - 752 - 848 - - - - individual_entrepreneur_input - TableInput - - N - - 1 - - none - - - ervu-dashboard-test - N - 0 - with filtered_data as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' ->> 'id' as source_id, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 as aktIp, - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' as predIp - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedRegIP' ->> 'regIP' != 'null' --- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - fd.source_id, - aktIp ->> 'ogrnip' as akt_ogrnip, - aktIp ->> 'dataSved' as akt_source_update_date, - aktIp ->> 'dataRegIP' as akt_registration_date, - aktIp -> 'extend' ->> 'dataUchNPD' as akt_reg_npd_date, - aktIp -> 'extend' ->> 'dataSnUchNPD' as akt_dereg_npd_date, - true as akt_actual, - predIp ->> 'ogrnip' as pred_ogrnip, - predIp ->> 'dataSved' as pred_source_update_date, - predIp ->> 'dataRegIP' as pred_registration_date, - predIp ->> 'dataINNNed' as pred_deregistration_date, - predIp -> 'extend' ->> 'dataUchNPD' as pred_reg_npd_date, - predIp -> 'extend' ->> 'dataSnUchNPD' as pred_dereg_npd_date, - false as pred_actual -from filtered_data fd; - Y - - - 752 - 1312 - - - - npd_input - TableInput - - N - - 1 - - none - - - ervu-dashboard-test - N - 0 - with filtered_data as ( - select ri.recruit_id, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD' as aktNpd, - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' as predNpd - from recruits_info ri - where ri.info -> 'svedFL' -> 'svedNPD' ->> 'npd' != 'null' --- and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -select - fd.recruit_id, - aktNpd ->> 'id' as akt_source_id, - aktNpd ->> 'dataSved' as akt_source_update_id, - aktNpd ->> 'dataUchNPD' as akt_register_date, - true as akt_actual, - predNpd ->> 'id' as pred_source_id, - predNpd ->> 'dataSved' as pred_source_update_id, - predNpd ->> 'dataUchNPD' as pred_register_date, - predNpd ->> 'dataSnUchNPD' as pred_deregistration_date, - false as pred_actual -from filtered_data fd; - - Y - - - 752 - 1104 - - - - pred_employer_output - TableOutput - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - source_id - source_id - - - recruit_id - recruit_id - - - source_update_date - pred_source_update_date - - - address - pred_address - - - separate_unit_type_code - pred_separate_unit_type - - - separate_unit_address - pred_separate_unit_address - - - employer_category_name - pred_employer_category_name - - - name - pred_name - - - inn - pred_inn - - - ogrn - pred_ogrn - - - kpp - pred_kpp - - - actual_employer - pred_actual_employer - - - is_opk_org - pred_is_opk_org - - - N - N - N - N - Y - N - ervu_dashboard - Y - employer
- N - Y - N - Y - - - 976 - 912 - -
- - pred_npd_output - TableOutput - - Y - - 1 - - none - - - 10000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - source_id - pred_source_id - - - source_update_date - pred_source_update_id - - - register_date - pred_register_date - - - deregistration_date - pred_deregistration_date - - - actual - pred_actual - - - N - N - N - N - Y - N - ervu_dashboard - Y - self_employed
- N - Y - N - Y - - - 976 - 1168 - -
- - Identify last row in a stream - DetectLastRow - - Y - - 1 - - none - - - result - - - 704 - 320 - - - - Filter rows - FilterRows - - Y - - 1 - - none - - - - - - - = - N - - - - - Change job status on success - - - 944 - 144 + 960 + 528 - - Table output - Change job status on error - N - - - - - - - - - - actual_employer_output - Change job status on error - N - - - - - - - - - - akt_individual_entrepreneur_output - Change job status on error - N - - - - - - - - - - akt_npd_output - Change job status on error - N - - - - - - - - citizen_work_activity_output Change job status on error Y - + error_description @@ -1064,19 +473,7 @@ from filtered_data fd; Change job status on error Y - - - - - - - - - pred_npd_output - Change job status on error - N - - + error_description diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl index 9ce3108..b3c17de 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_delta.hpl @@ -22,22 +22,57 @@ Create job execution record - Table input + citizen_work_activity_input Y - Table input - Table output + Identify last row in a stream + Detect empty stream Y - Table output + Identify last row in a stream + Filter_null_parental_leave_dates + Y + + + citizen_work_activity_input + Identify last row in a stream + Y + + + Detect empty stream + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + Identify last row in a stream + citizen_work_activity_upsert + Y + + + Filter_null_parental_leave_dates + parental_leave_upsert + Y + + + citizen_work_activity_upsert + Change job status on success + Y + + + citizen_work_activity_upsert Change job status on error Y - Table output - Change job status on success + parental_leave_upsert + Change job status on error Y @@ -60,12 +95,9 @@ error_code - ervu-dashboard-test - + ervu-dashboard Y - N - Y Y N @@ -77,11 +109,10 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 1040 - 416 + 1296 + 432 @@ -97,12 +128,9 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard Y - N - Y N N @@ -112,11 +140,10 @@ WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 1040 - 224 + 1296 + 48 @@ -132,24 +159,19 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard N - N - Y N N UPDATE etl.job_execution SET status = 'DELTA_PROCESSING', - execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL + execution_datetime = current_timestamp, + error_description = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 @@ -157,7 +179,106 @@ and recruitment_id = '${IDM_ID}'; - Table input + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 752 + 48 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 48 + + + + Filter_null_parental_leave_dates + FilterRows + + Y + + 1 + + none + + + + + + + IS NOT NULL + parental_leave_start_date + N + - + + + parental_leave_upsert + + + 752 + 432 + + + + Identify last row in a stream + DetectLastRow + + N + + 1 + + none + + + last_row + + + 752 + 224 + + + + citizen_work_activity_input TableInput Y @@ -167,87 +288,37 @@ and recruitment_id = '${IDM_ID}'; none - ervu-dashboard-test + ervu-dashboard N - 10 - WITH trud_info AS (SELECT ri.info, - ri.recruit_id::uuid, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 - END AS trud_deyat, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN - jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = - 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 - END AS parental_leave_info, - - COALESCE( - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' - ) AS employer, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' - THEN - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 - ELSE - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' - END AS reg_ip, - - COALESCE( - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' - ) AS self_employment - - FROM ervu_dashboard.recruits_info ri - + WITH filteredData AS (SELECT ri.recruit_id, + trud_elem, + uhod_elem + FROM recruits_info ri + CROSS JOIN LATERAL jsonb_array_elements( + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' + ) AS trud_elem + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(trud_elem -> 'svedUhodReb') = 'array' + THEN trud_elem -> 'svedUhodReb' + ELSE '[]'::jsonb + END + ) AS uhod_elem ON true + WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' + --AND to_date(trud_elem ->> 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' + --AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' ) -SELECT ti.recruit_id::uuid, - (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, - ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, - (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, - ti.trud_deyat ->> 'trudFunkcziya' AS position, - ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, - ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, - CASE - WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' - WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' - END AS employer_category, - COALESCE( - ti.employer -> 'svedYUL' ->> 'innyul', - ti.employer -> 'svedIP' ->> 'innyfl' - ) AS employer_inn, - ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, - COALESCE( - ti.employer -> 'svedIP' ->> 'ogrnip', - ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' - ) AS employer_ogrnip, - ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, - ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, - (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, - (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, - ( - (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND - ( - (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR - (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date - ) - ) AS parental_leave_active, - (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, - (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, - ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, - ti.reg_ip IS NOT NULL AS active_ip, - ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, - ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, - ti.self_employment IS NOT NULL AS active_self_employment -FROM trud_info ti; +SELECT fd.recruit_id, + trud_elem ->> 'id' AS source_id, + trud_elem -> 'svedOrg' ->> 'naimOrg' AS employer_name, + trud_elem ->> 'trudFunkcziya' AS position, + to_date(trud_elem ->> 'dataMeropr', 'YYYY-MM-DD') AS personnel_event_date, + trud_elem ->> 'naimTipKadrMeropr' AS personnel_event_type, + to_date(trud_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, + (trud_elem ->> 'prAktMestRab') = '1' AS actual_employer, + to_date(uhod_elem ->> 'dataNachUhodReb', 'YYYY-MM-DD') AS parental_leave_start_date, + to_date(uhod_elem ->> 'dataKonUhodReb', 'YYYY-MM-DD') AS parental_leave_end_date +FROM filteredData fd; Y @@ -257,8 +328,8 @@ FROM trud_info ti; - Table output - TableOutput + citizen_work_activity_upsert + InsertUpdate Y @@ -267,130 +338,129 @@ FROM trud_info ti; none - 1000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - personnel_event_date - personnel_event_date - - - personnel_event_type - personnel_event_type - - - current_workplace - current_workplace - - - position - position - - - employer_name - employer_name - - - employer_kpp - employer_kpp - - - employer_category - employer_category - - - employer_inn - employer_inn - - - employer_address - employer_address - - - employer_ogrnip - employer_ogrnip - - - employer_unit_type - employer_unit_type - - - employer_unit_address - employer_unit_address - - - parental_leave_start_date - parental_leave_start_date - - - parental_leave_end_date - parental_leave_end_date - - - parental_leave_active - parental_leave_active - - - reg_ip_date - reg_ip_date - - - dereg_ip_date - dereg_ip_date - - - ogrnip_ip - ogrnip_ip - - - active_ip - active_ip - - - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment - - - N - N - N - N - Y - N - ervu_dashboard - Y - citizen_work_activity
- N - Y - N - Y + 10000 + ervu-dashboard + + + = + source_id + source_id + + ervu_dashboard + citizen_work_activity
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + employer_name + employer_name + Y + + + position + position + Y + + + personnel_event_date + personnel_event_date + Y + + + personnel_event_type + personnel_event_type + Y + + + source_update_date + source_update_date + Y + + + actual_employer + actual_employer + Y + +
+ N - 768 + 1040 224
+ + parental_leave_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard + + + = + citizen_work_activity_source_id + source_id + + ervu_dashboard + employee_parental_leave
+ + start_date + parental_leave_start_date + Y + + + end_date + parental_leave_end_date + Y + + + citizen_work_activity_source_id + source_id + N + +
+ N + + + 1040 + 432 + +
- Table output + citizen_work_activity_upsert Change job status on error Y error_description - error_code + + + + + + + parental_leave_upsert + Change job status on error + Y + + error_description + + diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl index a4a1f14..4c3da16 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/parallel/work_activity_flow_repeat.hpl @@ -20,23 +20,58 @@ + + Detect empty stream + Filter rows + Y + + + Filter rows + Change job status on success + Y + + + Identify last row in a stream + Detect empty stream + Y + + + Identify last row in a stream + Filter_null_parental_leave_dates + Y + + + citizen_work_activity_input + Identify last row in a stream + Y + Create job execution record - Table input + citizen_work_activity_input Y - Table input - Table output + Identify last row in a stream + citizen_work_activity_upsert Y - Table output + Filter_null_parental_leave_dates + parental_leave_upsert + Y + + + parental_leave_upsert Change job status on error Y - Table output + citizen_work_activity_upsert + Change job status on error + Y + + + citizen_work_activity_upsert Change job status on success Y @@ -60,27 +95,24 @@ error_code - ervu-dashboard-test - + ervu-dashboard Y - N - Y Y N UPDATE etl.job_execution -SET status = 'ERROR', - error_description = ? +SET status = 'DELTA_ERROR', + error_description = ?, + error_code = ? WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 976 - 400 + 1312 + 704 @@ -96,26 +128,22 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard Y - N - Y N N UPDATE etl.job_execution -SET status = 'SUCCESS' +SET status = 'DELTA_SUCCESS' WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - - 976 - 208 + 1312 + 320 @@ -131,48 +159,126 @@ and recruitment_id = '${IDM_ID}'; - ervu-dashboard-test - + ervu-dashboard N - N - Y N N - INSERT INTO etl.job_execution ( - id, - job_name, - status, - execution_datetime, - error_description, - error_code, - recruitment_id -) -VALUES ( - DEFAULT, - '${JOB_NAME}', - 'PROCESSING', - DEFAULT, - NULL, - NULL, - '${IDM_ID}' -) + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}') ON CONFLICT (job_name, recruitment_id) -DO UPDATE SET - status = 'PROCESSING', - execution_datetime = DEFAULT, - error_description = NULL, - error_code = NULL; - +DO UPDATE +SET status = 'PROCESSING', + error_description = null, + execution_datetime = current_timestamp; - 272 - 208 + 304 + 496 - Table input + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 768 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1040 + 320 + + + + Filter_null_parental_leave_dates + FilterRows + + Y + + 1 + + none + + + + + + + IS NOT NULL + parental_leave_start_date + N + - + + + parental_leave_upsert + + + 768 + 704 + + + + Identify last row in a stream + DetectLastRow + + N + + 1 + + none + + + last_row + + + 768 + 496 + + + + citizen_work_activity_input TableInput Y @@ -182,98 +288,46 @@ DO UPDATE SET none - ervu-dashboard-test + ervu-dashboard N - 10 - WITH trud_info AS (SELECT ri.info, - ri.recruit_id::uuid, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 - END AS trud_deyat, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' IS NULL THEN NULL - WHEN - jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb') = - 'array' THEN - ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' -> 0 -> 'svedUhodReb' -> 0 - END AS parental_leave_info, - - COALESCE( - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'aktRabotodat', - ri.info -> 'svedFL' -> 'svedRabotodat' -> 'rabotodat' -> 'predRabotodat' - ) AS employer, - - CASE - WHEN ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' IS NULL THEN NULL - WHEN jsonb_typeof(ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP') = 'array' - THEN - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'aktRegIP' -> 0 - ELSE - ri.info -> 'svedFL' -> 'svedRegIP' -> 'regIP' -> 'predRegIP' - END AS reg_ip, - - COALESCE( - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'aktNPD', - ri.info -> 'svedFL' -> 'svedNPD' -> 'npd' -> 'predNPD' - ) AS self_employment - - FROM ervu_dashboard.recruits_info ri - -) -SELECT ti.recruit_id::uuid, - (ti.trud_deyat ->> 'dataMeropr')::date AS personnel_event_date, - ti.trud_deyat ->> 'naimTipKadrMeropr' AS personnel_event_type, - (ti.trud_deyat ->> 'prAktMestRab' = '1') AS current_workplace, - ti.trud_deyat ->> 'trudFunkcziya' AS position, - ti.trud_deyat -> 'svedOrg' ->> 'naimOrg' AS employer_name, - ti.employer -> 'svedYUL' ->> 'kpp' AS employer_kpp, - CASE - WHEN ti.employer->'svedYUL' IS NOT NULL THEN 'Юридическое лицо' - WHEN ti.employer->'svedIP' IS NOT NULL THEN 'Индивидуальный предприниматель' - END AS employer_category, - COALESCE( - ti.employer -> 'svedYUL' ->> 'innyul', - ti.employer -> 'svedIP' ->> 'innyfl' - ) AS employer_inn, - ti.employer -> 'svedYUL' -> 'svedOPK' ->> 'region' AS employer_address, - COALESCE( - ti.employer -> 'svedIP' ->> 'ogrnip', - ti.employer -> 'svedYUL' -> 'extend' ->> 'ogrn' - ) AS employer_ogrnip, - ti.employer -> 'extend' ->> 'tipPodrazdRabotodat' AS employer_unit_type, - ti.employer -> 'extend' ->> 'adresPodrazdRabotodat' AS employer_unit_address, - (ti.parental_leave_info ->> 'dataNachUhodReb')::date AS parental_leave_start_date, - (ti.parental_leave_info ->> 'dataKonUhodReb')::date AS parental_leave_end_date, - ( - (ti.parental_leave_info ->> 'dataNachUhodReb')::date <= current_date AND - ( - (ti.parental_leave_info ->> 'dataKonUhodReb') IS NULL OR - (ti.parental_leave_info ->> 'dataKonUhodReb')::date > current_date - ) - ) AS parental_leave_active, - (ti.reg_ip ->> 'dataRegIP')::date AS reg_ip_date, - (ti.reg_ip ->> 'dataINNNed')::date AS dereg_ip_date, - ti.reg_ip ->> 'ogrnip' AS ogrnip_ip, - ti.reg_ip IS NOT NULL AS active_ip, - ti.self_employment ->> 'dataUchNPD' AS reg_self_employment_date, - ti.self_employment ->> 'dataSnUchNPD' AS dereg_self_employment_date, - ti.self_employment IS NOT NULL AS active_self_employment -FROM trud_info ti; + WITH filteredData AS (SELECT ri.recruit_id, + trud_elem, + uhod_elem + FROM recruits_info ri + CROSS JOIN LATERAL jsonb_array_elements( + ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat' + ) AS trud_elem + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(trud_elem -> 'svedUhodReb') = 'array' + THEN trud_elem -> 'svedUhodReb' + ELSE '[]'::jsonb + END + ) AS uhod_elem ON true + WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedTrud' -> 'trudDeyat') = 'array' + and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}') +SELECT fd.recruit_id, + trud_elem ->> 'id' AS source_id, + trud_elem -> 'svedOrg' ->> 'naimOrg' AS employer_name, + trud_elem ->> 'trudFunkcziya' AS position, + to_date(trud_elem ->> 'dataMeropr', 'YYYY-MM-DD') AS personnel_event_date, + trud_elem ->> 'naimTipKadrMeropr' AS personnel_event_type, + to_date(trud_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, + (trud_elem ->> 'prAktMestRab') = '1' AS actual_employer, + to_date(uhod_elem ->> 'dataNachUhodReb', 'YYYY-MM-DD') AS parental_leave_start_date, + to_date(uhod_elem ->> 'dataKonUhodReb', 'YYYY-MM-DD') AS parental_leave_end_date +FROM filteredData fd; Y - 480 - 208 + 544 + 496 - Table output - TableOutput + citizen_work_activity_upsert + InsertUpdate Y @@ -282,130 +336,129 @@ FROM trud_info ti; none - 1000 - ervu-dashboard-test - - - recruit_id - recruit_id - - - personnel_event_date - personnel_event_date - - - personnel_event_type - personnel_event_type - - - current_workplace - current_workplace - - - position - position - - - employer_name - employer_name - - - employer_kpp - employer_kpp - - - employer_category - employer_category - - - employer_inn - employer_inn - - - employer_address - employer_address - - - employer_ogrnip - employer_ogrnip - - - employer_unit_type - employer_unit_type - - - employer_unit_address - employer_unit_address - - - parental_leave_start_date - parental_leave_start_date - - - parental_leave_end_date - parental_leave_end_date - - - parental_leave_active - parental_leave_active - - - reg_ip_date - reg_ip_date - - - dereg_ip_date - dereg_ip_date - - - ogrnip_ip - ogrnip_ip - - - active_ip - active_ip - - - reg_self_employment_date - reg_self_employment_date - - - dereg_self_employment_date - dereg_self_employment_date - - - active_self_employment - active_self_employment - - - N - N - N - N - Y - N - ervu_dashboard - Y - citizen_work_activity
- N - Y - N - Y + 10000 + ervu-dashboard + + + = + source_id + source_id + + ervu_dashboard + citizen_work_activity
+ + recruit_id + recruit_id + N + + + source_id + source_id + N + + + employer_name + employer_name + Y + + + position + position + Y + + + personnel_event_date + personnel_event_date + Y + + + personnel_event_type + personnel_event_type + Y + + + source_update_date + source_update_date + Y + + + actual_employer + actual_employer + Y + +
+ N - 704 - 208 + 1040 + 496 + +
+ + parental_leave_upsert + InsertUpdate + + Y + + 1 + + none + + + 10000 + ervu-dashboard + + + = + citizen_work_activity_source_id + source_id + + ervu_dashboard + employee_parental_leave
+ + start_date + parental_leave_start_date + Y + + + end_date + parental_leave_end_date + Y + + + citizen_work_activity_source_id + source_id + N + +
+ N + + + 1040 + 704
- Table output + citizen_work_activity_upsert Change job status on error Y error_description - error_code + + + + + + + parental_leave_upsert + Change job status on error + Y + + error_description + + diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl index b882463..e5a0cfa 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_delta.hpl @@ -25,6 +25,11 @@ work_activity_flow_delta.hpl Y + + get_max_source_update_date + Table input + Y + Table input work_activity_flow_delta.hpl 2 @@ -60,12 +65,22 @@ ervu-dashboard-test N 0 + get_max_source_update_date SELECT - r.idm_id as recruitment_id + r.idm_id as recruitment_id, + ? as max_source_update_date FROM ervu_dashboard.recruitment r - LEFT JOIN public.job_execution je + LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id and job_name = 'work_activity_job' +JOIN recruits_info ri + ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id + AND ri.updated_at > ( + SELECT MAX(execution_datetime) + FROM etl.job_execution + WHERE job_name = 'work_activity_job' + AND recruitment_id = r.idm_id + ) where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); N @@ -74,6 +89,29 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING 288 + + get_max_source_update_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select max(source_update_date) + FROM citizen_work_activity; + N + + + 160 + 288 + + work_activity_flow_delta.hpl PipelineExecutor @@ -103,6 +141,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING work_activity_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -159,6 +202,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING work_activity_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -215,6 +263,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING work_activity_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -271,6 +324,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING work_activity_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y @@ -327,6 +385,11 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING work_activity_job + + MAX_SOURCE_UPDATE_DATE + max_source_update_date + + Y diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_repeat.hpl similarity index 99% rename from mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl rename to mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_repeat.hpl index 85aee6a..60675d1 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_repeat.hpl @@ -1,7 +1,7 @@ - recruitment_five_flow_on_error + recruitment_five_flow_repeat Y diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl index dd36f41..5ca8d4b 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_need_to_repeat_job.hpl @@ -62,7 +62,7 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS (SELECT 1 @@ -71,7 +71,6 @@ FROM ervu_dashboard.recruitment r ON r.idm_id = je.recruitment_id and job_name = 'work_activity_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') -limit 1 ) as need_to_repeat_job; N diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl index b562353..a4b4134 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/work_activity/support/check_if_work_activity_job_exists.hpl @@ -20,11 +20,6 @@ - - Set variables - Write to log - N - Table input Set variables @@ -67,14 +62,13 @@ none - ervu-dashboard-test + ervu-dashboard N 0 SELECT EXISTS ( SELECT 1 FROM etl.job_execution WHERE job_name = 'work_activity_job' - limit 1 ) AS job_executed_flag; N @@ -83,30 +77,6 @@ 336 - - Write to log - WriteToLog - - Y - - 1 - - none - - - Basic - Y - N - 0 - ${STATUS} - - - - - 944 - 224 - - diff --git a/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf b/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf index 7a4306a..5749ad3 100644 --- a/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf +++ b/mappings/info_recruits/citizen_tables/work/work_activity/work_activity_job.hwf @@ -85,8 +85,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitments_five_flow.hpl - - Basic Y @@ -102,7 +100,7 @@ - recruitment_five_flow_on_error.hpl + recruitment_five_flow_repeat.hpl PIPELINE @@ -112,7 +110,9 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_on_error.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/work/work_activity/recruitment_five_flow_repeat.hpl + + Basic Y @@ -235,7 +235,7 @@ Simple evaluation - recruitment_five_flow_on_error.hpl + recruitment_five_flow_repeat.hpl Y Y N From a8143a3c86c77e9ff43ad91bb5b5ec8fbc56cb40 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Tue, 26 Aug 2025 19:39:52 +0500 Subject: [PATCH 17/21] =?UTF-8?q?=D0=BF=D0=BE=D0=B2=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BA=D0=B8,=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=BC=D0=B5=D1=80=D1=8B,=20=D1=8F=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../check_if_need_to_repeat_job.hpl | 86 ++++ ...check_if_temporary_measures_job_exists.hpl | 113 +++++ .../parallel/temporary_measures_flow.hpl | 380 ++++++++++++++++ .../temporary_measures_flow_delta.hpl | 389 ++++++++++++++++ .../temporary_measures_flow_repeat.hpl | 402 ++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++++ .../recruitments_five_flow.hpl | 373 +++++++++++++++ .../temporary_measures_job.hwf | 360 +++++++++++++++ .../check_if_need_to_repeat_job.hpl | 86 ++++ ...eck_if_restriction_document_job_exists.hpl | 113 +++++ .../parallel/restriction_document_flow.hpl | 389 ++++++++++++++++ .../restriction_document_flow_delta.hpl | 408 +++++++++++++++++ .../restriction_document_flow_repeat.hpl | 422 +++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++++ .../recruitments_five_flow.hpl | 373 +++++++++++++++ .../restriction_document_job.hwf | 358 +++++++++++++++ .../check_if_need_to_repeat_job.hpl | 86 ++++ ...f_restriction_document_item_job_exists.hpl | 113 +++++ .../restriction_document_item_flow.hpl | 396 ++++++++++++++++ .../restriction_document_item_flow_delta.hpl | 415 +++++++++++++++++ .../restriction_document_item_flow_repeat.hpl | 430 ++++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++++ .../recruitments_five_flow.hpl | 373 +++++++++++++++ .../restriction_document_item_job.hwf | 358 +++++++++++++++ .../check_if_need_to_repeat_job.hpl | 86 ++++ ...heck_if_subpoena_appearance_job_exists.hpl | 113 +++++ .../parallel/subpoena_appearance_flow.hpl | 361 +++++++++++++++ .../subpoena_appearance_flow_delta.hpl | 372 +++++++++++++++ .../subpoena_appearance_flow_repeat.hpl | 386 ++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++++ .../recruitments_five_flow.hpl | 373 +++++++++++++++ .../subpoena_appearance_job.hwf | 358 +++++++++++++++ .../check_if_need_to_repeat_job.hpl | 86 ++++ ...check_if_subpoena_send_info_job_exists.hpl | 113 +++++ .../parallel/subpoena_send_info_flow.hpl | 391 ++++++++++++++++ .../subpoena_send_info_flow_delta.hpl | 401 ++++++++++++++++ .../subpoena_send_info_flow_repeat.hpl | 416 +++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++++++++ .../recruitments_five_flow.hpl | 373 +++++++++++++++ .../subpoena_send_info_job.hwf | 358 +++++++++++++++ .../restriction_document_status.hpl | 99 ++++ 46 files changed, 14309 insertions(+) create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/checkpoints/check_if_temporary_measures_job_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf create mode 100644 mappings/info_recruits/raw_data/restriction_document/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/checkpoints/check_if_restriction_document_job_exists.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document/restriction_document_job.hwf create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/checkpoints/check_if_restriction_document_item_job_exists.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/raw_data/restriction_document_item/restriction_document_item_job.hwf create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/checkpoints/check_if_subpoena_appearance_job_exists.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_appearance/subpoena_appearance_job.hwf create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/checkpoints/check_if_subpoena_send_info_job_exists.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/recruitments_five_flow.hpl create mode 100644 mappings/info_recruits/raw_data/subpoena_send_info/subpoena_send_info_job.hwf create mode 100644 mappings/info_recruits/reference_data/restriction_document_status.hpl diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..fa60b99 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'temporary_measures_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/checkpoints/check_if_temporary_measures_job_exists.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/checkpoints/check_if_temporary_measures_job_exists.hpl new file mode 100644 index 0000000..acb1487 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/checkpoints/check_if_temporary_measures_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_temporary_measures_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'recruits_info_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl new file mode 100644 index 0000000..8592bb1 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl @@ -0,0 +1,380 @@ + + + + temporary_measures_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + created_at + created_at + + + updated_at + updated_at + + + info + info + + + gir_import_data_version_id + gir_import_data_version_id + + + current_recruitment_id + current_recruitment_id + + + target_recruitment_id + target_recruitment_id + + + full_name + full_name + + + addresses + addresses + + + N + N + N + N + Y + N + ervu_dashboard + Y + recruits_info
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl new file mode 100644 index 0000000..bf8cff6 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl @@ -0,0 +1,389 @@ + + + + temporary_measures_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Insert / update + Change job status on error + Y + + + Change job status on error + Abort + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + addresses + addresses + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + --AND '${M_R_CR_DATE}' >= r.system_create_date + AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl new file mode 100644 index 0000000..d4041f8 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl @@ -0,0 +1,402 @@ + + + + temporary_measures_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + recruits_info
+ + recruit_id + recruit_id + N + + + created_at + created_at + Y + + + updated_at + updated_at + Y + + + info + info + Y + + + gir_import_data_version_id + gir_import_data_version_id + Y + + + current_recruitment_id + current_recruitment_id + Y + + + target_recruitment_id + target_recruitment_id + Y + + + full_name + full_name + Y + + + addresses + addresses + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + SELECT + r.system_create_date AS created_at, + r.system_update_date AS updated_at, + ri.recruit_id, + ri.info, + ri.gir_import_data_version_id, + r.current_recruitment_id, + r.target_recruitment_id, + r.full_name, + r.addresses +FROM recruits_info ri +JOIN recruits r ON r.id = ri.recruit_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= r.system_create_date + --AND '${CR_DATE}' < ri.created_at +--ORDER BY ri.created_at ASC; + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..2679e8a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + temporary_measures_flow_delta.hpl + Y + + + Table input + temporary_measures_flow_delta.hpl 2 + Y + + + Table input + temporary_measures_flow_delta.hpl 3 + Y + + + Table input + temporary_measures_flow_delta.hpl 4 + Y + + + Table input + temporary_measures_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'recruits_info_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + temporary_measures_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 128 + + + + temporary_measures_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 208 + + + + temporary_measures_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 288 + + + + temporary_measures_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 368 + + + + temporary_measures_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..f5c77e6 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + temporary_measures_flow_repeat.hpl + Y + + + Table input + temporary_measures_flow_repeat.hpl 2 + Y + + + Table input + temporary_measures_flow_repeat.hpl 3 + Y + + + Table input + temporary_measures_flow_repeat.hpl 4 + Y + + + Table input + temporary_measures_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'temporary_measures_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + temporary_measures_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 208 + + + + temporary_measures_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 288 + + + + temporary_measures_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 368 + + + + temporary_measures_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 448 + + + + temporary_measures_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/temporary_measures/recruitments_five_flow.hpl new file mode 100644 index 0000000..d6e1612 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + temporary_measures_flow.hpl + Y + + + Get all recruitments ordered by created_date + temporary_measures_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + temporary_measures_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + temporary_measures_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + temporary_measures_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + temporary_measures_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 144 + + + + temporary_measures_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 224 + + + + temporary_measures_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 304 + + + + temporary_measures_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 384 + + + + temporary_measures_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/parallel/temporary_measures_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + temporary_measures_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 704 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf b/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf new file mode 100644 index 0000000..dd6f9b5 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf @@ -0,0 +1,360 @@ + + + temporary_measures_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_temporary_measures_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/checkpoints/check_if_temporary_measures_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + temporary_measures_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 768 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1088 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1088 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 768 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 768 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl + + + Basic + + Y + + N + local + N + N + Y + N + 768 + 800 + + + + + + Start + check_if_temporary_measures_job_exists.hpl + Y + Y + Y + + + check_if_temporary_measures_job_exists.hpl + temporary_measures_job_exists_check + Y + Y + N + + + temporary_measures_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + temporary_measures_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 880 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 880 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 688 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + temporary_measures_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 143 + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/raw_data/restriction_document/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..2520186 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/checkpoints/check_if_restriction_document_job_exists.hpl b/mappings/info_recruits/raw_data/restriction_document/checkpoints/check_if_restriction_document_job_exists.hpl new file mode 100644 index 0000000..ea51144 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/checkpoints/check_if_restriction_document_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_restriction_document_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'restriction_document_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl new file mode 100644 index 0000000..4486fd5 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl @@ -0,0 +1,389 @@ + + + + restriction_document_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + SELECT +* +FROM public.restriction_document +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= created_at +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + id + id + + + subpoena_id + subpoena_id + + + created_at + created_at + + + updated_at + updated_at + + + vk_id + vk_id + + + user_id + user_id + + + user_name + user_name + + + status + status + + + decision_number + decision_number + + + decision_date + decision_date + + + decision_reason + decision_reason + + + extra_info + extra_info + + + type + type + + + recruitment_name + recruitment_name + + + N + N + N + N + Y + N + ervu_dashboard + Y + restriction_document
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl new file mode 100644 index 0000000..0c9ab5d --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl @@ -0,0 +1,408 @@ + + + + restriction_document_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + + = + created_at + created_at + + + ervu_dashboard + restriction_document
+ + id + id + N + + + subpoena_id + subpoena_id + Y + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + vk_id + vk_id + Y + + + user_id + user_id + Y + + + user_name + user_name + Y + + + status + status + Y + + + decision_number + decision_number + Y + + + decision_date + decision_date + Y + + + decision_reason + decision_reason + Y + + + extra_info + extra_info + Y + + + type + type + Y + + + recruitment_name + recruitment_name + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + SELECT +* +FROM public.restriction_document +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND vk_id = '${IDM_ID}' + AND updated_at >= '${M_R_UP_DATE}'::timestamp + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl new file mode 100644 index 0000000..809cfea --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl @@ -0,0 +1,422 @@ + + + + restriction_document_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + + = + created_at + created_at + + + ervu_dashboard + restriction_document
+ + id + id + N + + + subpoena_id + subpoena_id + Y + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + vk_id + vk_id + Y + + + user_id + user_id + Y + + + user_name + user_name + Y + + + status + status + Y + + + decision_number + decision_number + Y + + + decision_date + decision_date + Y + + + decision_reason + decision_reason + Y + + + extra_info + extra_info + Y + + + type + type + Y + + + recruitment_name + recruitment_name + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + SELECT +* +FROM public.restriction_document +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= created_at +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..e99c9c1 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + restriction_document_flow_delta.hpl + Y + + + Table input + restriction_document_flow_delta.hpl 2 + Y + + + Table input + restriction_document_flow_delta.hpl 3 + Y + + + Table input + restriction_document_flow_delta.hpl 4 + Y + + + Table input + restriction_document_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + restriction_document_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 128 + + + + restriction_document_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 208 + + + + restriction_document_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 288 + + + + restriction_document_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 368 + + + + restriction_document_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 448 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..5bab95b --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + restriction_document_flow_repeat.hpl + Y + + + Table input + restriction_document_flow_repeat.hpl 2 + Y + + + Table input + restriction_document_flow_repeat.hpl 3 + Y + + + Table input + restriction_document_flow_repeat.hpl 4 + Y + + + Table input + restriction_document_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + restriction_document_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 208 + + + + restriction_document_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 288 + + + + restriction_document_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 368 + + + + restriction_document_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 448 + + + + restriction_document_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 528 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/restriction_document/recruitments_five_flow.hpl new file mode 100644 index 0000000..9ef48ce --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + restriction_document_flow.hpl + Y + + + Get all recruitments ordered by created_date + restriction_document_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + restriction_document_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + restriction_document_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + restriction_document_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + restriction_document_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 144 + + + + restriction_document_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 224 + + + + restriction_document_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 304 + + + + restriction_document_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 384 + + + + restriction_document_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/parallel/restriction_document_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 768 + 464 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document/restriction_document_job.hwf b/mappings/info_recruits/raw_data/restriction_document/restriction_document_job.hwf new file mode 100644 index 0000000..e5a3589 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document/restriction_document_job.hwf @@ -0,0 +1,358 @@ + + + restriction_document_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_restriction_document_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/checkpoints/check_if_restriction_document_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + restriction_document_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 752 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1120 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1120 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 752 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 800 + + + + + + Start + check_if_restriction_document_job_exists.hpl + Y + Y + Y + + + check_if_restriction_document_job_exists.hpl + restriction_document_job_exists_check + Y + Y + N + + + restriction_document_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + restriction_document_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 672 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + restriction_document_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 146 + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/raw_data/restriction_document_item/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..7084d6e --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_item_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/checkpoints/check_if_restriction_document_item_job_exists.hpl b/mappings/info_recruits/raw_data/restriction_document_item/checkpoints/check_if_restriction_document_item_job_exists.hpl new file mode 100644 index 0000000..fc707be --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/checkpoints/check_if_restriction_document_item_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_restriction_document_item_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'restriction_document_item_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl new file mode 100644 index 0000000..7b6dca1 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl @@ -0,0 +1,396 @@ + + + + restriction_document_item_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + select +rdi.* +from public.restriction_document_item rdi +join public.restriction_document rd on +rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND rd.vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= rdi.created_at + +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + id + id + + + restriction_document_create_id + restriction_document_create_id + + + created_at + created_at + + + updated_at + updated_at + + + restriction_id + restriction_id + + + status_applied + status_applied + + + status_text + status_text + + + applied_date + applied_date + + + cancel_date + cancel_date + + + extra_info + extra_info + + + applied_fact + applied_fact + + + restriction_document_cancel_id + restriction_document_cancel_id + + + status_canceled + status_canceled + + + foiv_code + foiv_code + + + human_readable_id + human_readable_id + + + N + N + N + N + Y + N + ervu_dashboard + Y + restriction_document_item
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl new file mode 100644 index 0000000..81c04a9 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl @@ -0,0 +1,415 @@ + + + + restriction_document_item_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + + = + created_at + created_at + + + ervu_dashboard + restriction_document_item
+ + id + id + N + + + restriction_document_create_id + restriction_document_create_id + Y + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + restriction_id + restriction_id + Y + + + status_applied + status_applied + Y + + + status_text + status_text + Y + + + applied_date + applied_date + Y + + + cancel_date + cancel_date + Y + + + extra_info + extra_info + Y + + + applied_fact + applied_fact + Y + + + restriction_document_cancel_id + restriction_document_cancel_id + Y + + + status_canceled + status_canceled + Y + + + foiv_code + foiv_code + Y + + + human_readable_id + human_readable_id + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + ervu_person_registry + N + select +rdi.* +from public.restriction_document_item rdi +join public.restriction_document rd on +rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND rd.vk_id = '${IDM_ID}' + AND rdi.updated_at >= '${M_R_UP_DATE}'::timestamp + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl new file mode 100644 index 0000000..87a5793 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl @@ -0,0 +1,430 @@ + + + + restriction_document_item_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + + = + created_at + created_at + + + ervu_dashboard + restriction_document_item
+ + id + id + N + + + restriction_document_create_id + restriction_document_create_id + Y + + + created_at + created_at + N + + + updated_at + updated_at + Y + + + restriction_id + restriction_id + Y + + + status_applied + status_applied + Y + + + status_text + status_text + Y + + + applied_date + applied_date + Y + + + cancel_date + cancel_date + Y + + + extra_info + extra_info + Y + + + applied_fact + applied_fact + Y + + + restriction_document_cancel_id + restriction_document_cancel_id + Y + + + status_canceled + status_canceled + Y + + + foiv_code + foiv_code + Y + + + human_readable_id + human_readable_id + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + select +rdi.* +from public.restriction_document_item rdi +join public.restriction_document rd on +rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND rd.vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= rdi.created_at + +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..dde4920 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + restriction_document_item_flow_delta.hpl + Y + + + Table input + restriction_document_item_flow_delta.hpl 2 + Y + + + Table input + restriction_document_item_flow_delta.hpl 3 + Y + + + Table input + restriction_document_item_flow_delta.hpl 4 + Y + + + Table input + restriction_document_item_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_item_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + restriction_document_item_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 128 + + + + restriction_document_item_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 208 + + + + restriction_document_item_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 288 + + + + restriction_document_item_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 368 + + + + restriction_document_item_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 448 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..2090737 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + restriction_document_item_flow_repeat.hpl + Y + + + Table input + restriction_document_item_flow_repeat.hpl 2 + Y + + + Table input + restriction_document_item_flow_repeat.hpl 3 + Y + + + Table input + restriction_document_item_flow_repeat.hpl 4 + Y + + + Table input + restriction_document_item_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_item_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + restriction_document_item_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 208 + + + + restriction_document_item_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 288 + + + + restriction_document_item_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 368 + + + + restriction_document_item_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 448 + + + + restriction_document_item_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 528 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/restriction_document_item/recruitments_five_flow.hpl new file mode 100644 index 0000000..973ad51 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + restriction_document_item_flow.hpl + Y + + + Get all recruitments ordered by created_date + restriction_document_item_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + restriction_document_item_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + restriction_document_item_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + restriction_document_item_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + restriction_document_item_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 144 + + + + restriction_document_item_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 224 + + + + restriction_document_item_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 304 + + + + restriction_document_item_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 384 + + + + restriction_document_item_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 752 + 464 + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/restriction_document_item_job.hwf b/mappings/info_recruits/raw_data/restriction_document_item/restriction_document_item_job.hwf new file mode 100644 index 0000000..2d8d4f4 --- /dev/null +++ b/mappings/info_recruits/raw_data/restriction_document_item/restriction_document_item_job.hwf @@ -0,0 +1,358 @@ + + + restriction_document_item_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_restriction_document_item_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/checkpoints/check_if_restriction_document_item_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 448 + 304 + + + + restriction_document_item_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 768 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1072 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1072 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 768 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 768 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 768 + 800 + + + + + + Start + check_if_restriction_document_item_job_exists.hpl + Y + Y + Y + + + check_if_restriction_document_item_job_exists.hpl + restriction_document_item_job_exists_check + Y + Y + N + + + restriction_document_item_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + restriction_document_item_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 880 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 912 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 688 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + restriction_document_item_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 175 + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..22f2d41 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_appearance_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/checkpoints/check_if_subpoena_appearance_job_exists.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/checkpoints/check_if_subpoena_appearance_job_exists.hpl new file mode 100644 index 0000000..dbcd846 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/checkpoints/check_if_subpoena_appearance_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_subpoena_appearance_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'subpoena_appearance_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl new file mode 100644 index 0000000..cddb2f7 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl @@ -0,0 +1,361 @@ + + + + subpoena_appearance_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + select sa.* +from public.subpoena_appearance sa +join public.subpoena s on s.id = sa.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= sa.created_date_time +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + id + id + + + subpoena_id + subpoena_id + + + fact_appearance + fact_appearance + + + date_appearance + date_appearance + + + nonappearance_info + nonappearance_info + + + created_date_time + created_date_time + + + change_date_time + change_date_time + + + N + N + N + N + Y + N + ervu_dashboard + Y + subpoena_appearance
+ N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl new file mode 100644 index 0000000..d772d1a --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl @@ -0,0 +1,372 @@ + + + + subpoena_appearance_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + created_date_time + created_date_time + + ervu_dashboard + subpoena_appearance
+ + id + id + N + + + created_date_time + created_date_time + N + + + subpoena_id + subpoena_id + Y + + + fact_appearance + fact_appearance + Y + + + date_appearance + date_appearance + Y + + + nonappearance_info + nonappearance_info + Y + + + change_date_time + change_date_time + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + select sa.* +from public.subpoena_appearance sa +join public.subpoena s on s.id = sa.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND sa.change_date_time >= '${M_R_UP_DATE}'::timestamp + +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl new file mode 100644 index 0000000..2e0ee69 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl @@ -0,0 +1,386 @@ + + + + subpoena_appearance_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + created_date_time + created_date_time + + ervu_dashboard + subpoena_appearance
+ + id + id + N + + + created_date_time + created_date_time + N + + + subpoena_id + subpoena_id + Y + + + fact_appearance + fact_appearance + Y + + + date_appearance + date_appearance + Y + + + nonappearance_info + nonappearance_info + Y + + + change_date_time + change_date_time + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + select sa.* +from public.subpoena_appearance sa +join public.subpoena s on s.id = sa.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= sa.created_date_time +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..31177ac --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + subpoena_appearance_flow_delta.hpl + Y + + + Table input + subpoena_appearance_flow_delta.hpl 2 + Y + + + Table input + subpoena_appearance_flow_delta.hpl 3 + Y + + + Table input + subpoena_appearance_flow_delta.hpl 4 + Y + + + Table input + subpoena_appearance_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_appearance_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + subpoena_appearance_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 128 + + + + subpoena_appearance_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 208 + + + + subpoena_appearance_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 288 + + + + subpoena_appearance_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 368 + + + + subpoena_appearance_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 608 + 448 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..513be76 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + subpoena_appearance_flow_repeat.hpl + Y + + + Table input + subpoena_appearance_flow_repeat.hpl 2 + Y + + + Table input + subpoena_appearance_flow_repeat.hpl 3 + Y + + + Table input + subpoena_appearance_flow_repeat.hpl 4 + Y + + + Table input + subpoena_appearance_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_appearance_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + subpoena_appearance_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + subpoena_appearance_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 288 + + + + subpoena_appearance_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 368 + + + + subpoena_appearance_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 448 + + + + subpoena_appearance_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 528 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/subpoena_appearance/recruitments_five_flow.hpl new file mode 100644 index 0000000..245e262 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + subpoena_appearance_flow.hpl + Y + + + Get all recruitments ordered by created_date + subpoena_appearance_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + subpoena_appearance_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + subpoena_appearance_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + subpoena_appearance_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + subpoena_appearance_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 144 + + + + subpoena_appearance_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 224 + + + + subpoena_appearance_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 304 + + + + subpoena_appearance_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 384 + + + + subpoena_appearance_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/parallel/subpoena_appearance_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_appearance_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 464 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_appearance/subpoena_appearance_job.hwf b/mappings/info_recruits/raw_data/subpoena_appearance/subpoena_appearance_job.hwf new file mode 100644 index 0000000..0e2701c --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_appearance/subpoena_appearance_job.hwf @@ -0,0 +1,358 @@ + + + subpoena_appearance_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 176 + 304 + + + + check_if_subpoena_appearance_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/checkpoints/check_if_subpoena_appearance_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + subpoena_appearance_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 752 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1056 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1056 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 752 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 800 + + + + + + Start + check_if_subpoena_appearance_job_exists.hpl + Y + Y + Y + + + check_if_subpoena_appearance_job_exists.hpl + subpoena_appearance_job_exists_check + Y + Y + N + + + subpoena_appearance_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + subpoena_appearance_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 672 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + recruits_info_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..fc7dea6 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_send_info_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/checkpoints/check_if_subpoena_send_info_job_exists.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/checkpoints/check_if_subpoena_send_info_job_exists.hpl new file mode 100644 index 0000000..2f4bd39 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/checkpoints/check_if_subpoena_send_info_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_subpoena_send_info_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'subpoena_send_info_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl new file mode 100644 index 0000000..80c5491 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl @@ -0,0 +1,391 @@ + + + + subpoena_send_info_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Identify last row in a stream + Y + + + Identify last row in a stream + Table output + Y + + + Table output + Filter rows + Y + + + Table output + Change job status on error + Y + + + Table output + Detect empty stream + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1376 + 512 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1024 + 512 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1632 + 160 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 320 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1024 + 160 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 752 + 320 + + + + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + select ssi.* +from public.subpoena_send_info ssi +join public.subpoena s on s.id = ssi.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND s.create_date >= '${M_R_UP_DATE}'::timestamp +${LIMIT_FW} + Y + + + 496 + 320 + + + + Table output + TableOutput + + N + + 1 + + none + + + 1000 + ervu-dashboard + + + id + id + + + subpoena_id + subpoena_id + + + send_code + send_code + + + send_address + send_address + + + send_address_type + send_address_type + + + send_date + send_date + + + track_number + track_number + + + is_delivered + is_delivered + + + delivery_code + delivery_code + + + delivery_date + delivery_date + + + act_number + act_number + + + act_date + act_date + + + delivery_fio + delivery_fio + + + auto_delivery + auto_delivery + + + N + N + N + N + + Y + + N + ervu_dashboard + Y + subpoena_send_info
+ + N + Y + N + Y + + + 1024 + 320 + +
+ + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl new file mode 100644 index 0000000..2bc3a65 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl @@ -0,0 +1,401 @@ + + + + subpoena_send_info_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1168 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 944 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1248 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 336 + 224 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1248 + 224 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 944 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 736 + 224 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + ervu_dashboard + subpoena_send_info
+ + id + id + N + + + subpoena_id + subpoena_id + Y + + + send_code + send_code + Y + + + send_address + send_address + Y + + + send_address_type + send_address_type + Y + + + send_date + send_date + Y + + + track_number + track_number + Y + + + is_delivered + is_delivered + Y + + + delivery_code + delivery_code + Y + + + delivery_date + delivery_date + Y + + + act_number + act_number + Y + + + act_date + act_date + Y + + + delivery_fio + delivery_fio + Y + + + auto_delivery + auto_delivery + Y + +
+ N + + + 944 + 224 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + + select ssi.* +from public.subpoena_send_info ssi +join public.subpoena s on s.id = ssi.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND s.status_change_date >= '${M_R_UP_DATE}'::timestamp +${LIMIT_FW} + Y + + + 544 + 224 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl new file mode 100644 index 0000000..394b9b4 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl @@ -0,0 +1,416 @@ + + + + subpoena_send_info_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Table input + Identify last row in a stream + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Identify last row in a stream + Insert / update + Y + + + Insert / update + Filter rows + Y + + + Insert / update + Detect empty stream + Y + + + Insert / update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1248 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 960 + 400 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1440 + 48 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1440 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 960 + 48 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 720 + 208 + + + + Insert / update + InsertUpdate + + N + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + ervu_dashboard + subpoena_send_info
+ + id + id + N + + + subpoena_id + subpoena_id + Y + + + send_code + send_code + Y + + + send_address + send_address + Y + + + send_address_type + send_address_type + Y + + + send_date + send_date + Y + + + track_number + track_number + Y + + + is_delivered + is_delivered + Y + + + delivery_code + delivery_code + Y + + + delivery_date + delivery_date + Y + + + act_number + act_number + Y + + + act_date + act_date + Y + + + delivery_fio + delivery_fio + Y + + + auto_delivery + auto_delivery + Y + +
+ N + + + 960 + 208 + +
+ + Table input + TableInput + + N + + 1 + + none + + + postgres.subpoena + N + select ssi.* +from public.subpoena_send_info ssi +join public.subpoena s on s.id = ssi.subpoena_id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND s.create_date >= '${M_R_UP_DATE}'::timestamp +${LIMIT_FW} + Y + + + 480 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_delta.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..befe783 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + subpoena_send_info_flow_delta.hpl + Y + + + Table input + subpoena_send_info_flow_delta.hpl 2 + Y + + + Table input + subpoena_send_info_flow_delta.hpl 3 + Y + + + Table input + subpoena_send_info_flow_delta.hpl 4 + Y + + + Table input + subpoena_send_info_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_send_info_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + subpoena_send_info_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 128 + + + + subpoena_send_info_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 208 + + + + subpoena_send_info_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 288 + + + + subpoena_send_info_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 368 + + + + subpoena_send_info_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 624 + 448 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..422e804 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + subpoena_send_info_flow_repeat.hpl + Y + + + Table input + subpoena_send_info_flow_repeat.hpl 2 + Y + + + Table input + subpoena_send_info_flow_repeat.hpl 3 + Y + + + Table input + subpoena_send_info_flow_repeat.hpl 4 + Y + + + Table input + subpoena_send_info_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_send_info_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + subpoena_send_info_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + subpoena_send_info_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 288 + + + + subpoena_send_info_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 368 + + + + subpoena_send_info_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 448 + + + + subpoena_send_info_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 528 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/recruitments_five_flow.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/recruitments_five_flow.hpl new file mode 100644 index 0000000..d69253d --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + subpoena_send_info_flow.hpl + Y + + + Get all recruitments ordered by created_date + subpoena_send_info_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + subpoena_send_info_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + subpoena_send_info_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + subpoena_send_info_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + subpoena_send_info_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 144 + + + + subpoena_send_info_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 224 + + + + subpoena_send_info_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 304 + + + + subpoena_send_info_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 384 + + + + subpoena_send_info_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + subpoena_send_info_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 720 + 464 + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/subpoena_send_info_job.hwf b/mappings/info_recruits/raw_data/subpoena_send_info/subpoena_send_info_job.hwf new file mode 100644 index 0000000..3db6b35 --- /dev/null +++ b/mappings/info_recruits/raw_data/subpoena_send_info/subpoena_send_info_job.hwf @@ -0,0 +1,358 @@ + + + subpoena_send_info_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_subpoena_send_info_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/checkpoints/check_if_subpoena_send_info_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 448 + 304 + + + + subpoena_send_info_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 752 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 1040 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 1040 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 752 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 752 + 800 + + + + + + Start + check_if_subpoena_send_info_job_exists.hpl + Y + Y + Y + + + check_if_subpoena_send_info_job_exists.hpl + subpoena_send_info_job_exists_check + Y + Y + N + + + subpoena_send_info_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + subpoena_send_info_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 864 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 672 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + subpoena_send_info_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 141 + + + + diff --git a/mappings/info_recruits/reference_data/restriction_document_status.hpl b/mappings/info_recruits/reference_data/restriction_document_status.hpl new file mode 100644 index 0000000..4d5a79d --- /dev/null +++ b/mappings/info_recruits/reference_data/restriction_document_status.hpl @@ -0,0 +1,99 @@ + + + + restriction_document_status + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/25 16:29:15.233 + - + 2025/08/25 16:29:15.233 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + ervu_dashboard + restriction_document_status
+ + id + id + N + + + code + code + Y + + + name + name + Y + +
+ N + + + 832 + 272 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + SELECT * FROM public.restriction_document_status + N + + + 464 + 272 + + + + + +
From ecfa676e80d229e6d7ad999be1c69deb191b4ef6 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 28 Aug 2025 15:28:19 +0500 Subject: [PATCH 18/21] =?UTF-8?q?ERVU-538=20=D0=BF=D0=BE=D0=B2=D0=B5=D1=81?= =?UTF-8?q?=D1=82=D0=BA=D0=B8=20=D0=B8=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BC=D0=B5=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subpoena/parallel/subpoena_flow.hpl | 319 +++++++++++--- .../subpoena/parallel/subpoena_flow_delta.hpl | 400 ++++++++++++++---- .../parallel/subpoena_flow_repeat.hpl | 382 +++++++++++------ .../temporary_measures_job.hwf | 4 +- .../restriction_document_item_flow.hpl | 194 +++++++-- .../restriction_document_item_flow_delta.hpl | 186 ++++++-- .../restriction_document_item_flow_repeat.hpl | 185 ++++++-- .../parallel/subpoena_send_info_flow.hpl | 3 - .../reference_data/send_dictionary.hpl | 114 +++++ 9 files changed, 1441 insertions(+), 346 deletions(-) create mode 100644 mappings/info_recruits/reference_data/send_dictionary.hpl diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl index ca99475..90b4e7c 100644 --- a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow.hpl @@ -40,31 +40,51 @@ Abort Y
- - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - - - Table output - Filter rows - Y - Table output Change job status on error Y + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Table input + Table output + Y + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y + + Update + Filter rows + Y +
Abort @@ -82,8 +102,8 @@ 0 - 1376 - 512 + 1328 + 496 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1024 - 512 + 1328 + 320 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1632 - 160 + 1856 + 176 @@ -194,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 1632 - 320 + 1536 + 176 @@ -230,8 +250,58 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1024 - 160 + 1536 + 304 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_sent_summons_raw + is_sent_summons + MAX + + + has_served_summons_raw + is_served_summons + MAX + + + has_appeared_to_recruitment_center_raw + is_appeared_to_recruitment_center + MAX + + + has_not_appeared_by_valid_excuse_raw + is_not_appeared_by_valid_excuse + MAX + + + N + + + recruit_id + + + N + grp + + + 688 + 176 @@ -248,15 +318,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 752 - 320 + 880 + 176 Table input TableInput - N + Y 1 @@ -267,29 +337,46 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N SELECT - s.id AS subpoena_id, --id повестки - --???, --факт направления повестки + s.id, --id повестки + CASE + WHEN s.send_date is not null THEN 1 + ELSE 0 + END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки + CASE + WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1 + ELSE 0 + END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки + CASE + WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1 + ELSE 0 + END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат + CASE + WHEN ss.code = '5.1' THEN 1 + ELSE 0 + END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине + s.recruit_id, s.send_date, --дата направления повестки s.series, --серия повестки s.number, --новер повестки s.reason_id AS subpoena_reason, --причина вызова по повестке /// код передавать или сразу наименование? - s.full_name_responsible_user AS fio_commiss, --фио военного комиссара(фио пользователя сформировавшео повестку) + s.full_name_responsible_user, --фио военного комиссара(фио пользователя сформировавшео повестку) s.sig_info, --сертификат ключа проверки ЭП s.recruitment_name, --наименование ВК s.recruitment_address, --адрес, по которому необходимо явиться s.visit_date, --дата и время явки --, --способ направления // искать в subpoena_send_info --, --УН заказного почтового отправления // искать в subpoena_send_info - s.status_id AS subpoena_status, --статус // ссылка на справочник subpoena_status + s.status_id, --статус // ссылка на справочник subpoena_status/// AS subpoena_status s.create_date, --дата создания // для загрузки данных s.status_change_date --дата обновления // для загрузки данных (timestamp without time zone) -- поля для карточки, раздел "Сведения о направлении повестки военного комиссариата" -FROM subpoena s +FROM public.subpoena s +join public.subpoena_status ss on s.status_id = ss.id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку - AND department_id = '${IDM_ID}' + AND s.department_id = '${IDM_ID}' AND '${M_R_CR_DATE}' >= s.create_date ${LIMIT_FW} @@ -304,7 +391,7 @@ ${LIMIT_FW} Table output TableOutput - N + Y 1 @@ -314,41 +401,61 @@ ${LIMIT_FW} 1000 ervu-dashboard + + id + id + recruit_id recruit_id - created_at - created_at + send_date + send_date - updated_at - updated_at + series + series - info - info + number + number - gir_import_data_version_id - gir_import_data_version_id + reason_id + reason_id - current_recruitment_id - current_recruitment_id + full_name_responsible_user + full_name_responsible_user - target_recruitment_id - target_recruitment_id + sig_info + sig_info - full_name - full_name + recruitment_name + recruitment_name - addresses - addresses + recruitment_address + recruitment_address + + + visit_date + visit_date + + + status_id + status_id + + + create_date + create_date + + + status_change_date + status_change_date N @@ -366,10 +473,106 @@ ${LIMIT_FW} Y - 1024 + 688 320 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_sent_summons + has_sent_summons + + + has_served_summons + has_served_summons + + + appeared_to_recruitment_center + appeared_to_recruitment_center + + + not_appeared_by_valid_excuse + not_appeared_by_valid_excuse + +
+ N + Y + + + 1328 + 176 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_sent_summons + has_sent_summons_raw == 1 + Boolean + -1 + -1 + + + + has_served_summons + has_served_summons_raw == 1 + Boolean + -1 + -1 + + + + appeared_to_recruitment_center + has_appeared_to_recruitment_center_raw == 1 + Boolean + -1 + -1 + + + + not_appeared_by_valid_excuse + has_not_appeared_by_valid_excuse_raw == 1 + Boolean + -1 + -1 + + + + + 1104 + 176 + + Table output @@ -383,6 +586,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl index 5f60fb2..824f5e6 100644 --- a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_delta.hpl @@ -25,26 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Insert / update - Y - - - Insert / update - Filter rows - Y - - - Insert / update - Detect empty stream - Y - Detect empty stream Change job status on success @@ -55,14 +35,54 @@ Change job status on success Y + + Change job status on error + Abort + Y + + + Table input + Insert / update + Y + Insert / update Change job status on error Y - Change job status on error - Abort + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows Y @@ -82,8 +102,8 @@ 0 - 1168 - 400 + 1392 + 528 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 944 - 400 + 1392 + 352 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 64 + 1872 + 208 @@ -180,8 +200,8 @@ where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 336 - 224 + 352 + 352 @@ -197,8 +217,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 224 + 1632 + 208 @@ -233,8 +253,58 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 944 - 64 + 1632 + 320 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_sent_summons_raw + is_sent_summons + MAX + + + has_served_summons_raw + is_served_summons + MAX + + + has_appeared_to_recruitment_center_raw + is_appeared_to_recruitment_center + MAX + + + has_not_appeared_by_valid_excuse_raw + is_not_appeared_by_valid_excuse + MAX + + + N + + + recruit_id + + + N + grp + + + 752 + 208 @@ -251,15 +321,15 @@ and recruitment_id = '${IDM_ID}'; last_row - 736 - 224 + 944 + 208 Insert / update InsertUpdate - N + Y 1 @@ -271,68 +341,158 @@ and recruitment_id = '${IDM_ID}'; = - recruit_id - recruit_id + id + id ervu_dashboard - recruits_info
+ subpoena
- recruit_id - recruit_id + id + id N - created_at - created_at + recruit_id + recruit_id Y - updated_at - updated_at + send_date + send_date Y - info - info + series + series Y - gir_import_data_version_id - gir_import_data_version_id + number + number Y - current_recruitment_id - current_recruitment_id + reason_id + reason_id Y - target_recruitment_id - target_recruitment_id + full_name_responsible_user + full_name_responsible_user Y - full_name - full_name + sig_info + sig_info Y - addresses - addresses + recruitment_name + recruitment_name + Y + + + recruitment_address + recruitment_address + Y + + + visit_date + visit_date + Y + + + status_id + status_id + Y + + + create_date + create_date + Y + + + status_change_date + status_change_date Y
N - 944 - 224 + 752 + 352
Table input TableInput + Y + + 1 + + none + + + postgres.subpoena + N + + SELECT + s.id, --id повестки + CASE + WHEN s.send_date is not null THEN 1 + ELSE 0 + END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки + CASE + WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1 + ELSE 0 + END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки + CASE + WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1 + ELSE 0 + END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат + CASE + WHEN ss.code = '5.1' THEN 1 + ELSE 0 + END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине + s.recruit_id, + s.send_date, --дата направления повестки + s.series, --серия повестки + s.number, --новер повестки + s.reason_id AS subpoena_reason, --причина вызова по повестке /// код передавать или сразу наименование? + s.full_name_responsible_user, --фио военного комиссара(фио пользователя сформировавшео повестку) + s.sig_info, --сертификат ключа проверки ЭП + s.recruitment_name, --наименование ВК + s.recruitment_address, --адрес, по которому необходимо явиться + s.visit_date, --дата и время явки + --, --способ направления // искать в subpoena_send_info + --, --УН заказного почтового отправления // искать в subpoena_send_info + s.status_id, --статус // ссылка на справочник subpoena_status/// AS subpoena_status + s.create_date, --дата создания // для загрузки данных + s.status_change_date --дата обновления // для загрузки данных (timestamp without time zone) + +-- поля для карточки, раздел "Сведения о направлении повестки военного комиссариата" + +FROM public.subpoena s +join public.subpoena_status ss on s.status_id = ss.id +WHERE + '${IDM_ID}' != '' -- Проверка на пустую строку + AND s.department_id = '${IDM_ID}' + AND s.status_change_date >= '${M_R_UP_DATE}'::timestamp + +${LIMIT_FW} + Y + + + 560 + 352 + + + + Update + Update + N 1 @@ -340,35 +500,89 @@ and recruitment_id = '${IDM_ID}'; none - ervu_person_registry - N - - SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name, - r.addresses -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id -WHERE - '${IDM_ID}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' - --AND '${M_R_CR_DATE}' >= r.system_create_date - AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; - -${LIMIT_FW} - Y + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_sent_summons + has_sent_summons + + + has_served_summons + has_served_summons + + + appeared_to_recruitment_center + appeared_to_recruitment_center + + + not_appeared_by_valid_excuse + not_appeared_by_valid_excuse + +
+ N + Y - 544 - 224 + 1392 + 208 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_sent_summons + has_sent_summons_raw == 1 + Boolean + -1 + -1 + + + + has_served_summons + has_served_summons_raw == 1 + Boolean + -1 + -1 + + + + appeared_to_recruitment_center + has_appeared_to_recruitment_center_raw == 1 + Boolean + -1 + -1 + + + + not_appeared_by_valid_excuse + has_not_appeared_by_valid_excuse_raw == 1 + Boolean + -1 + -1 + + + + + 1168 + 208 @@ -384,6 +598,18 @@ ${LIMIT_FW}
+ + Update + Change job status on error + Y + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl index 582920a..7a050d5 100644 --- a/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/subpoena/parallel/subpoena_flow_repeat.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Filter rows Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,7 +102,7 @@ 0 - 1248 + 1312 400 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 960 - 400 + 1312 + 208 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1440 - 48 + 1776 + 64 @@ -212,8 +232,8 @@ DO UPDATE SET - 1440 - 208 + 1568 + 64 @@ -248,8 +268,58 @@ DO UPDATE SET Change job status on success - 960 - 48 + 1568 + 176 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_sent_summons_raw + is_sent_summons + MAX + + + has_served_summons_raw + is_served_summons + MAX + + + has_appeared_to_recruitment_center_raw + is_appeared_to_recruitment_center + MAX + + + has_not_appeared_by_valid_excuse_raw + is_not_appeared_by_valid_excuse + MAX + + + N + + + recruit_id + + + N + grp + + + 672 + 64 @@ -266,15 +336,15 @@ DO UPDATE SET last_row - 720 - 208 + 864 + 64 Insert / update InsertUpdate - N + Y 1 @@ -286,61 +356,86 @@ DO UPDATE SET = - recruit_id - recruit_id + id + id ervu_dashboard - recruits_info
+ subpoena
- recruit_id - recruit_id + id + id N - created_at - created_at + recruit_id + recruit_id Y - updated_at - updated_at + send_date + send_date Y - info - info + series + series Y - gir_import_data_version_id - gir_import_data_version_id + number + number Y - current_recruitment_id - current_recruitment_id + reason_id + reason_id Y - target_recruitment_id - target_recruitment_id + full_name_responsible_user + full_name_responsible_user Y - full_name - full_name + sig_info + sig_info Y - addresses - addresses + recruitment_name + recruitment_name + Y + + + recruitment_address + recruitment_address + Y + + + visit_date + visit_date + Y + + + status_id + status_id + Y + + + create_date + create_date + Y + + + status_change_date + status_change_date Y
N - 960 + 672 208
@@ -348,33 +443,58 @@ DO UPDATE SET Table input TableInput - N + Y 1 none - ervu_person_registry + postgres.subpoena N + SELECT - r.system_create_date AS created_at, - r.system_update_date AS updated_at, - ri.recruit_id, - ri.info, - ri.gir_import_data_version_id, - r.current_recruitment_id, - r.target_recruitment_id, - r.full_name, - r.addresses -FROM recruits_info ri -JOIN recruits r ON r.id = ri.recruit_id + s.id, --id повестки + CASE + WHEN s.send_date is not null THEN 1 + ELSE 0 + END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки + CASE + WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1 + ELSE 0 + END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки + CASE + WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1 + ELSE 0 + END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат + CASE + WHEN ss.code = '5.1' THEN 1 + ELSE 0 + END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине + s.recruit_id, + s.send_date, --дата направления повестки + s.series, --серия повестки + s.number, --новер повестки + s.reason_id AS subpoena_reason, --причина вызова по повестке /// код передавать или сразу наименование? + s.full_name_responsible_user, --фио военного комиссара(фио пользователя сформировавшео повестку) + s.sig_info, --сертификат ключа проверки ЭП + s.recruitment_name, --наименование ВК + s.recruitment_address, --адрес, по которому необходимо явиться + s.visit_date, --дата и время явки + --, --способ направления // искать в subpoena_send_info + --, --УН заказного почтового отправления // искать в subpoena_send_info + s.status_id, --статус // ссылка на справочник subpoena_status/// AS subpoena_status + s.create_date, --дата создания // для загрузки данных + s.status_change_date --дата обновления // для загрузки данных (timestamp without time zone) + +-- поля для карточки, раздел "Сведения о направлении повестки военного комиссариата" + +FROM public.subpoena s +join public.subpoena_status ss on s.status_id = ss.id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку - AND COALESCE(current_recruitment_id, target_recruitment_id) = '${IDM_ID}' - AND '${M_R_CR_DATE}' >= r.system_create_date - --AND '${CR_DATE}' < ri.created_at ---ORDER BY ri.created_at ASC; + AND s.department_id = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= s.create_date ${LIMIT_FW} Y @@ -385,8 +505,8 @@ ${LIMIT_FW} - Table output - TableOutput + Update + Update N @@ -395,63 +515,89 @@ ${LIMIT_FW} none - 1000 + 100 ervu-dashboard - - - recruit_id - recruit_id - - - created_at - created_at - - - updated_at - updated_at - - - info - info - - - gir_import_data_version_id - gir_import_data_version_id - - - current_recruitment_id - current_recruitment_id - - - target_recruitment_id - target_recruitment_id - - - full_name - full_name - - - addresses - addresses - - - N - N - N - N - Y - N - ervu_dashboard - Y - recruits_info
- N - Y - N + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_sent_summons + has_sent_summons + + + has_served_summons + has_served_summons + + + appeared_to_recruitment_center + appeared_to_recruitment_center + + + not_appeared_by_valid_excuse + not_appeared_by_valid_excuse + +
+ N Y - 816 - 544 + 1312 + 64 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_sent_summons + has_sent_summons_raw == 1 + Boolean + -1 + -1 + + + + has_served_summons + has_served_summons_raw == 1 + Boolean + -1 + -1 + + + + appeared_to_recruitment_center + has_appeared_to_recruitment_center_raw == 1 + Boolean + -1 + -1 + + + + not_appeared_by_valid_excuse + has_not_appeared_by_valid_excuse_raw == 1 + Boolean + -1 + -1 + + + + + 1088 + 64 @@ -468,9 +614,9 @@ ${LIMIT_FW}
- Table output + Update Change job status on error - N + Y diff --git a/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf b/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf index dd6f9b5..65fc996 100644 --- a/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf +++ b/mappings/info_recruits/citizen_tables/temporary_measures/temporary_measures_job.hwf @@ -201,8 +201,6 @@ N N ${PROJECT_HOME}/info_recruits/citizen_tables/temporary_measures/recruitment_five_flow_delta.hpl - - Basic Y @@ -222,7 +220,7 @@ Start check_if_temporary_measures_job_exists.hpl - Y + N Y Y diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl index 7b6dca1..53bb855 100644 --- a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow.hpl @@ -40,31 +40,51 @@ Abort Y - - Table input - Identify last row in a stream - Y - - - Identify last row in a stream - Table output - Y - - - Table output - Filter rows - Y - Table output Change job status on error Y + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Table input + Table output + Y + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y + + Update + Filter rows + Y + Abort @@ -82,8 +102,8 @@ 0 - 1376 - 512 + 1312 + 464 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1024 - 512 + 1312 + 320 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1632 - 160 + 1808 + 192 @@ -194,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 1632 - 320 + 1552 + 192 @@ -230,8 +250,43 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1024 - 160 + 1552 + 288 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_active_temporary_measure + is_active_temporary_measure + MAX + + + N + + + recruit_id + + + N + grp + + + 672 + 192 @@ -248,15 +303,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 752 - 320 + 864 + 192 Table input TableInput - N + Y 1 @@ -267,10 +322,17 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N select +s.recruit_id, +CASE + WHEN rdi.applied_fact is true THEN 1 + ELSE 0 +END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер rdi.* from public.restriction_document_item rdi join public.restriction_document rd on rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +join public.subpoena s on +s.id = rd.subpoena_id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку AND rd.vk_id = '${IDM_ID}' @@ -288,7 +350,7 @@ ${LIMIT_FW} Table output TableOutput - N + Y 1 @@ -374,10 +436,70 @@ ${LIMIT_FW} Y - 1024 + 672 320 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_active_temporary_measure + has_active_temporary_measure + +
+ N + Y + + + 1312 + 192 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_active_temporary_measure + has_active_temporary_measure_raw == 1 + Boolean + -1 + -1 + + + + + 1088 + 192 + + Table output @@ -391,6 +513,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl index 81c04a9..48ac0dc 100644 --- a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Detect empty stream Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,8 +102,8 @@ 0 - 1168 - 400 + 1376 + 368 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 944 - 400 + 1376 + 224 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 64 + 1920 + 96 @@ -197,8 +217,8 @@ and recruitment_id = '${IDM_ID}'; - 1248 - 224 + 1648 + 96 @@ -233,8 +253,43 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 944 - 64 + 1648 + 192 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_active_temporary_measure + is_active_temporary_measure + MAX + + + N + + + recruit_id + + + N + grp + + + 736 + 96 @@ -251,15 +306,15 @@ and recruitment_id = '${IDM_ID}'; last_row - 736 - 224 + 928 + 96 Insert / update InsertUpdate - N + Y 1 @@ -273,13 +328,11 @@ and recruitment_id = '${IDM_ID}'; = id id - = created_at created_at - ervu_dashboard restriction_document_item
@@ -362,7 +415,7 @@ and recruitment_id = '${IDM_ID}'; N - 944 + 736 224
@@ -370,7 +423,7 @@ and recruitment_id = '${IDM_ID}'; Table input TableInput - N + Y 1 @@ -380,10 +433,17 @@ and recruitment_id = '${IDM_ID}'; ervu_person_registry N select +s.recruit_id, +CASE + WHEN rdi.applied_fact is true THEN 1 + ELSE 0 +END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер rdi.* from public.restriction_document_item rdi join public.restriction_document rd on rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +join public.subpoena s on +s.id = rd.subpoena_id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку AND rd.vk_id = '${IDM_ID}' @@ -397,6 +457,66 @@ ${LIMIT_FW} 224 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_active_temporary_measure + has_active_temporary_measure + +
+ N + Y + + + 1376 + 96 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_active_temporary_measure + has_active_temporary_measure_raw == 1 + Boolean + -1 + -1 + + + + + 1152 + 96 + + Insert / update @@ -410,6 +530,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl index 87a5793..edbbe21 100644 --- a/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl +++ b/mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl @@ -25,11 +25,6 @@ Table input Y - - Table input - Identify last row in a stream - Y - Filter rows Change job status on success @@ -46,23 +41,48 @@ Y - Identify last row in a stream + Insert / update + Change job status on error + Y + + + Table input Insert / update Y - Insert / update - Filter rows + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update Y Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update Detect empty stream Y - Insert / update - Change job status on error + Update + Filter rows Y @@ -82,7 +102,7 @@ 0 - 1248 + 1280 400 @@ -117,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 960 - 400 + 1280 + 208 @@ -148,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1440 - 48 + 1744 + 80 @@ -212,8 +232,8 @@ DO UPDATE SET
- 1440 - 208 + 1488 + 80 @@ -248,8 +268,43 @@ DO UPDATE SET Change job status on success - 960 - 48 + 1504 + 192 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_active_temporary_measure + is_active_temporary_measure + MAX + + + N + + + recruit_id + + + N + grp + + + 640 + 80 @@ -266,15 +321,15 @@ DO UPDATE SET last_row - 720 - 208 + 832 + 80 Insert / update InsertUpdate - N + Y 1 @@ -288,13 +343,11 @@ DO UPDATE SET = id id - = created_at created_at - ervu_dashboard restriction_document_item
@@ -377,7 +430,7 @@ DO UPDATE SET N - 960 + 640 208
@@ -385,7 +438,7 @@ DO UPDATE SET Table input TableInput - N + Y 1 @@ -394,11 +447,19 @@ DO UPDATE SET postgres.subpoena N + select +s.recruit_id, +CASE + WHEN rdi.applied_fact is true THEN 1 + ELSE 0 +END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер rdi.* from public.restriction_document_item rdi join public.restriction_document rd on rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id) +join public.subpoena s on +s.id = rd.subpoena_id WHERE '${IDM_ID}' != '' -- Проверка на пустую строку AND rd.vk_id = '${IDM_ID}' @@ -412,6 +473,66 @@ ${LIMIT_FW} 208 + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_active_temporary_measure + has_active_temporary_measure + +
+ N + Y + + + 1280 + 80 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_active_temporary_measure + has_active_temporary_measure_raw == 1 + Boolean + -1 + -1 + + + + + 1056 + 80 + + Insert / update @@ -425,6 +546,18 @@ ${LIMIT_FW} + + Update + Change job status on error + Y + + + + + + + + diff --git a/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl index 80c5491..dea22ce 100644 --- a/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl +++ b/mappings/info_recruits/raw_data/subpoena_send_info/parallel/subpoena_send_info_flow.hpl @@ -355,14 +355,11 @@ ${LIMIT_FW} N N N - Y - N ervu_dashboard Y subpoena_send_info
- N Y N diff --git a/mappings/info_recruits/reference_data/send_dictionary.hpl b/mappings/info_recruits/reference_data/send_dictionary.hpl new file mode 100644 index 0000000..3d75733 --- /dev/null +++ b/mappings/info_recruits/reference_data/send_dictionary.hpl @@ -0,0 +1,114 @@ + + + + send_dictionary + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/27 18:10:55.738 + - + 2025/08/27 18:10:55.738 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + ervu_dashboard + send_dictionary
+ + id + id + N + + + code + code + Y + + + hidden + hidden + Y + + + name + name + Y + + + to_front + to_front + Y + + + type + type + Y + +
+ N + + + 880 + 288 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + select * from public.send_dictionary + N + + + 496 + 288 + + + + + +
From 22098a0ba4d7a02ae4204e3ac1df80b5fbf3bc15 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Mon, 1 Sep 2025 12:06:36 +0500 Subject: [PATCH 19/21] fix --- .../property/check_if_need_to_repeat_job.hpl | 86 ++ .../check_if_property_job_exists.hpl | 113 +++ .../property/parallel/property_flow.hpl | 722 +++++++++++++++++ .../property/parallel/property_flow_delta.hpl | 743 +++++++++++++++++ .../parallel/property_flow_repeat.hpl | 757 ++++++++++++++++++ .../citizen_tables/property/property_job.hwf | 358 +++++++++ .../property/recruitment_five_flow_delta.hpl | 360 +++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++ .../property/recruitments_five_flow.hpl | 373 +++++++++ .../subpoena/check_if_need_to_repeat_job.hpl | 2 +- 10 files changed, 3873 insertions(+), 1 deletion(-) create mode 100644 mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/checkpoints/check_if_property_job_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/parallel/property_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/property_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/property/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/property/recruitments_five_flow.hpl diff --git a/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..f15ccdf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'subpoena_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/property/checkpoints/check_if_property_job_exists.hpl b/mappings/info_recruits/citizen_tables/property/checkpoints/check_if_property_job_exists.hpl new file mode 100644 index 0000000..09a5ca3 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/checkpoints/check_if_property_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_property_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'property_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/property/parallel/property_flow.hpl b/mappings/info_recruits/citizen_tables/property/parallel/property_flow.hpl new file mode 100644 index 0000000..a387b6a --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/parallel/property_flow.hpl @@ -0,0 +1,722 @@ + + + + property_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table output + Change job status on error + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Table input + Table output + Y + + + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1328 + 496 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1328 + 320 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1856 + 176 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1536 + 176 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1536 + 304 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 688 + 176 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 880 + 176 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation'THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 496 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + kind_right + kind_right + + + address + address + + + vehicle_type + vehicle_type + + + issue_year + issue_year + + + brand_model + brand_model + + + reg_plate + reg_plate + + + vin + vin + + + vehicle_category + vehicle_category + + + start_date + start_date + + + close_date + close_date + + + type_property + type_property + + + N + N + N + N + Y + N + ervu_dashboard + Y + property
+ N + Y + N + Y + + + 688 + 320 + +
+ + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1328 + 176 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1104 + 176 + + + + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl b/mappings/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl new file mode 100644 index 0000000..2499f87 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl @@ -0,0 +1,743 @@ + + + + property_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Insert / update + Y + + + Insert / update + Change job status on error + Y + + + Insert / update + Group by + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + Update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1392 + 528 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1392 + 352 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1872 + 208 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 352 + 352 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1632 + 320 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 752 + 208 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 944 + 208 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + kind_right + kind_right + Y + + + address + address + Y + + + vehicle_type + vehicle_type + Y + + + issue_year + issue_year + Y + + + brand_model + brand_model + Y + + + reg_plate + reg_plate + Y + + + vin + vin + Y + + + vehicle_category + vehicle_category + Y + + + start_date + start_date + Y + + + close_date + close_date + Y + + + type_property + type_property + Y + +
+ N + + + 752 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + --AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation' THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 560 + 352 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1392 + 208 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1168 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl new file mode 100644 index 0000000..2aa2f33 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl @@ -0,0 +1,757 @@ + + + + property_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Insert / update + Change job status on error + Y + + + Table input + Insert / update + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1312 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1312 + 208 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1776 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1568 + 64 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1568 + 176 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 672 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 864 + 64 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + kind_right + kind_right + Y + + + address + address + Y + + + vehicle_type + vehicle_type + Y + + + issue_year + issue_year + Y + + + brand_model + brand_model + Y + + + reg_plate + reg_plate + Y + + + vin + vin + Y + + + vehicle_category + vehicle_category + Y + + + start_date + start_date + Y + + + close_date + close_date + Y + + + type_property + type_property + Y + +
+ N + + + 672 + 208 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation' THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 480 + 208 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1312 + 64 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1088 + 64 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/property/property_job.hwf b/mappings/info_recruits/citizen_tables/property/property_job.hwf new file mode 100644 index 0000000..c805415 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/property_job.hwf @@ -0,0 +1,358 @@ + + + property_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_property_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/property/checkpoints/check_if_property_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + subpoena_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/property/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/property/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/property/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_property_job_exists.hpl + Y + Y + Y + + + check_if_property_job_exists.hpl + subpoena_job_exists_check + Y + Y + N + + + subpoena_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + subpoena_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + subpoena_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..0ac96e5 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + property_flow_delta.hpl + Y + + + Table input + property_flow_delta.hpl 2 + Y + + + Table input + property_flow_delta.hpl 3 + Y + + + Table input + property_flow_delta.hpl 4 + Y + + + Table input + property_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'property_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + property_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 128 + + + + property_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 208 + + + + property_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 288 + + + + property_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 368 + + + + property_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..b7c2cde --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + property_flow_repeat.hpl + Y + + + Table input + property_flow_repeat.hpl 2 + Y + + + Table input + property_flow_repeat.hpl 3 + Y + + + Table input + property_flow_repeat.hpl 4 + Y + + + Table input + property_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'property_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + property_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + property_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 288 + + + + property_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 368 + + + + property_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 448 + + + + property_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/property/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/property/recruitments_five_flow.hpl new file mode 100644 index 0000000..14c764d --- /dev/null +++ b/mappings/info_recruits/citizen_tables/property/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + property_flow.hpl + Y + + + Get all recruitments ordered by created_date + property_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + property_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + property_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + property_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + property_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 144 + + + + property_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 224 + + + + property_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 304 + + + + property_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 384 + + + + property_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + property_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 464 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl index f15ccdf..b70250e 100644 --- a/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl @@ -69,7 +69,7 @@ FROM ervu_dashboard.recruitment r LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - and job_name = 'subpoena_job' + and job_name = 'property_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') limit 1 ) as need_to_repeat_job; From 88bcddcfe5e8ea274cab6a3a634eef170cb41072 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Wed, 3 Sep 2025 17:07:33 +0300 Subject: [PATCH 20/21] fix fz53 --- mappings/connections/external_to_test1.json | 2 +- .../citizen_criminal_liability_fz53_flow.hpl | 28 +++++- ...zen_criminal_liability_fz53_flow_delta.hpl | 21 +++- ...en_criminal_liability_fz53_flow_repeat.hpl | 31 +++++- .../restriction_document_status.hpl | 1 - .../reference_data/subpoena_status.hpl | 99 +++++++++++++++++++ 6 files changed, 173 insertions(+), 9 deletions(-) create mode 100644 mappings/info_recruits/reference_data/subpoena_status.hpl diff --git a/mappings/connections/external_to_test1.json b/mappings/connections/external_to_test1.json index 45d636b..c4da331 100644 --- a/mappings/connections/external_to_test1.json +++ b/mappings/connections/external_to_test1.json @@ -29,7 +29,7 @@ "description" : "" }, { "name" : "DB_DASHBOARD_NAME", - "value" : "ervu-dashboard-test1", + "value" : "ervu-dashboard-test", "description" : "" }, { "name" : "DB_DASHBOARD_USERNAME", diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl index ecc5a21..0d5fb92 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow.hpl @@ -273,7 +273,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); has_criminal_liability_fz53_raw is_criminal_liability_fz53 MAX - N @@ -283,7 +282,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); N - grp @@ -350,15 +348,27 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS is_criminal_liability_fz53 + END AS is_criminal_liability_fz53, + (i.extra_info->>'dateApplication')::date AS date_application,--дата с которой наложена мера + i.extra_info->>'description' AS description,--описание наказания + i.extra_info->>'reasonForAddEntry' AS reason_for_add_entry--основания для внесения записи + FROM public.infringement i + JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты + WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + + ${LIMIT_FW} Y @@ -429,6 +439,18 @@ ${LIMIT_FW} hidden hidden + + date_application + date_application + + + description + description + + + reason_for_add_entry + reason_for_add_entry + N N diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl index ebdf8a6..0201a15 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_delta.hpl @@ -396,6 +396,21 @@ and recruitment_id = '${IDM_ID}'; hidden Y + + date_application + date_application + Y + + + description + description + Y + + + reason_for_add_entry + reason_for_add_entry + Y + N @@ -417,6 +432,7 @@ and recruitment_id = '${IDM_ID}'; postgres.decision-document-service N + SELECT i.recruit_id, i.created_at, @@ -444,7 +460,10 @@ and recruitment_id = '${IDM_ID}'; CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS is_criminal_liability_fz53 + END AS is_criminal_liability_fz53, + (i.extra_info->>'dateApplication')::date AS date_application,--дата с которой наложена мера + i.extra_info->>'description' AS description,--описание наказания + i.extra_info->>'reasonForAddEntry' AS reason_for_add_entry--основания для внесения записи FROM public.infringement i JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' diff --git a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl index 77983ed..2602be1 100644 --- a/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_criminal_liability_fz53/parallel/citizen_criminal_liability_fz53_flow_repeat.hpl @@ -291,7 +291,6 @@ DO UPDATE SET has_criminal_liability_fz53_raw is_criminal_liability_fz53 MAX - N @@ -301,7 +300,6 @@ DO UPDATE SET N - grp @@ -413,6 +411,21 @@ DO UPDATE SET hidden Y + + date_application + date_application + Y + + + description + description + Y + + + reason_for_add_entry + reason_for_add_entry + Y + N @@ -462,15 +475,27 @@ DO UPDATE SET CASE WHEN i.hidden is false THEN 1 ELSE 0 - END AS is_criminal_liability_fz53 + END AS is_criminal_liability_fz53, + (i.extra_info->>'dateApplication')::date AS date_application,--дата с которой наложена мера + i.extra_info->>'description' AS description,--описание наказания + i.extra_info->>'reasonForAddEntry' AS reason_for_add_entry--основания для внесения записи + FROM public.infringement i + JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}' + AND '${M_R_CR_DATE}' >= i.created_at + --AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(i.updated_at, i.created_at) -- для дельты + WHERE --hidden IS FALSE AND + i.type = 'CRIMINAL' + + ${LIMIT_FW} Y diff --git a/mappings/info_recruits/reference_data/restriction_document_status.hpl b/mappings/info_recruits/reference_data/restriction_document_status.hpl index 4d5a79d..75245f5 100644 --- a/mappings/info_recruits/reference_data/restriction_document_status.hpl +++ b/mappings/info_recruits/reference_data/restriction_document_status.hpl @@ -44,7 +44,6 @@ = id id - ervu_dashboard restriction_document_status
diff --git a/mappings/info_recruits/reference_data/subpoena_status.hpl b/mappings/info_recruits/reference_data/subpoena_status.hpl new file mode 100644 index 0000000..7b03598 --- /dev/null +++ b/mappings/info_recruits/reference_data/subpoena_status.hpl @@ -0,0 +1,99 @@ + + + + subpoena_status + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/09/03 11:49:15.431 + - + 2025/09/03 11:49:15.431 + + + + + + Table input + Insert / update + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + ervu_dashboard + subpoena_status
+ + id + id + N + + + code + code + Y + + + name + name + Y + +
+ N + + + 1008 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + N + 0 + select * from public.subpoena_status + N + + + 624 + 336 + + + + + +
From 41da6ea4d969c60112f742f3f21617b9cf58090e Mon Sep 17 00:00:00 2001 From: Ruslan Date: Thu, 4 Sep 2025 08:04:15 +0300 Subject: [PATCH 21/21] / --- .../check_if_need_to_repeat_job.hpl | 86 ++ .../check_if_citizenship_job_exists.hpl | 113 +++ .../citizenship/citizenship_job.hwf | 358 +++++++++ .../citizenship/parallel/citizenship_flow.hpl | 722 +++++++++++++++++ .../parallel/citizenship_flow_delta.hpl | 743 +++++++++++++++++ .../parallel/citizenship_flow_repeat.hpl | 757 ++++++++++++++++++ .../recruitment_five_flow_delta.hpl | 360 +++++++++ .../recruitment_five_flow_on_error.hpl | 360 +++++++++ .../citizenship/recruitments_five_flow.hpl | 373 +++++++++ .../property/check_if_need_to_repeat_job.hpl | 2 +- .../citizen_tables/property/property_job.hwf | 4 +- .../subpoena/check_if_need_to_repeat_job.hpl | 2 +- 12 files changed, 3877 insertions(+), 3 deletions(-) create mode 100644 mappings/info_recruits/citizen_tables/citizenship/check_if_need_to_repeat_job.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/checkpoints/check_if_citizenship_job_exists.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/citizenship_job.hwf create mode 100644 mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_delta.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_on_error.hpl create mode 100644 mappings/info_recruits/citizen_tables/citizenship/recruitments_five_flow.hpl diff --git a/mappings/info_recruits/citizen_tables/citizenship/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/citizenship/check_if_need_to_repeat_job.hpl new file mode 100644 index 0000000..b63f652 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/check_if_need_to_repeat_job.hpl @@ -0,0 +1,86 @@ + + + + check_if_need_to_repeat_job + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 12:27:51.630 + - + 2025/08/08 12:27:51.630 + + + + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + need_to_repeat_job + NEED_TO_REPEAT_JOB + ROOT_WORKFLOW + + + Y + + + 624 + 288 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS (SELECT 1 +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizenship_job' +where je.status is null or je.status in ('ERROR', 'PROCESSING') +limit 1 +) as need_to_repeat_job; + N + + + 336 + 288 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizenship/checkpoints/check_if_citizenship_job_exists.hpl b/mappings/info_recruits/citizen_tables/citizenship/checkpoints/check_if_citizenship_job_exists.hpl new file mode 100644 index 0000000..99157b0 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/checkpoints/check_if_citizenship_job_exists.hpl @@ -0,0 +1,113 @@ + + + + check_if_citizenship_job_exists + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 13:28:46.661 + - + 2025/08/05 13:28:46.661 + + + + + + Set variables + Write to log + N + + + Table input + Set variables + Y + + + + Set variables + SetVariable + + Y + + 1 + + none + + + + + job_executed_flag + JOB_EXECUTED_FLAG + PARENT_WORKFLOW + + + Y + + + 672 + 336 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'citizenship_job' + limit 1 + ) AS job_executed_flag; + N + + + 384 + 336 + + + + Write to log + WriteToLog + + Y + + 1 + + none + + + Y + + + N + 0 + Basic + ${STATUS} + + + 944 + 224 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizenship/citizenship_job.hwf b/mappings/info_recruits/citizen_tables/citizenship/citizenship_job.hwf new file mode 100644 index 0000000..f0195f9 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/citizenship_job.hwf @@ -0,0 +1,358 @@ + + + citizenship_job + Y + + + + 0 + - + 2025/08/05 12:45:28.561 + - + 2025/08/05 12:45:28.561 + + + COMMENT + + + + + LIMIT_FW + ; + + + + M_R_CR_DATE + 3001-01-01 00:00:00 + + + + M_R_UP_DATE + 0001-01-01 00:00:00 + + + + + + Start + + SPECIAL + + 1 + 12 + 60 + 0 + 0 + N + 0 + 1 + N + 224 + 304 + + + + check_if_citizenship_job_exists.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/checkpoints/check_if_citizenship_job_exists.hpl + Basic + + Y + + N + local + N + N + Y + N + 416 + 304 + + + + citizenship_job_exists_check + + SIMPLE_EVAL + + boolean + false + equal + equal + N + variable + JOB_EXECUTED_FLAG + N + 688 + 304 + + + + recruitments_five_flow.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/recruitments_five_flow.hpl + Basic + + Y + + N + local + N + N + Y + Y + 928 + 304 + + + + recruitment_five_flow_on_error.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/recruitment_five_flow_on_error.hpl + Basic + + Y + + N + local + N + N + Y + N + 928 + 608 + + + + check_if_need_to_repeat_job.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/check_if_need_to_repeat_job.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 464 + + + + Simple evaluation + + SIMPLE_EVAL + + boolean + true + equal + equal + N + variable + NEED_TO_REPEAT_JOB + N + 688 + 608 + + + + recruitment_five_flow_delta.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/recruitment_five_flow_delta.hpl + Basic + + Y + + N + local + N + N + Y + N + 688 + 800 + + + + + + Start + check_if_citizenship_job_exists.hpl + Y + Y + Y + + + check_if_citizenship_job_exists.hpl + citizenship_job_exists_check + Y + Y + N + + + citizenship_job_exists_check + recruitments_five_flow.hpl + Y + Y + N + + + citizenship_job_exists_check + check_if_need_to_repeat_job.hpl + Y + N + N + + + check_if_need_to_repeat_job.hpl + Simple evaluation + Y + Y + N + + + Simple evaluation + recruitment_five_flow_on_error.hpl + Y + Y + N + + + Simple evaluation + recruitment_five_flow_delta.hpl + Y + N + N + + + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 256 + Первичка + 65 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 800 + 560 + Повторка + 64 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + -1 + 26 + 608 + 720 + Дельта + 49 + + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 150 + 1200 + 80 + citizenship_job + +M_R_UP_DATE + +M_R_CR_DATE + +0001-01-01 00:00:00 + +3001-01-01 00:00:00 + 114 + + + + diff --git a/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl new file mode 100644 index 0000000..632f01c --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl @@ -0,0 +1,722 @@ + + + + citizenship_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 14:31:22.799 + - + 2025/08/05 14:31:22.799 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table output + Change job status on error + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Table input + Table output + Y + + + Table output + Group by + Y + + + Update + Change job status on error + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1328 + 496 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1328 + 320 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1856 + 176 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) +VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); + + + + + 288 + 320 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1536 + 176 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1536 + 304 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 688 + 176 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 880 + 176 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation'THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 496 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + recruit_id + recruit_id + + + kind_right + kind_right + + + address + address + + + vehicle_type + vehicle_type + + + issue_year + issue_year + + + brand_model + brand_model + + + reg_plate + reg_plate + + + vin + vin + + + vehicle_category + vehicle_category + + + start_date + start_date + + + close_date + close_date + + + type_property + type_property + + + N + N + N + N + Y + N + ervu_dashboard + Y + property
+ N + Y + N + Y + + + 688 + 320 + +
+ + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1328 + 176 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1104 + 176 + + + + + Table output + Change job status on error + Y + + error_description + + error_code + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl new file mode 100644 index 0000000..08270bf --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl @@ -0,0 +1,743 @@ + + + + citizenship_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:22:56.048 + - + 2025/08/11 13:22:56.048 + + + + + + Create job execution record + Table input + Y + + + Detect empty stream + Change job status on success + Y + + + Filter rows + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Table input + Insert / update + Y + + + Insert / update + Change job status on error + Y + + + Insert / update + Group by + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + Update + Change job status on error + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1392 + 528 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'DELTA_ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1392 + 352 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'DELTA_SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1872 + 208 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + UPDATE etl.job_execution +SET + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL +where job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + 352 + 352 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1632 + 208 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1632 + 320 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 752 + 208 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 944 + 208 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + kind_right + kind_right + Y + + + address + address + Y + + + vehicle_type + vehicle_type + Y + + + issue_year + issue_year + Y + + + brand_model + brand_model + Y + + + reg_plate + reg_plate + Y + + + vin + vin + Y + + + vehicle_category + vehicle_category + Y + + + start_date + start_date + Y + + + close_date + close_date + Y + + + type_property + type_property + Y + +
+ N + + + 752 + 352 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + --AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation' THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 560 + 352 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1392 + 208 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1168 + 208 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl new file mode 100644 index 0000000..1fbed12 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl @@ -0,0 +1,757 @@ + + + + citizenship_flow_repeat + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/08 13:25:52.319 + - + 2025/08/08 13:25:52.319 + + + + + + Create job execution record + Table input + Y + + + Filter rows + Change job status on success + Y + + + Detect empty stream + Change job status on success + Y + + + Change job status on error + Abort + Y + + + Insert / update + Change job status on error + Y + + + Table input + Insert / update + Y + + + Group by + Identify last row in a stream + Y + + + Identify last row in a stream + User defined Java expression + Y + + + User defined Java expression + Update + Y + + + Insert / update + Group by + Y + + + Update + Change job status on error + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + + Abort + Abort + + Y + + 1 + + none + + + ABORT_WITH_ERROR + Y + 0 + + + 1312 + 400 + + + + Change job status on error + ExecSql + + Y + + 1 + + none + + + + + error_description + + + ervu-dashboard + Y + N + Y + Y + N + UPDATE etl.job_execution +SET status = 'ERROR', + error_description = ? +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1312 + 208 + + + + Change job status on success + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + Y + N + Y + N + N + UPDATE etl.job_execution +SET status = 'SUCCESS' +WHERE job_name = '${JOB_NAME}' +and recruitment_id = '${IDM_ID}'; + + + + + 1776 + 64 + + + + Create job execution record + ExecSql + + Y + + 1 + + none + + + + + ervu-dashboard + N + N + Y + N + N + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL + + + + 272 + 208 + + + + Detect empty stream + DetectEmptyStream + + Y + + 1 + + none + + + + + 1568 + 64 + + + + Filter rows + FilterRows + + Y + + 1 + + none + + + + + + + = + last_row + N + - + + N + -1 + constant + -1 + Y + Boolean + + + + Change job status on success + + + 1568 + 176 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_property_raw + is_property + MAX + + + has_ground_transport_raw + is_ground_transport + MAX + + + has_air_transport_raw + is_air_transport + MAX + + + has_water_transport_raw + is_water_transport + MAX + + + N + + + recruit_id + + + N + grp + + + 672 + 64 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 864 + 64 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + id + id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + kind_right + kind_right + Y + + + address + address + Y + + + vehicle_type + vehicle_type + Y + + + issue_year + issue_year + Y + + + brand_model + brand_model + Y + + + reg_plate + reg_plate + Y + + + vin + vin + Y + + + vehicle_category + vehicle_category + Y + + + start_date + start_date + Y + + + close_date + close_date + Y + + + type_property + type_property + Y + +
+ N + + + 672 + 208 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + + WITH +base as( + SELECT + ri.recruit_id, + ri.info + FROM ervu_dashboard.recruits_info ri + join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at +), +prop AS ( + SELECT + base.recruit_id, + 'realty' AS property_type, + ry.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + THEN base.info->'svedFL'->'svedON'->'on' + ELSE '[]'::jsonb + END + ) AS ry ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'ground_transportation' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + THEN base.info->'svedFL'->'svedNazTS'->'nazTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'air_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + THEN base.info->'svedFL'->'svedVozTS'->'vozTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array' + + UNION ALL + + SELECT + base.recruit_id, + 'water_vehicles' AS property_type, + property_data.value AS property_data + FROM base + LEFT JOIN LATERAL jsonb_array_elements( + CASE + WHEN jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' + THEN base.info->'svedFL'->'svedVodTS'->'vodTS' + ELSE '[]'::jsonb + END + ) AS property_data ON true + WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array' +), +all_data as( + -- Недвижимость + SELECT + base.recruit_id, + property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля + property_data->'adrObSob'->>'adrObSobTekst' AS address, + NULL AS vehicle_type, -- Добавлено для соответствия числа столбцов + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date, + 'realty' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'realty' + + UNION ALL + + -- Наземный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'vidTS' AS vehicle_type, + property_data->>'godVyp' AS issue_year, + property_data->>'markaTS' AS brand_model, + property_data->>'gosRegZn' AS reg_plate, + property_data->>'idenNom' AS vin, + NULL AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'ground_transportation' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'ground_transportation' + + UNION ALL + + -- Воздушный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'air_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'air_vehicles' + + UNION ALL + + -- Водный транспорт + SELECT + base.recruit_id, + NULL AS kind_right, + NULL AS address, + property_data->>'naimVid' AS vehicle_type, + NULL AS issue_year, + NULL AS brand_model, + NULL AS reg_plate, + NULL AS vin, + property_data->>'naznKat' AS vehicle_category, + to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date, + to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date, + 'water_vehicles' AS type_property + FROM base + JOIN prop ON base.recruit_id = prop.recruit_id + WHERE prop.property_type = 'water_vehicles' +) +select + *, + CASE + WHEN type_property = 'realty' THEN 1 + ELSE 0 + END AS is_property, -- недвиж//has_property + CASE + WHEN type_property = 'ground_transportation' THEN 1 + ELSE 0 + END AS is_ground_transport, -- наземный транспорт//has_ground_transport + CASE + WHEN type_property = 'air_vehicles' THEN 1 + ELSE 0 + END AS is_air_transport, -- воздушный транспорт//has_air_transport + CASE + WHEN type_property = 'water_vehicles' THEN 1 + ELSE 0 + END AS is_water_transport -- водный транспорт//has_water_transport +from all_data + Y + + + 480 + 208 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + has_property + has_property + + + has_ground_transport + has_ground_transport + + + has_air_transport + has_air_transport + + + has_water_transport + has_water_transport + +
+ N + Y + + + 1312 + 64 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + has_property + has_property_raw == 1 + Boolean + -1 + -1 + + + + has_ground_transport + has_ground_transport_raw == 1 + Boolean + -1 + -1 + + + + has_air_transport + has_air_transport_raw == 1 + Boolean + -1 + -1 + + + + has_water_transport + has_water_transport_raw == 1 + Boolean + -1 + -1 + + + + + 1088 + 64 + + + + + Insert / update + Change job status on error + Y + + + + + + + + + + Update + Change job status on error + Y + + + + + + + + + + +
diff --git a/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_delta.hpl new file mode 100644 index 0000000..be774d3 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_delta.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_delta + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/11 13:16:11.204 + - + 2025/08/11 13:16:11.204 + + + + + + Table input + citizenship_flow_delta.hpl + Y + + + Table input + citizenship_flow_delta.hpl 2 + Y + + + Table input + citizenship_flow_delta.hpl 3 + Y + + + Table input + citizenship_flow_delta.hpl 4 + Y + + + Table input + citizenship_flow_delta.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizenship_job' +where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING'); + N + + + 352 + 288 + + + + citizenship_flow_delta.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 640 + 128 + + + + citizenship_flow_delta.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 208 + + + + citizenship_flow_delta.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 288 + + + + citizenship_flow_delta.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 368 + + + + citizenship_flow_delta.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_delta.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 656 + 448 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_on_error.hpl b/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_on_error.hpl new file mode 100644 index 0000000..4001044 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/recruitment_five_flow_on_error.hpl @@ -0,0 +1,360 @@ + + + + recruitment_five_flow_on_error + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/08/05 12:54:50.126 + - + 2025/08/05 12:54:50.126 + + + + + + Table input + citizenship_flow_repeat.hpl + Y + + + Table input + citizenship_flow_repeat.hpl 2 + Y + + + Table input + citizenship_flow_repeat.hpl 3 + Y + + + Table input + citizenship_flow_repeat.hpl 4 + Y + + + Table input + citizenship_flow_repeat.hpl 5 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'citizenship_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); + N + + + 272 + 368 + + + + citizenship_flow_repeat.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 544 + 208 + + + + citizenship_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 288 + + + + citizenship_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 368 + + + + citizenship_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 448 + + + + citizenship_flow_repeat.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 560 + 528 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/citizenship/recruitments_five_flow.hpl b/mappings/info_recruits/citizen_tables/citizenship/recruitments_five_flow.hpl new file mode 100644 index 0000000..31961c5 --- /dev/null +++ b/mappings/info_recruits/citizen_tables/citizenship/recruitments_five_flow.hpl @@ -0,0 +1,373 @@ + + + + recruitments_five_flow + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/04/18 09:48:01.970 + - + 2025/04/18 09:48:01.970 + + + + + + Get all recruitments ordered by created_date + citizenship_flow.hpl + Y + + + Get all recruitments ordered by created_date + citizenship_flow.hpl 2 + Y + + + Get all recruitments ordered by created_date + citizenship_flow.hpl 3 + Y + + + Get all recruitments ordered by created_date + citizenship_flow.hpl 4 + Y + + + Get all recruitments ordered by created_date + citizenship_flow.hpl 5 + Y + + + + Get all recruitments ordered by created_date + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + SELECT +idm_id AS recruitment +FROM ervu_dashboard.recruitment +${COMMENT}/* +where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a', +'cff66da8-2be0-4839-bd8e-332b1a150031', +'34c8685e-f08a-4877-afb1-a0589800a21c', +'0e10678c-f272-41c3-94dd-c15830321f9a', +'9703f108-761a-467a-aad3-89617e5539ed', +'55eae374-9bb5-4295-9e3a-5fbcdaba870d', +'dad6c101-34be-45c3-8173-57190cb69dfb', +'fc10523f-af31-4f6b-b0e2-00799758f634', +'61807cc2-9913-4060-8802-0672877c28c8', +'eba7fd7d-e3da-49a7-8e65-8fc85e47190e', +'f59afe6d-c166-4196-a489-6d17f02fc05e', +'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9', +'0fe2bdf0-afbb-402d-93da-67e511799afa', +'6139de3b-2378-496f-9fca-7df7dab90832', +'50ba73dd-1726-48f1-8b7c-7a77ff965299') +${COMMENT}*/ + Y + + + 432 + 304 + + + + citizenship_flow.hpl + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 144 + + + + citizenship_flow.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 240 + + + + citizenship_flow.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 336 + + + + citizenship_flow.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 432 + + + + citizenship_flow.hpl 5 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/citizen_tables/citizenship/parallel/citizenship_flow.hpl + N + + 1 + + + + + IDM_ID + recruitment + + + + JOB_NAME + + citizenship_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 736 + 512 + + + + + + diff --git a/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl index f15ccdf..b70250e 100644 --- a/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl @@ -69,7 +69,7 @@ FROM ervu_dashboard.recruitment r LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - and job_name = 'subpoena_job' + and job_name = 'property_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') limit 1 ) as need_to_repeat_job; diff --git a/mappings/info_recruits/citizen_tables/property/property_job.hwf b/mappings/info_recruits/citizen_tables/property/property_job.hwf index c805415..1b74416 100644 --- a/mappings/info_recruits/citizen_tables/property/property_job.hwf +++ b/mappings/info_recruits/citizen_tables/property/property_job.hwf @@ -157,7 +157,9 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/property/check_if_need_to_repeat_job.hpl + + Basic Y diff --git a/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl index b70250e..f15ccdf 100644 --- a/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl +++ b/mappings/info_recruits/citizen_tables/subpoena/check_if_need_to_repeat_job.hpl @@ -69,7 +69,7 @@ FROM ervu_dashboard.recruitment r LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - and job_name = 'property_job' + and job_name = 'subpoena_job' where je.status is null or je.status in ('ERROR', 'PROCESSING') limit 1 ) as need_to_repeat_job;