From c59b982f999cd99c9e4ffc646902e91f5dbc0443 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Tue, 4 Feb 2025 15:27:21 +0300 Subject: [PATCH] fix --- .../connections/db_uat.json | 103 ++ .../info_recruits/job_info_recruits.hwf | 227 ++-- .../job_recruitments_all.hwf | 7 + .../jobs_once_a_day/child_once.hpl | 177 +++ .../jobs_once_a_day/citizen_foreign_once.hpl | 189 ++++ .../jobs_once_a_day/citizenship_once.hpl | 110 ++ .../jobs_once_a_day/deputy_once.hpl | 215 ++++ .../jobs_once_a_day/disability_once.hpl | 188 ++++ .../jobs_once_a_day/disease_once.hpl | 109 ++ .../jobs_once_a_day/drivers_licence_once.hpl | 196 ++++ .../job_info_recruits_once.hwf | 1002 ++++++++++++++++- .../medical_authorities_once.hpl | 189 ++++ .../jobs_once_a_day/opekun_once.hpl | 157 +++ .../jobs_once_a_day/passport_once.hpl | 189 ++++ .../jobs_once_a_day/property_once.hpl | 360 ++++++ .../jobs_once_a_day/prosecution_once.hpl | 112 ++ .../jobs_once_a_day/punishment_once.hpl | 117 ++ .../jobs_once_a_day/spouse_once.hpl | 296 +++++ .../jobs_once_a_day/subpoena_once.hpl | 156 +++ .../temporary_measure_once.hpl | 139 +++ v1_apache-hop dash mapping/log.txt | 12 - .../mil_com/job_recruitments_milcom.hwf | 693 +++++++++--- ...in_dashboard.recruitment_campaign(m_c).hpl | 33 - .../main_dashboard.total_registered(m_c).hpl | 34 - ...in_dashboard.waiting_registration(m_c).hpl | 34 - .../mil_com/parameters/add_schema.hpl | 5 +- .../mil_com/parameters/array_recruitments.hpl | 15 +- .../recruitment_campaign.appeals(m_c).hpl | 33 - .../recruitment_campaign.subpoenas(m_c).hpl | 141 +-- .../mil_com/total_registered.age(m_c).hpl | 34 - .../total_registered.busyness(m_c).hpl | 34 - .../total_registered.child_minor(m_c).hpl | 34 - .../total_registered.driver_license(m_c).hpl | 37 - .../total_registered.education_level(m_c).hpl | 42 +- .../total_registered.marital_status(m_c).hpl | 34 - .../total_registered.reg_mil_cat(m_c).hpl | 34 - ...total_registered.removed_registry(m_c).hpl | 37 - .../total_registered.subpoenas(m_c).hpl | 51 +- .../region/job_recruitments_region.hwf | 6 +- .../select_recruitments_region(reg).hpl | 6 + 40 files changed, 4721 insertions(+), 866 deletions(-) create mode 100644 v1_apache-hop dash mapping/connections/db_uat.json create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/child_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/citizen_foreign_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/citizenship_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/deputy_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/disability_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/disease_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/drivers_licence_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/medical_authorities_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/opekun_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/passport_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/property_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/prosecution_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/punishment_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/spouse_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/subpoena_once.hpl create mode 100644 v1_apache-hop dash mapping/jobs_once_a_day/temporary_measure_once.hpl diff --git a/v1_apache-hop dash mapping/connections/db_uat.json b/v1_apache-hop dash mapping/connections/db_uat.json new file mode 100644 index 0000000..83656a5 --- /dev/null +++ b/v1_apache-hop dash mapping/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/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf b/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf index 5784617..65313d5 100644 --- a/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf +++ b/v1_apache-hop dash mapping/info_recruits/job_info_recruits.hwf @@ -32,8 +32,8 @@ 0 1 N - 368 - 624 + 592 + 1536 @@ -42,8 +42,8 @@ SUCCESS N - 1056 - 624 + 1296 + 1536 @@ -65,18 +65,17 @@ UP_D UPDATE_DATE - Y Y local N - Y + N Y N - 784 - 544 + 992 + 1536 @@ -90,8 +89,8 @@ N N N - 672 - 656 + 880 + 2752 @@ -105,8 +104,8 @@ N N N - 672 - 720 + 880 + 2816 @@ -131,8 +130,8 @@ N Y N - 720 - 208 + 928 + 2256 @@ -157,8 +156,8 @@ N Y N - 768 - 656 + 976 + 2752 @@ -183,8 +182,8 @@ N Y N - 768 - 720 + 976 + 2816 @@ -198,8 +197,8 @@ N N N - 640 - 1024 + 848 + 3120 @@ -224,8 +223,8 @@ N Y N - 784 - 1024 + 992 + 3120 @@ -239,8 +238,8 @@ N N N - 640 - 1088 + 848 + 3184 @@ -265,8 +264,8 @@ N Y N - 784 - 1088 + 992 + 3184 @@ -280,8 +279,8 @@ N N N - 640 - 1152 + 848 + 3248 @@ -306,8 +305,8 @@ N Y N - 784 - 1152 + 992 + 3248 @@ -321,8 +320,8 @@ N N N - 640 - 1216 + 848 + 3312 @@ -347,8 +346,8 @@ N Y N - 784 - 1216 + 992 + 3312 @@ -362,8 +361,8 @@ N N N - 640 - 1280 + 848 + 3376 @@ -388,8 +387,8 @@ N Y N - 784 - 1280 + 992 + 3376 @@ -403,8 +402,8 @@ N N N - 640 - 1344 + 848 + 3440 @@ -429,8 +428,8 @@ N Y N - 784 - 1344 + 992 + 3440 @@ -444,8 +443,8 @@ N N N - 640 - 1408 + 848 + 3504 @@ -470,8 +469,8 @@ N Y N - 784 - 1408 + 992 + 3504 @@ -485,8 +484,8 @@ N N N - 640 - 1472 + 848 + 3568 @@ -511,8 +510,8 @@ N Y N - 784 - 1472 + 992 + 3568 @@ -526,8 +525,8 @@ N N N - 640 - 1536 + 848 + 3632 @@ -552,8 +551,8 @@ N Y N - 784 - 1536 + 992 + 3632 @@ -567,8 +566,8 @@ N N N - 640 - 1600 + 848 + 3696 @@ -593,8 +592,8 @@ N Y N - 784 - 1600 + 992 + 3696 @@ -608,8 +607,8 @@ N N N - 640 - 1664 + 848 + 3760 @@ -634,8 +633,8 @@ N Y N - 784 - 1664 + 992 + 3760 @@ -649,8 +648,8 @@ N N N - 640 - 1728 + 848 + 3824 @@ -675,8 +674,8 @@ N Y N - 784 - 1728 + 992 + 3824 @@ -690,8 +689,8 @@ N N N - 640 - 1792 + 848 + 3888 @@ -716,8 +715,8 @@ N Y N - 784 - 1792 + 992 + 3888 @@ -742,8 +741,8 @@ N Y N - 656 - 544 + 864 + 1536 @@ -772,42 +771,42 @@ child Success - Y + N Y N spouse Success - Y + N Y N opekun Success - Y + N Y N Start SQL.spouse - Y + N Y Y Start SQL.child - Y + N Y Y Start SQL.disease - Y + N Y Y @@ -821,7 +820,7 @@ Start SQL.medical_authorities - Y + N Y Y @@ -835,21 +834,21 @@ disease Success - Y + N Y N medical_authorities Success - Y + N Y N Start SQL.disability - Y + N Y Y @@ -863,14 +862,14 @@ disability Success - Y + N Y N Start SQL.drivers_licence - Y + N Y Y @@ -884,14 +883,14 @@ drivers_licence Success - Y + N Y N Start SQL.property - Y + N Y Y @@ -905,14 +904,14 @@ property Success - Y + N Y N Start SQL.citizen_foreign - Y + N Y Y @@ -926,7 +925,7 @@ citizen_foreign Success - Y + N Y N @@ -940,14 +939,14 @@ citizenship Success - Y + N Y N Start SQL.citizenship - Y + N Y Y @@ -961,14 +960,14 @@ deputy Success - Y + N Y N Start SQL.deputy - Y + N Y Y @@ -982,14 +981,14 @@ Start SQL.prosecution - Y + N Y Y prosecution Success - Y + N Y N @@ -1003,21 +1002,21 @@ Start SQL.punishment - Y + N Y Y punishment Success - Y + N Y N Start SQL.passport - Y + N Y Y @@ -1031,7 +1030,7 @@ passport Success - Y + N Y N @@ -1045,14 +1044,14 @@ subpoena Success - Y + N Y N Start SQL.subpoena - Y + N Y Y @@ -1066,21 +1065,21 @@ Start SQL.tempmeas - Y + N Y Y temporary_measure Success - Y + N Y N Start opekun - Y + N Y Y @@ -1100,6 +1099,26 @@ + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 1584 + 1552 + доработать дельту, сделать дельту для остальных таблиц + 325 + diff --git a/v1_apache-hop dash mapping/job_recruitments_all.hwf b/v1_apache-hop dash mapping/job_recruitments_all.hwf index b60ab66..7c76bee 100644 --- a/v1_apache-hop dash mapping/job_recruitments_all.hwf +++ b/v1_apache-hop dash mapping/job_recruitments_all.hwf @@ -321,6 +321,13 @@ Y N + + job_recruitments_milcom.hwf + Success + N + Y + N + diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/child_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/child_once.hpl new file mode 100644 index 0000000..4cb4e2c --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/child_once.hpl @@ -0,0 +1,177 @@ + + + + child_once + 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 + + + = + 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 + + + 624 + 256 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + with child as +(select jsonb_array_elements(ri.info->'svedDeti'->'rebenok') ch, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array') +select + r.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'->'dataRozhdDok'->>'nomerZapis' birth_az_number +from public.recruits r +join child on r.id = child.recruit_id + N + + + 400 + 256 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + citizen_child
+ N + Y + N + Y + + + 608 + 400 + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/citizen_foreign_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/citizen_foreign_once.hpl new file mode 100644 index 0000000..14b245f --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/citizen_foreign_once.hpl @@ -0,0 +1,189 @@ + + + citizen_foreign_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + Table input 2 + Table output 2 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with citizen as +(select jsonb_array_elements(ri.info->'svedIGPP'->'svedIG') cit, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedIGPP'->'svedIG') = 'array') +select + r.id recruit_id, + cit->'oksm'->>'naimOKSM' country_name, + cit->>'osnovPriobrIG' citizenship_basis, + to_date(cit->>'dataPriobrIG', 'YYYY-MM-DD') citizenship_date +from public.recruits r +join citizen on r.id = citizen.recruit_id; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with citizen as +(select jsonb_array_elements(ri.info->'svedIGPP'->'svedPP') cit, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedIGPP'->'svedPP') = 'array') +select + r.id recruit_id, + cit->'oksm'->>'naimOKSM' country_name, + cit->>'osnovPriobrPP' residense_right_basis, + to_date(cit->>'dataPriobrPP', 'YYYY-MM-DD') residense_right_date +from public.recruits r +join citizen on r.id = citizen.recruit_id; + 0 + + N + N + N + + + + 208 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + citizenship_foreign
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 672 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + citizenship_foreign
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 672 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/citizenship_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/citizenship_once.hpl new file mode 100644 index 0000000..cd03daf --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/citizenship_once.hpl @@ -0,0 +1,110 @@ + + + citizenship_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select r.id recruit_id, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number, +to_date(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number, +to_date(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, +ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority +from public.recruits_info ri +join public.recruits r ON ri.recruit_id = r.id +where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and +(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null) + 0 + + N + N + N + + + + 432 + 224 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + citizenship
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 672 + 224 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/deputy_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/deputy_once.hpl new file mode 100644 index 0000000..a937c11 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/deputy_once.hpl @@ -0,0 +1,215 @@ + + + + deputy_once + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + + + + + + Table input 2 + Table output 2 + Y + + + Table input + Insert / update + N + + + Table input + Table output + Y + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + deputy
+ + recruit_id + recruit_id + N + + + end_date + end_date + Y + + + information + information + Y + + + period_office + period_office + Y + +
+ N + + + 720 + 160 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + select r.id recruit_id, +ri.info->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office, +to_date(ri.info->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date, +ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information +from public.recruits_info ri +join public.recruits r ON ri.recruit_id = r.id +where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null; + N + + + 432 + 224 + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + select r.id recruit_id, +to_date(ri.info->'svedKandidat'->'kandidat'->>'dataSnyatiyaKandidatury', 'YYYY-MM-DD') end_date, +ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' information, +false deputy +from public.recruits_info ri +join public.recruits r ON ri.recruit_id = r.id +where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null; + N + + + 432 + 320 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + deputy
+ N + Y + N + Y + + + 800 + 224 + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + deputy
+ N + Y + N + Y + + + 800 + 320 + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/disability_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/disability_once.hpl new file mode 100644 index 0000000..4e65e8e --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/disability_once.hpl @@ -0,0 +1,188 @@ + + + disability_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + Table input 2 + Table output 2 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select + r.id recruit_id, + case when ri.info->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа' + when ri.info->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа' + when ri.info->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа' + when ri.info->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид' + end disability_group, + ri.info->'svedInvalid'->'invalid'->>'ustanOrg' organization_name, + to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date, + to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date, + to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date, + true disability +from public.recruits r +join public.recruits_info ri on r.id = ri.recruit_id +where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select + r.id recruit_id, + ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name, + to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date, + to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date +from public.recruits r +join public.recruits_info ri on r.id = ri.recruit_id +where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null; + 0 + + N + N + N + + + + 208 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + disability
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + disability
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/disease_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/disease_once.hpl new file mode 100644 index 0000000..9a07e89 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/disease_once.hpl @@ -0,0 +1,109 @@ + + + disease_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with zdorov as +(select jsonb_array_elements(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array') +select + r.id recruit_id, + z->>'kodZabol' code, + z->>'naimZabol' name, + to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date +from public.recruits r +join zdorov on r.id = zdorov.recruit_id; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + disease
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/drivers_licence_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/drivers_licence_once.hpl new file mode 100644 index 0000000..9eccf40 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/drivers_licence_once.hpl @@ -0,0 +1,196 @@ + + + drivers_licence_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + Table input 2 + Table output 2 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select + r.id recruit_id, + ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' licence_series, + ri.info->'svedVoditUdost'->'voditUdost'->>'nomVodUd' licence_number, + to_date(ri.info->'svedVoditUdost'->'voditUdost'->>'dataVodUd', 'YYYY-MM-DD') start_date, + to_date(ri.info->'svedVoditUdost'->'voditUdost'->>'srokVodUd', 'YYYY-MM-DD') close_date, + array_to_string(array( + select kat->>'kategoriya' + from jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') as kat + where jsonb_typeof(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories +from public.recruits r +join public.recruits_info ri on r.id = ri.recruit_id +where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select + r.id recruit_id, + ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' licence_series, + ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'nomUTM' licence_number, + to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataVydUTM', 'YYYY-MM-DD') start_date, + to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') close_date, + to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataIztUTM', 'YYYY-MM-DD') seizure_date, + to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataZamUTM', 'YYYY-MM-DD') replacement_date, + to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataVozUTM', 'YYYY-MM-DD') return_date, + array_to_string(array( + select kat->>'kategoriya' + from jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') as kat + where jsonb_typeof(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories, + true tractor_driver +from public.recruits r +join public.recruits_info ri on r.id = ri.recruit_id +where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null; + + 0 + + N + N + N + + + + 208 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + drivers_licence
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + drivers_licence
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/job_info_recruits_once.hwf b/v1_apache-hop dash mapping/jobs_once_a_day/job_info_recruits_once.hwf index 30dd34b..db128b0 100644 --- a/v1_apache-hop dash mapping/jobs_once_a_day/job_info_recruits_once.hwf +++ b/v1_apache-hop dash mapping/jobs_once_a_day/job_info_recruits_once.hwf @@ -26,8 +26,8 @@ 0 1 N - 448 - 192 + 256 + 624 @@ -51,7 +51,7 @@ N local N - Y + N Y N 816 @@ -79,8 +79,664 @@ SUCCESS N - 992 - 192 + 1232 + 624 + + + + SQL.spouse + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.citizen_spouse + N + N + N + 640 + 272 + + + + SQL.child + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.citizen_child + N + N + N + 640 + 352 + + + + spouse_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/spouse_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 272 + + + + child_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/child_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 352 + + + + SQL.disease + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.disease + N + N + N + 640 + 432 + + + + disease_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/disease_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 432 + + + + SQL.medical_authorities + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.medical_authorities + N + N + N + 640 + 496 + + + + medical_authorities_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/medical_authorities_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 496 + + + + SQL.disability + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.disability + N + N + N + 640 + 560 + + + + disability_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/disability_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 560 + + + + SQL.drivers_licence + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.drivers_licence + N + N + N + 640 + 624 + + + + drivers_licence_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/drivers_licence_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 624 + + + + SQL.property + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.property + N + N + N + 640 + 688 + + + + property_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/property_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 688 + + + + SQL.citizen_foreign + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.citizenship_foreign + N + N + N + 640 + 752 + + + + citizen_foreign_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/citizen_foreign_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 752 + + + + SQL.citizenship + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.citizenship + N + N + N + 640 + 816 + + + + citizenship_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/citizenship_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 816 + + + + SQL.deputy + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.deputy + N + N + N + 640 + 880 + + + + deputy_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/deputy_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 880 + + + + SQL.prosecution + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.prosecution + N + N + N + 640 + 944 + + + + prosecution_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/prosecution_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 944 + + + + SQL.punishment + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.punishment + N + N + N + 640 + 1008 + + + + punishment_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/punishment_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 1008 + + + + SQL.passport + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.passport + N + N + N + 640 + 1072 + + + + passport_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/passport_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 1072 + + + + SQL.subpoena + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.subpoena + N + N + N + 640 + 1136 + + + + subpoena_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/subpoena_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 1136 + + + + SQL.tempmeas + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.temporary_measures + N + N + N + 640 + 1200 + + + + temporary_measure_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/temporary_measure_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 1200 + + + + opekun_once.hpl + + PIPELINE + + N + N + N + Y + N + N + ${PROJECT_HOME}/jobs_once_a_day/opekun_once.hpl + Basic + + Y + + N + local + N + N + Y + N + 816 + 96 + + + + SQL.opekun + + SQL + + ervu-dashboard + N + delete from ervu_dashboard.citizen_guardianship + N + N + N + 640 + 96 @@ -106,6 +762,342 @@ Y N + + SQL.spouse + spouse_once.hpl + Y + Y + N + + + SQL.child + child_once.hpl + Y + Y + N + + + SQL.disease + disease_once.hpl + Y + Y + N + + + SQL.medical_authorities + medical_authorities_once.hpl + Y + Y + N + + + SQL.disability + disability_once.hpl + Y + Y + N + + + SQL.drivers_licence + drivers_licence_once.hpl + Y + Y + N + + + SQL.property + property_once.hpl + Y + Y + N + + + SQL.citizen_foreign + citizen_foreign_once.hpl + Y + Y + N + + + SQL.citizenship + citizenship_once.hpl + Y + Y + N + + + SQL.deputy + deputy_once.hpl + Y + Y + N + + + SQL.prosecution + prosecution_once.hpl + Y + Y + N + + + SQL.punishment + punishment_once.hpl + Y + Y + N + + + SQL.passport + passport_once.hpl + Y + Y + N + + + SQL.subpoena + subpoena_once.hpl + Y + Y + N + + + SQL.tempmeas + temporary_measure_once.hpl + Y + Y + N + + + Start + SQL.opekun + Y + Y + Y + + + SQL.opekun + opekun_once.hpl + Y + Y + N + + + opekun_once.hpl + Success + Y + Y + N + + + Start + SQL.spouse + Y + Y + Y + + + Start + SQL.child + Y + Y + Y + + + child_once.hpl + Success + Y + Y + N + + + spouse_once.hpl + Success + Y + Y + N + + + Start + SQL.disease + Y + Y + Y + + + disease_once.hpl + Success + Y + Y + N + + + Start + SQL.medical_authorities + Y + Y + Y + + + medical_authorities_once.hpl + Success + Y + Y + N + + + Start + SQL.property + Y + Y + Y + + + property_once.hpl + Success + Y + Y + N + + + Start + SQL.disability + Y + Y + Y + + + disability_once.hpl + Success + Y + Y + N + + + Start + SQL.drivers_licence + Y + Y + Y + + + drivers_licence_once.hpl + Success + Y + Y + N + + + Start + SQL.citizen_foreign + Y + Y + Y + + + citizen_foreign_once.hpl + Success + Y + Y + N + + + Start + SQL.citizenship + Y + Y + Y + + + citizenship_once.hpl + Success + Y + Y + N + + + Start + SQL.deputy + Y + Y + Y + + + deputy_once.hpl + Success + Y + Y + N + + + Start + SQL.prosecution + Y + Y + Y + + + prosecution_once.hpl + Success + Y + Y + N + + + Start + SQL.punishment + Y + Y + Y + + + punishment_once.hpl + Success + Y + Y + N + + + Start + SQL.passport + Y + Y + Y + + + passport_once.hpl + Success + Y + Y + N + + + Start + SQL.subpoena + Y + Y + Y + + + subpoena_once.hpl + Success + Y + Y + N + + + Start + SQL.tempmeas + Y + Y + Y + + + temporary_measure_once.hpl + Success + Y + Y + N + diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/medical_authorities_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/medical_authorities_once.hpl new file mode 100644 index 0000000..f657e43 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/medical_authorities_once.hpl @@ -0,0 +1,189 @@ + + + medical_authorities_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input hiv + Table output + Y + + + Table input 2 + Table output 2 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with uchet as +(select jsonb_array_elements(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array') +select + r.id recruit_id, + u->>'dataPostUchet' start_date, + u->>'dataSnyatUchet' close_date, + u->>'dataPlan' change_date +from public.recruits r +join uchet on r.id = uchet.recruit_id; + 0 + + N + N + N + + + + 208 + 352 + Y + + + + Table input hiv + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with uchet as +(select jsonb_array_elements(ri.info->'svedUchetVICH'->'uchetVICH') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedUchetVICH'->'uchetVICH') = 'array') +select + r.id recruit_id, + to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date, + to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date, + true HIV +from public.recruits r +join uchet on r.id = uchet.recruit_id; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + medical_authorities
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + medical_authorities
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 352 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/opekun_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/opekun_once.hpl new file mode 100644 index 0000000..02512a2 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/opekun_once.hpl @@ -0,0 +1,157 @@ + + + + opekun_once + 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 + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen_guardianship
+ + recruit_id + recruit_id + N + + + full_name + full_name + Y + + + birth_date + birth_date + Y + + + snils + snils + Y + +
+ N + + + 560 + 240 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + with person as +(select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array') +select + r.id 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 public.recruits r +join person on r.id = person.recruit_id + N + + + 288 + 240 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + citizen_guardianship
+ N + Y + N + Y + + + 480 + 112 + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/passport_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/passport_once.hpl new file mode 100644 index 0000000..133aa3d --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/passport_once.hpl @@ -0,0 +1,189 @@ + + + passport_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + Table input 2 + Table output 2 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select r.id recruit_id, +ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number, +ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series, +ri.info->'pasportRF'->'aktPasportRF'->>'vydDok' organization_name, +ri.info->'pasportRF'->'aktPasportRF'->>'kodVydDok' unit_code, +to_date(ri.info->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') issue_date, +case when ri.info->'pasportRF'->'aktPasportRF'->>'kodStatus'='1' then true +else false +end actual +from public.recruits_info ri +join public.recruits r ON ri.recruit_id = r.id +where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + select r.id recruit_id, +ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number, +ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series, +ri.info->'pasportRF'->'predPasportRF'->>'vydDok' organization_name, +ri.info->'pasportRF'->'predPasportRF'->>'kodVydDok' unit_code, +to_date(ri.info->'pasportRF'->'predPasportRF'->>'dataDok', 'YYYY-MM-DD') issue_date, +case when ri.info->'pasportRF'->'predPasportRF'->>'kodStatus'='1' then true +else false +end actual +from public.recruits_info ri +join public.recruits r ON ri.recruit_id = r.id +where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null; + 0 + + N + N + N + + + + 208 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + passport
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 672 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + passport
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 672 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/property_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/property_once.hpl new file mode 100644 index 0000000..0cd3ab0 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/property_once.hpl @@ -0,0 +1,360 @@ + + + property_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + Table input 2 + Table output 2 + Y + + + Table input 2 2 + Table output 2 2 + Y + + + Table input 2 2 2 + Table output 2 2 2 + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with prop as +(select jsonb_array_elements(ri.info->'svedON'->'on') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedON'->'on') = 'array') +select + r.id recruit_id, + u->>'naimVidPrav' kind_right, + u->'adrObSob'->>'adrObSobTekst' address, + to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date, + to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date, + 'realty' type_property +from public.recruits r +join prop on r.id = prop.recruit_id; + 0 + + N + N + N + + + + 480 + 208 + Y + + + + Table input 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with prop as +(select jsonb_array_elements(ri.info->'svedNazTS'->'nazTS') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedNazTS'->'nazTS') = 'array') +select + r.id recruit_id, + u->>'vidTS' vehicle_type, + u->>'godVyp' issue_year, + u->>'markaTS' brand_model, + u->>'gosRegZn' reg_plate, + u->>'idenNom' vin, + to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date, + to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date, + 'ground_transportation' type_property +from public.recruits r +join prop on r.id = prop.recruit_id; + 0 + + N + N + N + + + + 480 + 304 + Y + + + + Table input 2 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with prop as +(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array') +select + r.id recruit_id, + u->>'naimVid' vehicle_type, + u->>'naznKat' vehicle_category, + to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date, + to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date, + 'air_vehicles' type_property +from public.recruits r +join prop on r.id = prop.recruit_id; + 0 + + N + N + N + + + + 480 + 384 + Y + + + + Table input 2 2 2 + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with prop as +(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array') +select + r.id recruit_id, + u->>'naimVid' vehicle_type, + u->>'naznKat' vehicle_category, + to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date, + to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date, + 'air_vehicles' type_property +from public.recruits r +join prop on r.id = prop.recruit_id; + 0 + + N + N + N + + + + 480 + 464 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + property
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 688 + 208 + Y + +
+ + Table output 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + property
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 688 + 304 + Y + +
+ + Table output 2 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + property
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 688 + 384 + Y + +
+ + Table output 2 2 2 + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + property
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 688 + 464 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/prosecution_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/prosecution_once.hpl new file mode 100644 index 0000000..68b0b89 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/prosecution_once.hpl @@ -0,0 +1,112 @@ + + + prosecution_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with ugol as +(select jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array') +select + r.id recruit_id, + u->>'vidPreslNaim' kind, + to_date(u->>'dataSved', 'YYYY-MM-DD') create_date, + to_date(u->>'dataPrekrashh', 'YYYY-MM-DD') close_date, + u->>'naimOrgan' authority_name, + u->>'ugolovZakon' law_point, + u->>'osnovPrekrashh' termination_basis +from public.recruits r +join ugol on r.id = ugol.recruit_id; + 0 + + N + N + N + + + + 528 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + prosecution
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 736 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/punishment_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/punishment_once.hpl new file mode 100644 index 0000000..9e7f9ca --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/punishment_once.hpl @@ -0,0 +1,117 @@ + + + punishment_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + with ugol as +(select jsonb_array_elements(ri.info->'svedSudim'->'sudim'->'osuzhdenie') u, + ri.recruit_id +from public.recruits_info ri +where jsonb_typeof(ri.info->'svedSudim'->'sudim'->'osuzhdenie') = 'array') +select + r.id recruit_id, + u->>'naimSuda' authority_name, + u->>'srokNakaz' sentence, + u->>'adresNakaz' sentence_place, + u->>'kodVidNakaz' punishment_code, + u->>'izmSrokNakaz' sentence_changed, + u->>'naimVidNakaz' punishment_type, + to_date(u->>'dataNachSrok', 'YYYY-MM-DD') start_date, + to_date(u->>'dataOsvobozhd', 'YYYY-MM-DD') release_date, + to_date(u->>'dataOsuzhd', 'YYYY-MM-DD') sentense_date, + u->>'ugolovZakon' law_point, + u->>'osnovOsvobozhd' release_reason +from public.recruits r +join ugol on r.id = ugol.recruit_id; + 0 + + N + N + N + + + + 528 + 304 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + punishment
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 736 + 304 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/spouse_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/spouse_once.hpl new file mode 100644 index 0000000..c36a99a --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/spouse_once.hpl @@ -0,0 +1,296 @@ + + + + spouse_once + Y + + + + Normal + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + + + + + + Select values + Table output + Y + + + Table input + Select values + Y + + + Select values + Insert / update + N + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + full_name + full_name + + ervu_dashboard + citizen_spouse
+ + recruit_id + recruit_id + N + + + birth_date + birth_date + Y + + + death_az_number + divorce_az_number + Y + + + death_date + death_date + Y + + + divorce_az_number + divorce_az_number + Y + + + divorce_date + divorce_date + Y + + + full_name + full_name + Y + + + information_excluded + information_excluded + Y + + + kinship_type + kinship_type + Y + + + marriage_az_number + marriage_az_number + Y + + + marriage_date + marriage_date + Y + +
+ N + + + 704 + 208 + +
+ + Select values + SelectValues + + Y + + 1 + + none + + + + N + + marriage_date + marriage_date + Date + -2 + -2 + yyyy-MM-dd + false + + + false + + + + + + + + divorce_date + divorce_date + Date + -2 + -2 + yyyy-MM-dd + false + + + false + + + + + + + + + + 448 + 208 + + + + Table input + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 + WITH suprug AS ( + SELECT + supr.supri AS supr, + ri.info->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number, + ri.info->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date, + ri.info->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number, + ri.info->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date, + CASE + WHEN (ri.info->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true + ELSE false + END AS information_excluded, + ri.recruit_id + FROM public.recruits_info ri + LEFT JOIN LATERAL ( + SELECT jsonb_array_elements(ri.info->'svedSemPolozh'->'suprugi') AS supri + WHERE jsonb_typeof(ri.info->'svedSemPolozh'->'suprugi') = 'array' + ) AS supr ON true +) +SELECT + r.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, + MAKE_DATE( + NULLIF(supr->'svedSmert'->>'god', '')::int, + NULLIF(supr->'svedSmert'->>'mesyacz','')::int, + NULLIF(supr->'svedSmert'->>'den','')::int + ) AS death_date, + supr->'svedSmert'->>'nomerZapis' AS death_az_number, + marriage_az_number, + marriage_date, + divorce_az_number, + divorce_date, + information_excluded +FROM public.recruits r +JOIN suprug ON r.id = suprug.recruit_id; + N + + + 192 + 208 + + + + Table output + TableOutput + + Y + + 1 + + none + + + 1000 + ervu-dashboard + + + N + N + N + N + Y + N + ervu_dashboard + N + citizen_spouse
+ N + Y + N + Y + + + 688 + 64 + +
+ + + Select values + + N + + + + + + + + + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/subpoena_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/subpoena_once.hpl new file mode 100644 index 0000000..10347ec --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/subpoena_once.hpl @@ -0,0 +1,156 @@ + + + subpoena_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + SELECT + s.id AS subpoena_id, -- идентификатор повестки + s.recruit_id, -- идентификатор рекрута + s.department_id, -- идентификатор ВК + s.series, -- серия повестки + s.create_date, -- дата создания повестки + s.number, -- номер повестки + s.send_date, -- дата направления повестки + s.sig_info, -- открепленная ЭП + sr.name AS subpoena_reason, -- причина вызова по повестке + s.full_name_responsible_user AS fio_commiss, -- фио комиссара + s.recruitment_name, -- наименование военного комиссариата, направившего повестку + rt.address, -- адрес, по которому нужно явиться по повестке + s.visit_date, -- дата и время явки в ВК + ssi.track_number, -- уникальный номер заказного почтового отправления, которым направлена повестка + ss.name AS subpoena_status, -- статус повестки + ssi.act_number, -- номер акта об отказе во вручении повестки + ssi.delivery_fio, -- фио лица, оповестившего гражданина о последствиях отказа от получения повестки + CASE + WHEN ssi.is_delivered = true THEN ssi.delivery_date + ELSE NULL + END AS delivery_date, -- дата вручения + CASE + WHEN ssi.is_delivered = true THEN 'Вручена' + WHEN ssi.is_delivered = false THEN 'Не вручена' + ELSE 'Нет информации' + END AS delivery_status, -- признак вручения повестки + CASE + WHEN sd.type = 'DIRECTION' THEN sd.name + ELSE NULL + END AS method_sending, -- способ направления повестки + CASE + WHEN sd.type = 'DELIVERY' THEN sd.name + ELSE NULL + END AS method_delivery, -- способ вручения повестки + CASE + WHEN sa.fact_appearance = true THEN 'Явился' + WHEN sa.fact_appearance = false THEN 'Не явился' + ELSE 'Нет информации' + END AS appearance_status, -- признак явки или неявки + CASE + WHEN ss.code = '5.1' THEN 'Неявка по уважительной причине' + WHEN ss.code = '5' THEN 'Гражданин не явился' + ELSE NULL + END AS appearance -- уважительная или нет причина +-- нет версии повестки +FROM public.subpoena AS s +LEFT JOIN public.subpoena_reason AS sr + ON sr.id = s.reason_id +LEFT JOIN public.recruitment AS rt + ON rt.id = s.department_id +LEFT JOIN public.subpoena_send_info AS ssi + ON ssi.subpoena_id = s.id +LEFT JOIN public.send_dictionary AS sd + ON sd.code = ssi.send_code +LEFT JOIN public.subpoena_status AS ss + ON ss.id = s.status_id +LEFT JOIN public.subpoena_appearance AS sa + ON sa.subpoena_id = s.id; + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + subpoena
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/jobs_once_a_day/temporary_measure_once.hpl b/v1_apache-hop dash mapping/jobs_once_a_day/temporary_measure_once.hpl new file mode 100644 index 0000000..5ed6028 --- /dev/null +++ b/v1_apache-hop dash mapping/jobs_once_a_day/temporary_measure_once.hpl @@ -0,0 +1,139 @@ + + + temporary_measure_once + Y + + + + Normal + / + + + N + 1000 + 100 + - + 2024/08/15 14:02:51.713 + - + 2024/08/15 14:02:51.713 + H4sIAAAAAAAAAAMAAAAAAAAAAAA= + N + + + + + + Table input + Table output + Y + + + + Table input + TableInput + + Y + + 1 + + none + + + postgres.subpoena + SELECT + rd.subpoena_id, + rd.vk_id AS recruitment_id, + s.recruit_id, + rds.name AS status_measure, -- статус временной меры + rd.recruitment_name, -- наименоване ВК + rdi.cancel_date, -- дата, с которой отменена временная мера + rn.name AS restriction_name, -- наименование ограничения (тип временной меры) + CASE + WHEN rd.type='CREATE' THEN 'Применение временной меры' + WHEN rd.type='CANCEL' THEN 'Отмена временной меры' + END AS type, -- тип документа ограничения + CASE + WHEN rd.type='CREATE' THEN rd.decision_number + ELSE NULL + END AS decision_number_create, -- номер решения о применении временной меры + CASE + WHEN rd.type='CANCEL' THEN rd.decision_number + ELSE NULL + END AS decision_number_cancel, -- номер решения об отмене временной меры + CASE + WHEN rd.type='CREATE' THEN rd.decision_date + ELSE NULL + END AS decision_date_create, -- дата решения о применении временной меры + CASE + WHEN rd.type='CANCEL' THEN rd.decision_date + ELSE NULL + END AS decision_date_cancel, -- дата решения об отмене временной меры + CASE + WHEN rdi.applied_fact = 'true' THEN 'Временная мера применена' + WHEN rdi.applied_fact = 'false' THEN 'Временная мера не применена' + ELSE 'Нет информации' + END AS applied_fact -- факт применения временной меры +FROM public.restriction_document AS rd +LEFT JOIN public.restriction_document_item AS rdi + ON rdi.restriction_document_create_id = rd.id +LEFT JOIN public.restriction AS rn + ON rn.id = rdi.restriction_id +LEFT JOIN public.restriction_document_status AS rds + ON rds.code = rd.status +LEFT JOIN public.subpoena AS s + ON s.id = rd.subpoena_id + 0 + + N + N + N + + + + 208 + 208 + Y + + + + Table output + TableOutput + + Y + + 1 + + none + + + ervu-dashboard + ervu_dashboard + temporary_measures
+ 1000 + N + N + Y + N + N + + N + Y + N + + Y + N + + + + + + + 416 + 208 + Y + +
+ + + +
diff --git a/v1_apache-hop dash mapping/log.txt b/v1_apache-hop dash mapping/log.txt index ba09e8e..e69de29 100644 --- a/v1_apache-hop dash mapping/log.txt +++ b/v1_apache-hop dash mapping/log.txt @@ -1,12 +0,0 @@ -2025/01/31 09:59:45 - appeals.reasons_appeal(reg).hpl - Using run configuration [local] -2025/01/31 09:59:45 - appeals.reasons_appeal(reg) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local' -2025/01/31 09:59:45 - appeals.reasons_appeal(reg) - Execution started for pipeline [appeals.reasons_appeal(reg)] -2025/01/31 09:59:45 - Execute SQL script.0 - Finished reading query, closing connection. -2025/01/31 09:59:45 - Execute SQL script 2.0 - Finished reading query, closing connection. -2025/01/31 09:59:45 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0) -2025/01/31 09:59:45 - Execute SQL script 2.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0) -2025/01/31 09:59:45 - Table input (appeal_document) регионы.0 - Finished reading query, closing connection. -2025/01/31 09:59:45 - Table input (appeal_document) регионы.0 - Finished processing (I=58, O=0, R=0, W=58, U=0, E=0) -2025/01/31 09:59:45 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=58, O=58, R=58, W=58, U=0, E=0) -2025/01/31 09:59:45 - appeals.reasons_appeal(reg) - Pipeline duration : 0.482 seconds [ 0.482" ] -2025/01/31 09:59:45 - appeals.reasons_appeal(reg) - Execution finished on a local pipeline engine with run configuration 'local' diff --git a/v1_apache-hop dash mapping/mil_com/job_recruitments_milcom.hwf b/v1_apache-hop dash mapping/mil_com/job_recruitments_milcom.hwf index 15a48d7..e3da18f 100644 --- a/v1_apache-hop dash mapping/mil_com/job_recruitments_milcom.hwf +++ b/v1_apache-hop dash mapping/mil_com/job_recruitments_milcom.hwf @@ -42,8 +42,8 @@ 0 1 N - 256 - 464 + 416 + 1280 @@ -74,8 +74,8 @@ N Y N - 1280 - 16 + 1040 + 736 @@ -100,8 +100,8 @@ N Y N - 352 - 640 + 512 + 1456 @@ -110,8 +110,8 @@ SUCCESS N - 1488 - 16 + 1248 + 736 @@ -140,8 +140,8 @@ N Y N - 1088 - 80 + 1248 + 800 @@ -150,8 +150,8 @@ SUCCESS N - 1296 - 80 + 1456 + 800 @@ -182,8 +182,8 @@ Y Y N - 1088 - 144 + 1248 + 880 @@ -192,8 +192,8 @@ SUCCESS N - 1296 - 144 + 1456 + 880 @@ -222,8 +222,8 @@ N Y N - 1088 - 208 + 1248 + 960 @@ -232,8 +232,8 @@ SUCCESS N - 1296 - 208 + 1456 + 960 @@ -248,6 +248,8 @@ N Y ${PROJECT_HOME}/mil_com/recruitment_campaign.subpoenas(m_c).hpl + txt + C:\Users\acer\Desktop\logas Basic @@ -262,8 +264,8 @@ N Y N - 1088 - 272 + 1248 + 1040 @@ -272,8 +274,8 @@ SUCCESS N - 1296 - 272 + 1456 + 1040 @@ -302,8 +304,8 @@ N Y N - 1088 - 336 + 1248 + 1120 @@ -312,8 +314,8 @@ SUCCESS N - 1296 - 336 + 1456 + 1120 @@ -342,8 +344,8 @@ N Y N - 1088 - 400 + 1248 + 1200 @@ -352,8 +354,8 @@ SUCCESS N - 1296 - 400 + 1456 + 1200 @@ -382,8 +384,8 @@ N Y N - 1088 - 464 + 1248 + 1280 @@ -392,8 +394,8 @@ SUCCESS N - 1296 - 464 + 1456 + 1280 @@ -422,8 +424,8 @@ N Y N - 1088 - 528 + 1248 + 1360 @@ -432,8 +434,8 @@ SUCCESS N - 1296 - 528 + 1456 + 1360 @@ -464,8 +466,8 @@ N Y N - 1088 - 592 + 1248 + 1440 @@ -474,8 +476,8 @@ SUCCESS N - 1296 - 592 + 1456 + 1440 @@ -504,8 +506,8 @@ N Y N - 1088 - 656 + 1248 + 1520 @@ -514,8 +516,8 @@ SUCCESS N - 1296 - 656 + 1456 + 1520 @@ -544,8 +546,8 @@ N Y N - 1088 - 720 + 1248 + 1600 @@ -554,8 +556,8 @@ SUCCESS N - 1296 - 720 + 1456 + 1600 @@ -584,8 +586,8 @@ N Y N - 1088 - 784 + 1248 + 1680 @@ -594,8 +596,8 @@ SUCCESS N - 1296 - 784 + 1456 + 1680 @@ -624,8 +626,8 @@ N Y N - 1088 - 848 + 1248 + 1760 @@ -634,8 +636,8 @@ SUCCESS N - 1296 - 848 + 1456 + 1760 @@ -664,8 +666,8 @@ N Y N - 1088 - 912 + 1248 + 1840 @@ -674,8 +676,8 @@ SUCCESS N - 1296 - 912 + 1456 + 1840 @@ -700,8 +702,8 @@ N Y N - 480 - 464 + 640 + 1280 @@ -710,8 +712,254 @@ DUMMY N - 1088 - 16 + 848 + 736 + + + + 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') + + N + N + N + 928 + 1120 + + + + 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') + N + N + N + 928 + 800 + + + + 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') + + N + N + N + 928 + 880 + + + + 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') + + N + N + N + 928 + 960 + + + + 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') + N + N + N + 928 + 1040 + + + + 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') + N + N + N + 928 + 1200 + + + + 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') + + N + N + N + 928 + 1280 + + + + 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') + N + N + N + 928 + 1360 + + + + 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') + + N + N + N + 928 + 1440 + + + + 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') + + N + N + N + 928 + 1520 + + + + 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') + + N + N + N + 928 + 1600 + + + + 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') + N + N + N + 928 + 1680 + + + + 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') + + N + N + N + 928 + 1760 + + + + SQL recruitment_campaign.appeals + + SQL + + ervu-dashboard + N + DELETE FROM recruitment_campaign.appeals +WHERE recording_date = current_date + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + N + N + N + 928 + 1840 @@ -835,111 +1083,6 @@ Y Y - - array_recruitments.hpl - main_dashboard.total_registered(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - main_dashboard.waiting_registration(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.reg_mil_cat(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.removed_registry(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.subpoenas(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.driver_license(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.child_minor(m_c).hpl - N - Y - N - - - array_recruitments.hpl - total_registered.age(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.education_level(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.child_minor(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.busyness(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - total_registered.marital_status(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - main_dashboard.recruitment_campaign(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - recruitment_campaign.subpoenas(m_c).hpl - Y - Y - N - - - array_recruitments.hpl - recruitment_campaign.appeals(m_c).hpl - Y - Y - N - array_recruitments.hpl Dummy @@ -954,6 +1097,202 @@ Y Y + + array_recruitments.hpl + SQL total_registered.reg_mil_cat + Y + 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.recruitment_campaign + Y + Y + N + + + SQL main_dashboard.recruitment_campaign + main_dashboard.recruitment_campaign(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL main_dashboard.total_registered + Y + Y + N + + + SQL main_dashboard.total_registered + main_dashboard.total_registered(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL main_dashboard.waiting_registration + Y + Y + N + + + SQL main_dashboard.waiting_registration + main_dashboard.waiting_registration(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL recruitment_campaign.subpoenas + Y + Y + N + + + SQL recruitment_campaign.subpoenas + recruitment_campaign.subpoenas(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.removed_registry + Y + Y + N + + + SQL total_registered.removed_registry + total_registered.removed_registry(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.subpoenas + Y + Y + N + + + SQL total_registered.subpoenas + total_registered.subpoenas(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.driver_license + Y + 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 + Y + Y + N + + + SQL total_registered.child_minor + total_registered.child_minor(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.age + Y + Y + N + + + SQL total_registered.age + total_registered.age(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.marital_status + Y + 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 + Y + Y + N + + + SQL total_registered.education_level + total_registered.education_level(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL total_registered.busyness + Y + Y + N + + + SQL total_registered.busyness + total_registered.busyness(m_c).hpl + Y + Y + Y + + + array_recruitments.hpl + SQL recruitment_campaign.appeals + Y + Y + N + + + SQL recruitment_campaign.appeals + recruitment_campaign.appeals(m_c).hpl + Y + Y + Y + @@ -973,11 +1312,11 @@ 73 1584 672 - main_dashboard.recruitment_campaign - продумать разделение весна /осень, доработать под массивы и обьединить -recruitment_campaign.subpoena - продумать разделение весна /осень, доработать под массивы и обьединить -recruitment_campaign.appeals - продумать разделение весна /осень, доработать под массивы и обьединить + main_dashboard.recruitment_campaign - продумать разделение весна /осень +recruitment_campaign.subpoena - продумать разделение весна /осень +recruitment_campaign.appeals - продумать разделение весна /осень - 652 + 432 diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hpl b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hpl index 224d47d..e6ad3a7 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.recruitment_campaign(m_c).hpl @@ -36,45 +36,12 @@ Insert / update (main_dashboard.recruitment_campaign) N - - Execute SQL script - Table input (subpoena) регион/осень - Y - Table input (subpoena) регион/осень Insert / update (main_dashboard.recruitment_campaign) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - 96 - 320 - - Get variables 4 3 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.total_registered(m_c).hpl b/v1_apache-hop dash mapping/mil_com/main_dashboard.total_registered(m_c).hpl index 0c673ce..6004b73 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.total_registered(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.total_registered(m_c).hpl @@ -36,46 +36,12 @@ Get variables 2 2 N - - Execute SQL script - Table input (person_registry) регион - Y - Table input (person_registry) регион Insert / update (main_dashboard.total_registered) 2 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 288 - 320 - - Get variables 2 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/main_dashboard.waiting_registration(m_c).hpl b/v1_apache-hop dash mapping/mil_com/main_dashboard.waiting_registration(m_c).hpl index d37a410..6ffbbbf 100644 --- a/v1_apache-hop dash mapping/mil_com/main_dashboard.waiting_registration(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/main_dashboard.waiting_registration(m_c).hpl @@ -36,46 +36,12 @@ Get variables 5 N - - Execute SQL script - Table input 2 (person_registry) регион - Y - Table input 2 (person_registry) регион Insert / update (main_dashboard.waiting_registration) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 112 - 240 - - Get variables 5 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/parameters/add_schema.hpl b/v1_apache-hop dash mapping/mil_com/parameters/add_schema.hpl index f522b30..86ed1b4 100644 --- a/v1_apache-hop dash mapping/mil_com/parameters/add_schema.hpl +++ b/v1_apache-hop dash mapping/mil_com/parameters/add_schema.hpl @@ -83,7 +83,7 @@ Table input Dummy (do nothing) - N + Y Dummy (do nothing) @@ -441,19 +441,16 @@ = recruitment_id recruitment_id - = recording_date recording_date - = spring_autumn spring_autumn - recruitment_campaign subpoenas
diff --git a/v1_apache-hop dash mapping/mil_com/parameters/array_recruitments.hpl b/v1_apache-hop dash mapping/mil_com/parameters/array_recruitments.hpl index fdee2f7..b7b79fa 100644 --- a/v1_apache-hop dash mapping/mil_com/parameters/array_recruitments.hpl +++ b/v1_apache-hop dash mapping/mil_com/parameters/array_recruitments.hpl @@ -78,13 +78,16 @@ ARR_MC - параметр ervu-dashboard N - SELECT array_agg(idm_id) AS array_mil_com -FROM ( - SELECT idm_id + WITH ids AS ( + SELECT idm_id, + (ROW_NUMBER() OVER ()) - 1 AS rn FROM ervu_dashboard.recruitment - WHERE schema in ('Department', 'Organization', 'Region') - LIMIT 200 -) subquery; + WHERE schema IN ('Department', 'Organization', 'Region') + --LIMIT 200 +) +SELECT array_agg(idm_id) AS array_mil_com +FROM ids +GROUP BY rn / 30; N diff --git a/v1_apache-hop dash mapping/mil_com/recruitment_campaign.appeals(m_c).hpl b/v1_apache-hop dash mapping/mil_com/recruitment_campaign.appeals(m_c).hpl index 387af8f..fcdb9a8 100644 --- a/v1_apache-hop dash mapping/mil_com/recruitment_campaign.appeals(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/recruitment_campaign.appeals(m_c).hpl @@ -36,45 +36,12 @@ Insert / update (main_dashboard.appeals) N
- - Execute SQL script - Table input (appeal_document) регионы - Y - Table input (appeal_document) регионы Insert / update (main_dashboard.appeals) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - 640 - 336 - - Get variables 3 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/recruitment_campaign.subpoenas(m_c).hpl b/v1_apache-hop dash mapping/mil_com/recruitment_campaign.subpoenas(m_c).hpl index 5323932..699f05e 100644 --- a/v1_apache-hop dash mapping/mil_com/recruitment_campaign.subpoenas(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/recruitment_campaign.subpoenas(m_c).hpl @@ -36,45 +36,12 @@ Insert / update (recruitment_campaign.subpoenas) 3 N - - Execute SQL script - Table input (subpoena) осень/регионы - Y - Table input (subpoena) осень/регионы Insert / update (recruitment_campaign.subpoenas) 3 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - 256 - 400 - - Get variables 4 3 GetVariable @@ -352,50 +319,32 @@ last_status AS ( WHERE rn = 1 ), season_separations AS ( - /* - Осенний призыв: - Начало: 1 октября - Конец: 31 декабря - Весенний призыв: - Начало: 1 апреля - Конец: 15 июля --- Весна - --- Если текущий период с 1 янаваря по 30 сентября текущего года ТО -(-- обрезаем текущую дату до начала года, прибавляем 3 месяца(это начало весеннего призыва) И --- обрезаем текущую дату до начала года, прибавляем 6 месяца и 15 дней(это конец весеннего призыва))// - --- Если текущий период с 1 октября по 31 декабря текущего года ТО -(-- обрезаем текущую дату до начала года, прибавляем 3 месяца(это начало весеннего призыва) И --- обрезаем текущую дату до начала года, прибавляем 6 месяца и 15 дней(это конец весеннего призыва)) - --- Осень - --- Если текущий период с 1 января по 30 сентября текущего года ТО -(-- create_date >= 1 октября прошлого года --- create_date <= 31 декабря прошлого года) - --- Если текущий период с 1 октября по 31 декабря текущего года ТО -(-- create_date >= 1 октября текущего года --- create_date <= 31 декабря текущего года) ---должно быть что-то похожее, но данных пока нет на текущие периоды -*/ - SELECT + SELECT distinct ls.recruitment_id, ls.create_date, + ls.sub_stat_hist, + ls.subpoena_id, + ls.history_date, + ls.send_date, + ls.restr_dc, + ls.ap_date, + ls.d_code, + ls.rdi_id, 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 last_status ls ), +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 + COUNT(DISTINCT ss.subpoena_id) AS count_subpoena FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist IS NOT NULL GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -405,17 +354,15 @@ t2 AS ( ss.spring_autumn, ROUND(AVG(EXTRACT(DAY FROM (history_date::timestamp - send_date::timestamp))), 1) AS average_appeared FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id - WHERE sub_stat_hist IN ('4.1', '4.2', '4') + WHERE ss.sub_stat_hist IN ('4.1', '4.2', '4') GROUP BY ss.recruitment_id, ss.spring_autumn ), t3 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_appeared + COUNT(DISTINCT ss.subpoena_id) AS count_appeared FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist IN ('4.1', '4.2', '4') GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -423,9 +370,8 @@ t4 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_not_appeared + COUNT(DISTINCT ss.subpoena_id) AS count_not_appeared FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist = '5' GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -433,9 +379,8 @@ t5 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_not_ap_good_reason + COUNT(DISTINCT ss.subpoena_id) AS count_not_ap_good_reason FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist = '5.1' GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -443,9 +388,8 @@ t6 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_ap_not_required + COUNT(DISTINCT ss.subpoena_id) AS count_ap_not_required FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist IN ('3.8', '5.2') GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -453,9 +397,8 @@ t7 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_restrictions_applied + COUNT(DISTINCT ss.subpoena_id) AS count_restrictions_applied FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE restr_dc IS NULL GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -463,9 +406,8 @@ t8 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_introduced_measures + COUNT(DISTINCT ss.subpoena_id) AS count_introduced_measures FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE restr_dc IS NULL AND ap_date IS NOT NULL GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -473,9 +415,8 @@ t9 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_paper + COUNT(DISTINCT ss.subpoena_id) AS count_paper FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE d_code != '7' GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -483,9 +424,8 @@ t10 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_electron + COUNT(DISTINCT ss.subpoena_id) AS count_electron FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE d_code = '7' GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -493,18 +433,16 @@ t11 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT (DISTINCT rdi_id) AS count_restrictions + COUNT (DISTINCT ss.rdi_id) AS count_restrictions FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id GROUP BY ss.recruitment_id, ss.spring_autumn ), t12 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS count_not_delivery + COUNT(DISTINCT ss.subpoena_id) AS count_not_delivery FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE d_code IS NULL GROUP BY ss.recruitment_id, ss.spring_autumn ), @@ -512,9 +450,8 @@ t13 AS ( SELECT ss.recruitment_id, ss.spring_autumn, - COUNT(DISTINCT subpoena_id) AS appear_date_is_good + COUNT(DISTINCT ss.subpoena_id) AS appear_date_is_good FROM season_separations ss - JOIN last_status ls ON ss.recruitment_id = ls.recruitment_id WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1') GROUP BY ss.recruitment_id, ss.spring_autumn ) @@ -546,20 +483,20 @@ SELECT ss.recruitment_id, 0 AS rest, ss.spring_autumn -FROM season_separations ss -LEFT JOIN t1 ON ss.recruitment_id = t1.recruitment_id -LEFT JOIN t2 ON ss.recruitment_id = t2.recruitment_id -LEFT JOIN t3 ON ss.recruitment_id = t3.recruitment_id -LEFT JOIN t4 ON ss.recruitment_id = t4.recruitment_id -LEFT JOIN t5 ON ss.recruitment_id = t5.recruitment_id -LEFT JOIN t6 ON ss.recruitment_id = t6.recruitment_id -LEFT JOIN t7 ON ss.recruitment_id = t7.recruitment_id -LEFT JOIN t8 ON ss.recruitment_id = t8.recruitment_id -LEFT JOIN t9 ON ss.recruitment_id = t9.recruitment_id -LEFT JOIN t10 ON ss.recruitment_id = t10.recruitment_id -LEFT JOIN t11 ON ss.recruitment_id = t11.recruitment_id -LEFT JOIN t12 ON ss.recruitment_id = t12.recruitment_id -LEFT JOIN t13 ON ss.recruitment_id = t13.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 +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 diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.age(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.age(m_c).hpl index 8414a17..31139f1 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.age(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.age(m_c).hpl @@ -36,46 +36,12 @@ Insert / update (total_registered.age) 2 N - - Execute SQL script - Table input (person_registry) регион/мужчины - Y - Table input (person_registry) регион/мужчины Insert / update (total_registered.age) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 944 - 720 - - Get variables 3 2 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.busyness(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.busyness(m_c).hpl index 28f073d..c6b850c 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.busyness(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.busyness(m_c).hpl @@ -36,46 +36,12 @@ Get variables 3 2 2 N - - Execute SQL script - Table input (person_registry) РФ/мужчины - Y - Table input (person_registry) РФ/мужчины Insert / update (total_registered.busyness) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 1040 - 544 - - Get variables 3 2 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.child_minor(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.child_minor(m_c).hpl index b683946..6132eec 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.child_minor(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.child_minor(m_c).hpl @@ -31,11 +31,6 @@ Get variables 4 2 N - - Execute SQL script - Table input (person_registry)регион/все - Y - Select values 4 2 Insert / update (total_registered.child_minor) 3 @@ -47,35 +42,6 @@ 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 576 - 368 - - Get variables 4 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.driver_license(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.driver_license(m_c).hpl index 2f6a25b..644cbb0 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.driver_license(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.driver_license(m_c).hpl @@ -36,49 +36,12 @@ Get variables 3 2 N - - Execute SQL script - Table input (driver_license) регионы/все - Y - Table input (driver_license) регионы/все Insert / update (total_registered.driver_license) 2 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 512 - 384 - - Get variables 3 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.education_level(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.education_level(m_c).hpl index 273a56a..80b9417 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.education_level(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.education_level(m_c).hpl @@ -24,52 +24,24 @@ Get variables 3 2 2 Select values 3 2 2 - Y + N Table input (person_registry) РФ/мужчины Get variables 3 2 2 - Y + N Select values 3 2 2 Insert / update (total_registered.education_level) 2 - Y + N - Execute SQL script - Table input (person_registry) РФ/мужчины + Table input (person_registry) РФ/мужчины + Insert / update (total_registered.education_level) 2 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - 768 - 496 - - Get variables 3 2 2 GetVariable @@ -100,7 +72,7 @@ WHERE recording_date = current_date 1328 - 496 + 624 @@ -248,7 +220,7 @@ WHERE recording_date = current_date 1472 - 496 + 624 diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.marital_status(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.marital_status(m_c).hpl index 27e0502..dbd7d34 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.marital_status(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.marital_status(m_c).hpl @@ -36,46 +36,12 @@ Insert / update (total_registered.marital_status) 2 N - - Execute SQL script - Table input (person_registry) регионы/мужчины - Y - Table input (person_registry) регионы/мужчины Insert / update (total_registered.marital_status) 2 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 752 - 544 - - Get variables 3 2 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.reg_mil_cat(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.reg_mil_cat(m_c).hpl index bb71cd6..c0c6dd9 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.reg_mil_cat(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.reg_mil_cat(m_c).hpl @@ -36,46 +36,12 @@ Insert / update (total_registered.reg_mil_cat) N - - Execute SQL script - Table input (person_registry) военком/рег - Y - Table input (person_registry) военком/рег Insert / update (total_registered.reg_mil_cat) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 464 - 288 - - Get variables 3 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.removed_registry(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.removed_registry(m_c).hpl index 652abb8..c2dfd47 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.removed_registry(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.removed_registry(m_c).hpl @@ -36,49 +36,12 @@ Get variables 2 2 N - - Execute SQL script - Table input (decision-document-service) регион 2 - Y - Table input (decision-document-service) регион 2 Insert / update (total_registered.removed_registry) 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - 512 - 320 - - Get variables 2 2 GetVariable diff --git a/v1_apache-hop dash mapping/mil_com/total_registered.subpoenas(m_c).hpl b/v1_apache-hop dash mapping/mil_com/total_registered.subpoenas(m_c).hpl index 40304ab..2b6b53b 100644 --- a/v1_apache-hop dash mapping/mil_com/total_registered.subpoenas(m_c).hpl +++ b/v1_apache-hop dash mapping/mil_com/total_registered.subpoenas(m_c).hpl @@ -24,57 +24,24 @@ Get variables 4 2 Select values 4 2 - Y + N Table input (subpoena) регион/рег Get variables 4 2 - Y + N Select values 4 2 Insert / update (total_registered.subpoenas) 3 - Y + N - Execute SQL script - Table input (subpoena) регион/рег + Table input (subpoena) регион/рег + Insert / update (total_registered.subpoenas) 3 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 IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') - - - - - 592 - 384 - - Get variables 4 2 GetVariable @@ -104,8 +71,8 @@ WHERE recording_date = current_date - 1024 - 384 + 1040 + 496 @@ -317,8 +284,8 @@ WHERE recording_date = current_date - 1200 - 384 + 1216 + 496 diff --git a/v1_apache-hop dash mapping/region/job_recruitments_region.hwf b/v1_apache-hop dash mapping/region/job_recruitments_region.hwf index 9d86352..65e477d 100644 --- a/v1_apache-hop dash mapping/region/job_recruitments_region.hwf +++ b/v1_apache-hop dash mapping/region/job_recruitments_region.hwf @@ -80,6 +80,7 @@ ARR_REG ARRAY_REGION + Y @@ -764,13 +765,14 @@ ARR_REG ARRAY_REGION + Y Y local N - Y + N Y N 1696 @@ -851,6 +853,8 @@ N N ${PROJECT_HOME}/region/appeals.review_rating.hpl + + Basic Y diff --git a/v1_apache-hop dash mapping/region/select_recruitments_region(reg).hpl b/v1_apache-hop dash mapping/region/select_recruitments_region(reg).hpl index e92ef5e..f7a624c 100644 --- a/v1_apache-hop dash mapping/region/select_recruitments_region(reg).hpl +++ b/v1_apache-hop dash mapping/region/select_recruitments_region(reg).hpl @@ -60,11 +60,16 @@ + + + + -1 ORG_ROW -1 none String + @@ -91,6 +96,7 @@ = recruitment_reg_id ORG_ROW + ervu_dashboard array_reg