diff --git a/v1_apache-hop dash mapping/country/total_registered.busyness.hpl b/v1_apache-hop dash mapping/country/total_registered.busyness.hpl index 6de0bd0..e4f298d 100644 --- a/v1_apache-hop dash mapping/country/total_registered.busyness.hpl +++ b/v1_apache-hop dash mapping/country/total_registered.busyness.hpl @@ -195,6 +195,16 @@ WHERE recording_date = current_date schema N + + convicts + convicts + Y + + + convicts_percent + convicts_percent + Y + Y @@ -271,62 +281,167 @@ WHERE recording_date = current_date ervu-dashboard N 0 - SELECT - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS study_percent, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS work_percent, + WITH +a AS ( + SELECT + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS not_work_percent, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, - '${REG_ID}' AS recruitment_id, - "all_M_W" AS gender, - registered, - 'Ministry' AS schema -FROM total_registered.busyness -WHERE recruitment_id = ANY ( - string_to_array( - trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' - )::uuid[] + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND schema = 'Region' + AND "all_M_W" IN ('M', 'W') + AND recording_date = CURRENT_DATE + GROUP BY "all_M_W", registered +), + +a2 AS ( + SELECT + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, + + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, + + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${REG_ID}' AS recruitment_id, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND schema = 'Region' + AND "all_M_W" = 'ALL' + AND recording_date = CURRENT_DATE + GROUP BY registered ) -AND schema = 'Region' -AND recording_date = CURRENT_DATE -GROUP BY "all_M_W", registered; + +SELECT + a.study, + a.work, + a.convicts, + a.study_percent, + a.work_percent, + a.not_work, + a.not_work_percent, + a.total_people, + a.recruitment_id, + a.gender, + a.registered, + 'Ministry' AS schema, + COALESCE( + CASE + WHEN a2.convicts > 0 + THEN ROUND((a.convicts / a2.convicts * 100), 2) + ELSE 0 + END, + 0 + ) AS convicts_percent +FROM a +LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered + +UNION ALL + +SELECT + a2.study, + a2.work, + a2.convicts, + a2.study_percent, + a2.work_percent, + a2.not_work, + a2.not_work_percent, + a2.total_people, + a2.recruitment_id, + 'ALL' AS gender, + a2.registered, + 'Ministry' AS schema, + 0 AS convicts_percent +FROM a2 Y diff --git a/v1_apache-hop dash mapping/info_recruits/child.hpl b/v1_apache-hop dash mapping/info_recruits/child.hpl index 0e12dba..f6c8445 100644 --- a/v1_apache-hop dash mapping/info_recruits/child.hpl +++ b/v1_apache-hop dash mapping/info_recruits/child.hpl @@ -23,12 +23,12 @@ Table input Table output - Y + N Table input Insert / update - N + Y @@ -49,6 +49,13 @@ = recruit_id recruit_id + + + + = + full_name + full_name + ervu_dashboard citizen_child
@@ -80,7 +87,7 @@ full_name full_name - Y + N kinship_type @@ -113,6 +120,7 @@ (select jsonb_array_elements(ri.info->'svedDeti'->'rebenok') ch, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array') select r.id::uuid recruit_id, @@ -129,8 +137,10 @@ select 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 +join child on r.id = child.recruit_id +where +r.system_update_date >= '${UP_D}' + Y 400 diff --git a/v1_apache-hop dash mapping/info_recruits/citizen_foreign.hpl b/v1_apache-hop dash mapping/info_recruits/citizen_foreign.hpl index f2baf3f..c3a1905 100644 --- a/v1_apache-hop dash mapping/info_recruits/citizen_foreign.hpl +++ b/v1_apache-hop dash mapping/info_recruits/citizen_foreign.hpl @@ -1,3 +1,4 @@ + citizen_foreign @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,14 +23,132 @@ Table input Table output - Y + N Table input 2 Table output 2 + N + + + Table input + Insert / update + Y + + + Table input 2 + Insert / update 2 Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + citizenship_date + citizenship_date + + ervu_dashboard + citizenship_foreign
+ + recruit_id + recruit_id + N + + + citizenship_date + citizenship_date + N + + + country_name + country_name + Y + + + citizenship_basis + citizenship_basis + Y + +
+ N + + + 672 + 208 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + residense_right_date + residense_right_date + + ervu_dashboard + citizenship_foreign
+ + recruit_id + recruit_id + N + + + residense_right_date + residense_right_date + N + + + country_name + country_name + Y + + + residense_right_basis + residense_right_basis + Y + +
+ N + + + 672 + 320 + +
Table input TableInput @@ -45,10 +161,13 @@ ervu_person_registry + N + 0 with citizen as (select jsonb_array_elements(ri.info->'svedIGPP'->'svedIG') cit, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedIGPP'->'svedIG') = 'array') select r.id recruit_id, @@ -56,18 +175,13 @@ select 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 +join citizen on r.id = citizen.recruit_id +WHERE r.system_update_date >= '${UP_D}'; + Y - 208 208 - Y @@ -82,10 +196,13 @@ join citizen on r.id = citizen.recruit_id; ervu_person_registry + N + 0 with citizen as (select jsonb_array_elements(ri.info->'svedIGPP'->'svedPP') cit, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedIGPP'->'svedPP') = 'array') select r.id recruit_id, @@ -93,18 +210,13 @@ select 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 +join citizen on r.id = citizen.recruit_id +WHERE r.system_update_date >= '${UP_D}'; + Y - 208 304 - Y @@ -118,31 +230,27 @@ join citizen on r.id = citizen.recruit_id; none - ervu-dashboard - ervu_dashboard - citizenship_foreign
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + citizenship_foreign
+ N + Y + N + Y - 672 - 208 - Y + 48
@@ -156,31 +264,27 @@ join citizen on r.id = citizen.recruit_id; none - ervu-dashboard - ervu_dashboard - citizenship_foreign
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + citizenship_foreign
+ N + Y + N + Y - 672 - 304 - Y + 512
diff --git a/v1_apache-hop dash mapping/info_recruits/citizenship.hpl b/v1_apache-hop dash mapping/info_recruits/citizenship.hpl index 0a4f535..991f743 100644 --- a/v1_apache-hop dash mapping/info_recruits/citizenship.hpl +++ b/v1_apache-hop dash mapping/info_recruits/citizenship.hpl @@ -1,3 +1,4 @@ + citizenship @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,9 +23,88 @@ Table input Table output + N + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + ervu_dashboard + citizenship
+ + recruit_id + recruit_id + N + + + acquiring_authority + acquiring_authority + Y + + + acquiring_basis + acquiring_basis + Y + + + acquiring_date + acquiring_date + Y + + + acquiring_number + acquiring_number + Y + + + renunciation_authority + renunciation_authority + Y + + + renunciation_basis + renunciation_basis + Y + + + renunciation_date + renunciation_date + Y + + + renunciation_number + renunciation_number + Y + +
+ N + + + 688 + 224 + +
Table input TableInput @@ -40,6 +117,8 @@ ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis, ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number, @@ -50,20 +129,16 @@ 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 +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' 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 +(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null) +and r.system_update_date >= '${UP_D}' + + Y - 432 224 - Y @@ -77,31 +152,27 @@ where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and none - ervu-dashboard - ervu_dashboard - citizenship
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + citizenship
+ N + Y + N + Y - 672 - 224 - Y + 352
diff --git a/v1_apache-hop dash mapping/info_recruits/deputy.hpl b/v1_apache-hop dash mapping/info_recruits/deputy.hpl index 16d7d7f..94cf2b2 100644 --- a/v1_apache-hop dash mapping/info_recruits/deputy.hpl +++ b/v1_apache-hop dash mapping/info_recruits/deputy.hpl @@ -23,16 +23,21 @@ Table input 2 Table output 2 - Y - - - Table input - Insert / update N + + Table input + Insert / update + Y + Table input Table output + N + + + Table input 2 + Insert / update 2 Y @@ -55,6 +60,11 @@ recruit_id recruit_id + + = + deputy + deputy + ervu_dashboard deputy
@@ -77,12 +87,76 @@ period_office Y + + deputy + deputy + Y + N - 720 - 160 + 688 + 224 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + deputy + deputy + + ervu_dashboard + deputy
+ + recruit_id + recruit_id + N + + + end_date + end_date + Y + + + information + information + Y + + + period_office + period_office + Y + + + deputy + deputy + Y + +
+ N + + + 688 + 320
@@ -102,11 +176,13 @@ 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 +ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information, +true deputy 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 +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' +where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null +AND r.system_update_date >= '${UP_D}' + Y 432 @@ -132,9 +208,10 @@ to_date(ri.info->'svedKandidat'->'kandidat'->>'dataSnyatiyaKandidatury', 'YYYY-M 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 +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' +where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null +AND r.system_update_date >= '${UP_D}' + Y 432 @@ -171,8 +248,8 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;Y - 800 - 224 + 688 + 64 @@ -205,8 +282,8 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;Y - 800 - 320 + 688 + 448 diff --git a/v1_apache-hop dash mapping/info_recruits/disability.hpl b/v1_apache-hop dash mapping/info_recruits/disability.hpl index e34b32c..44ef76d 100644 --- a/v1_apache-hop dash mapping/info_recruits/disability.hpl +++ b/v1_apache-hop dash mapping/info_recruits/disability.hpl @@ -1,3 +1,4 @@ + disability @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,14 +23,147 @@ Table input Table output - Y + N Table input 2 Table output 2 + N + + + Table input + Insert / update + Y + + + Table input 2 + Insert / update 2 Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + ervu_dashboard + disability
+ + recruit_id + recruit_id + N + + + close_date + close_date + Y + + + confirmation_date + confirmation_date + Y + + + disability + disability + Y + + + disability_group + disability_group + Y + + + organization_name + organization_name + Y + + + start_date + start_date + Y + +
+ N + + + 432 + 208 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + ervu_dashboard + disability
+ + recruit_id + recruit_id + N + + + close_date + close_date + Y + + + organization_name + organization_name + Y + + + start_date + start_date + Y + +
+ N + + + 432 + 304 + +
Table input TableInput @@ -45,6 +176,8 @@ ervu_person_registry + N + 0 select r.id recruit_id, case when ri.info->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа' @@ -59,18 +192,14 @@ 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 +where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null +and +r.system_update_date >= '${UP_D}'; + Y - 208 208 - Y @@ -85,6 +214,8 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null; ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name, @@ -92,18 +223,14 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null; 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 +where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null +and +r.system_update_date >= '${UP_D}'; + Y - 208 304 - Y @@ -117,31 +244,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null; none - ervu-dashboard - ervu_dashboard - disability
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + disability
+ N + Y + N + Y - 416 - 208 - Y + 80
@@ -155,31 +278,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null; none - ervu-dashboard - ervu_dashboard - disability
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + disability
+ N + Y + N + Y - 416 - 304 - Y + 496
diff --git a/v1_apache-hop dash mapping/info_recruits/disease.hpl b/v1_apache-hop dash mapping/info_recruits/disease.hpl index 6492bf9..f6764bf 100644 --- a/v1_apache-hop dash mapping/info_recruits/disease.hpl +++ b/v1_apache-hop dash mapping/info_recruits/disease.hpl @@ -1,3 +1,4 @@ + disease @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,9 +23,68 @@ Table input Table output + N + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + reg_date + reg_date + + ervu_dashboard + disease
+ + recruit_id + recruit_id + N + + + code + code + Y + + + name + name + Y + + + reg_date + reg_date + Y + +
+ N + + + 448 + 208 + +
Table input TableInput @@ -40,29 +97,29 @@ ervu_person_registry + N + 0 with zdorov as (select jsonb_array_elements(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' 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 + --registered - поставлен на учет по заболеванию from public.recruits r -join zdorov on r.id = zdorov.recruit_id; - 0 - - N - N - N +join zdorov on r.id = zdorov.recruit_id +where +r.system_update_date >= '${UP_D}'; + Y - 208 208 - Y @@ -76,31 +133,27 @@ join zdorov on r.id = zdorov.recruit_id; none - ervu-dashboard - ervu_dashboard - disease
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + disease
+ N + Y + N + Y - - 416 - 208 - Y + 464 + 64
diff --git a/v1_apache-hop dash mapping/info_recruits/drivers_licence.hpl b/v1_apache-hop dash mapping/info_recruits/drivers_licence.hpl index bfb7f52..61ee8ed 100644 --- a/v1_apache-hop dash mapping/info_recruits/drivers_licence.hpl +++ b/v1_apache-hop dash mapping/info_recruits/drivers_licence.hpl @@ -1,3 +1,4 @@ + drivers_licence @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,14 +23,187 @@ Table input Table output - Y + N Table input 2 Table output 2 + N + + + Table input 2 + Insert / update 2 + Y + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + + = + tractor_driver + tractor_driver + + ervu_dashboard + drivers_licence
+ + recruit_id + recruit_id + N + + + categories + categories + Y + + + close_date + close_date + Y + + + licence_number + licence_number + Y + + + licence_series + licence_series + Y + + + start_date + start_date + N + + + tractor_driver + tractor_driver + N + +
+ N + + + 416 + 208 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + + = + tractor_driver + tractor_driver + + ervu_dashboard + drivers_licence
+ + recruit_id + recruit_id + N + + + categories + categories + Y + + + close_date + close_date + Y + + + licence_number + licence_number + Y + + + licence_series + licence_series + Y + + + replacement_date + replacement_date + Y + + + return_date + return_date + Y + + + seizure_date + seizure_date + Y + + + start_date + start_date + N + + + tractor_driver + tractor_driver + N + +
+ N + + + 416 + 416 + +
Table input TableInput @@ -45,8 +216,11 @@ ervu_person_registry + N + 0 select r.id recruit_id, + false as tractor_driver, 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, @@ -57,18 +231,14 @@ 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 +where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null +and +r.system_update_date >= '${UP_D}'; + Y - 208 208 - Y @@ -83,6 +253,8 @@ where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null; ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' licence_series, @@ -99,19 +271,14 @@ where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null; 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; +where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null +AND r.system_update_date >= '${UP_D}'; - 0 - - N - N - N + Y - 208 - 304 - Y + 416 @@ -125,31 +292,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null; none - ervu-dashboard - ervu_dashboard - drivers_licence
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + drivers_licence
+ N + Y + N + Y - 416 - 208 - Y + 64
@@ -163,31 +326,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null; none - ervu-dashboard - ervu_dashboard - drivers_licence
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + drivers_licence
+ N + Y + N + Y - 416 - 304 - Y + 544
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 7319365..c012513 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 @@ -11,6 +11,11 @@ - 2024/08/16 15:32:20.489 + + ST_CH_D + + + UP_D @@ -32,8 +37,8 @@ 0 1 N - 496 - 1936 + 464 + 1984 @@ -42,8 +47,8 @@ SUCCESS N - 1296 - 1536 + 1424 + 1984 @@ -78,21 +83,6 @@ 1536 - - SQL.spouse - - SQL - - ervu-dashboard - N - delete from ervu_dashboard.citizen_spouse - N - N - N - 864 - 1872 - - SQL.child @@ -104,8 +94,8 @@ N N N - 880 - 2816 + 352 + 2272 @@ -135,7 +125,7 @@ Y N 992 - 1664 + 1600 @@ -148,20 +138,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/spouse.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 1776 + 1664 @@ -174,20 +168,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/child.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N - 976 - 2816 + 992 + 1728 @@ -201,8 +199,8 @@ N N N - 848 - 3120 + 352 + 2336 @@ -215,20 +213,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/disease.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3120 + 1792 @@ -242,8 +244,8 @@ N N N - 848 - 3184 + 352 + 2400 @@ -256,20 +258,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/medical_authorities.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3184 + 1856 @@ -283,8 +289,8 @@ N N N - 848 - 3248 + 352 + 2464 @@ -297,20 +303,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/disability.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3248 + 1920 @@ -324,8 +334,8 @@ N N N - 848 - 3312 + 352 + 2528 @@ -338,20 +348,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/drivers_licence.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3312 + 1984 @@ -365,8 +379,8 @@ N N N - 848 - 3376 + 352 + 2592 @@ -379,20 +393,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/property.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3376 + 2048 @@ -406,8 +424,8 @@ N N N - 848 - 3440 + 352 + 2656 @@ -420,20 +438,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/citizen_foreign.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3440 + 2112 @@ -447,8 +469,8 @@ N N N - 848 - 3504 + 352 + 2720 @@ -461,20 +483,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/citizenship.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3504 + 2176 @@ -488,8 +514,8 @@ N N N - 848 - 3568 + 352 + 2784 @@ -502,20 +528,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/deputy.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3568 + 2240 @@ -529,8 +559,8 @@ N N N - 848 - 3632 + 352 + 2848 @@ -543,20 +573,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/prosecution.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3632 + 2304 @@ -570,8 +604,8 @@ N N N - 848 - 3696 + 352 + 2912 @@ -584,20 +618,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/punishment.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3696 + 2368 @@ -611,8 +649,8 @@ N N N - 848 - 3760 + 352 + 2976 @@ -625,20 +663,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/passport.hpl Basic + + UP_D + UPDATE_DATE + Y - N + Y local N N Y N 992 - 3760 + 2432 @@ -652,8 +694,8 @@ N N N - 848 - 3824 + 352 + 3040 @@ -666,20 +708,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/subpoena.hpl Basic + + ST_CH_D + STATUS_CHANGE_DATE + Y - N + Y local N N Y N 992 - 3824 + 2496 @@ -693,8 +739,8 @@ N N N - 848 - 3888 + 352 + 3104 @@ -707,20 +753,24 @@ N Y N - N + Y ${Internal.Entry.Current.Folder}/temporary_measure.hpl Basic + + ST_CH_D + STATUS_CHANGE_DATE + Y - N + Y local N N Y N 992 - 3888 + 2560 @@ -745,8 +795,44 @@ N Y N - 832 - 1664 + 624 + 1984 + + + + Success 2 + + SUCCESS + + N + 208 + 2656 + + + + select_delta_time_subpoena.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/select_delta_time_subpoena.hpl + Basic + + Y + + N + local + N + N + Y + N + 624 + 2096 @@ -755,49 +841,28 @@ info_recruits Success Y - Y - N - - - SQL.spouse - spouse - N - Y - N - - - SQL.child - child - Y - Y - N + N + Y child Success - N - Y - N + Y + N + Y spouse Success Y - Y - N + N + Y opekun Success Y - Y - N - - - Start - SQL.spouse - N - Y + N Y @@ -814,13 +879,6 @@ Y Y - - SQL.disease - disease - Y - Y - N - Start SQL.medical_authorities @@ -828,26 +886,19 @@ Y Y - - SQL.medical_authorities - medical_authorities - Y - Y - N - disease Success - N - Y - N + Y + N + Y medical_authorities Success - N - Y - N + Y + N + Y Start @@ -856,19 +907,12 @@ Y Y - - SQL.disability - disability - Y - Y - N - disability Success - N - Y - N + Y + N + Y Start @@ -877,19 +921,12 @@ Y Y - - SQL.drivers_licence - drivers_licence - Y - Y - N - drivers_licence Success - N - Y - N + Y + N + Y Start @@ -898,19 +935,12 @@ Y Y - - SQL.property - property - Y - Y - N - property Success - N - Y - N + Y + N + Y Start @@ -919,33 +949,19 @@ Y Y - - SQL.citizen_foreign - citizen_foreign - Y - Y - N - citizen_foreign Success - N - Y - N - - - SQL.citizenship - citizenship Y - Y - N + N + Y citizenship Success - N - Y - N + Y + N + Y Start @@ -954,19 +970,12 @@ Y Y - - SQL.deputy - deputy - Y - Y - N - deputy Success - N - Y - N + Y + N + Y Start @@ -975,13 +984,6 @@ Y Y - - SQL.prosecution - prosecution - Y - Y - N - Start SQL.prosecution @@ -992,16 +994,9 @@ prosecution Success - N - Y - N - - - SQL.punishment - punishment Y - Y - N + N + Y Start @@ -1013,9 +1008,9 @@ punishment Success - N - Y - N + Y + N + Y Start @@ -1024,33 +1019,19 @@ Y Y - - SQL.passport - passport - Y - Y - N - passport Success - N - Y - N - - - SQL.subpoena - subpoena Y - Y - N + N + Y subpoena Success - N - Y - N + Y + N + Y Start @@ -1059,13 +1040,6 @@ Y Y - - SQL.tempmeas - temporary_measure - Y - Y - N - Start SQL.tempmeas @@ -1076,16 +1050,9 @@ temporary_measure Success - N - Y - N - - - select_delta_time.hpl - info_recruits - N - Y - N + Y + N + Y Start @@ -1094,6 +1061,13 @@ Y Y + + select_delta_time.hpl + spouse + Y + Y + N + select_delta_time.hpl opekun @@ -1103,7 +1077,196 @@ select_delta_time.hpl - spouse + info_recruits + Y + Y + N + + + select_delta_time.hpl + child + Y + Y + N + + + SQL.child + Success 2 + N + Y + N + + + SQL.disease + Success 2 + N + Y + N + + + SQL.disability + Success 2 + N + Y + N + + + SQL.property + Success 2 + N + Y + N + + + SQL.citizen_foreign + Success 2 + N + Y + N + + + SQL.citizenship + Success 2 + N + Y + N + + + SQL.deputy + Success 2 + N + Y + N + + + SQL.prosecution + Success 2 + N + Y + N + + + SQL.punishment + Success 2 + N + Y + N + + + SQL.passport + Success 2 + N + Y + N + + + SQL.subpoena + Success 2 + N + Y + N + + + SQL.tempmeas + Success 2 + N + Y + N + + + select_delta_time.hpl + disease + Y + Y + N + + + select_delta_time.hpl + drivers_licence + Y + Y + N + + + select_delta_time.hpl + medical_authorities + Y + Y + N + + + select_delta_time.hpl + disability + Y + Y + N + + + select_delta_time.hpl + property + Y + Y + N + + + select_delta_time.hpl + citizen_foreign + Y + Y + N + + + select_delta_time.hpl + citizenship + Y + Y + N + + + select_delta_time.hpl + deputy + Y + Y + N + + + select_delta_time.hpl + prosecution + Y + Y + N + + + select_delta_time.hpl + punishment + Y + Y + N + + + select_delta_time.hpl + passport + Y + Y + N + + + Start + select_delta_time_subpoena.hpl + Y + Y + Y + + + select_delta_time_subpoena.hpl + subpoena + Y + Y + N + + + select_delta_time_subpoena.hpl + temporary_measure Y Y N @@ -1130,6 +1293,26 @@ доработать дельту, сделать дельту для остальных таблиц 325 + + 251 + 232 + 201 + 90 + 58 + 14 + N + 90 + 58 + 14 + N + Segoe UI + 9 + 26 + 1328 + 2320 + status_change_date добавить колонку в ervu_dashboard.subpoena + 367 + diff --git a/v1_apache-hop dash mapping/info_recruits/medical_authorities.hpl b/v1_apache-hop dash mapping/info_recruits/medical_authorities.hpl index 04877f0..6ed043a 100644 --- a/v1_apache-hop dash mapping/info_recruits/medical_authorities.hpl +++ b/v1_apache-hop dash mapping/info_recruits/medical_authorities.hpl @@ -1,3 +1,4 @@ + medical_authorities @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,14 +23,132 @@ Table input hiv Table output - Y + N Table input 2 Table output 2 + N + + + Table input hiv + Insert / update + Y + + + Table input 2 + Insert / update 2 Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + ervu_dashboard + medical_authorities
+ + recruit_id + recruit_id + N + + + close_date + close_date + Y + + + hiv + hiv + Y + + + start_date + start_date + Y + +
+ N + + + 448 + 208 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + ervu_dashboard + medical_authorities
+ + recruit_id + recruit_id + N + + + change_date + change_date + Y + + + close_date + close_date + Y + + + start_date + start_date + Y + +
+ N + + + 448 + 352 + +
Table input 2 TableInput @@ -45,10 +161,13 @@ ervu_person_registry + N + 0 with uchet as (select jsonb_array_elements(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') u, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array') select r.id recruit_id, @@ -56,18 +175,14 @@ select u->>'dataSnyatUchet' close_date, u->>'dataPlan' change_date from public.recruits r -join uchet on r.id = uchet.recruit_id; - 0 - - N - N - N +join uchet on r.id = uchet.recruit_id +where +r.system_update_date >= '${UP_D}'; + Y - 208 352 - Y @@ -82,10 +197,13 @@ join uchet on r.id = uchet.recruit_id; ervu_person_registry + N + 0 with uchet as (select jsonb_array_elements(ri.info->'svedUchetVICH'->'uchetVICH') u, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedUchetVICH'->'uchetVICH') = 'array') select r.id recruit_id, @@ -93,18 +211,14 @@ select 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 +join uchet on r.id = uchet.recruit_id +where +r.system_update_date >= '${UP_D}'; + Y - 208 208 - Y @@ -118,31 +232,27 @@ join uchet on r.id = uchet.recruit_id; none - ervu-dashboard - ervu_dashboard - medical_authorities
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + medical_authorities
+ N + Y + N + Y - 416 - 208 - Y + 80
@@ -156,31 +266,27 @@ join uchet on r.id = uchet.recruit_id; none - ervu-dashboard - ervu_dashboard - medical_authorities
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + medical_authorities
+ N + Y + N + Y - - 416 - 352 - Y + 432 + 480
diff --git a/v1_apache-hop dash mapping/info_recruits/opekun.hpl b/v1_apache-hop dash mapping/info_recruits/opekun.hpl index 521127a..71484d2 100644 --- a/v1_apache-hop dash mapping/info_recruits/opekun.hpl +++ b/v1_apache-hop dash mapping/info_recruits/opekun.hpl @@ -98,6 +98,7 @@ (select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array') select r.id recruit_id, @@ -106,7 +107,7 @@ select ch->'fioOpek'->>'otchestvo') full_name, make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int, NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int, - NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, + NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date, ch->>'snils' snils from public.recruits r join person on r.id = person.recruit_id @@ -138,14 +139,11 @@ r.system_update_date >= '${UP_D}' N N N - Y - N ervu_dashboard N citizen_guardianship
- N Y N diff --git a/v1_apache-hop dash mapping/info_recruits/passport.hpl b/v1_apache-hop dash mapping/info_recruits/passport.hpl index 04f3564..c46b716 100644 --- a/v1_apache-hop dash mapping/info_recruits/passport.hpl +++ b/v1_apache-hop dash mapping/info_recruits/passport.hpl @@ -1,3 +1,4 @@ + passport @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,14 +23,172 @@ Table input Table output - Y + N Table input 2 Table output 2 + N + + + Table input + Insert / update Y + + Table input 2 + Insert / update 2 + N + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + passport_number + passport_number + + + = + passport_series + passport_series + + 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 + + + 752 + 384 + +
+ + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + passport_number + passport_number + + + = + passport_series + passport_series + + 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 + + + 752 + 480 + +
Table input TableInput @@ -45,6 +201,8 @@ ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number, ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series, @@ -55,19 +213,13 @@ 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 +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null; - 0 - - N - N - N + Y - - 208 - 208 - Y + 416 + 384 @@ -82,6 +234,8 @@ where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null; ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number, ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series, @@ -94,17 +248,11 @@ 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 + 416 + 480 @@ -118,31 +266,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null; none - ervu-dashboard - ervu_dashboard - passport
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + passport
+ N + Y + N + Y - - 672 - 208 - Y + 736 + 144
@@ -156,31 +300,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null; none - ervu-dashboard - ervu_dashboard - passport
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + passport
+ N + Y + N + Y - - 672 - 304 - Y + 736 + 704
diff --git a/v1_apache-hop dash mapping/info_recruits/property.hpl b/v1_apache-hop dash mapping/info_recruits/property.hpl index 338eb6f..1e89be1 100644 --- a/v1_apache-hop dash mapping/info_recruits/property.hpl +++ b/v1_apache-hop dash mapping/info_recruits/property.hpl @@ -1,3 +1,4 @@ + property @@ -6,7 +7,6 @@ Normal - / N @@ -16,36 +16,54 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N - Table input + Table input realty Table output - Y + N - Table input 2 + Table input ground_transportation Table output 2 - Y + N - Table input 2 2 + Table input water_vehicles Table output 2 2 + N + + + Table input air_vehicles + Table output 2 2 2 + N + + + Table input realty + Insert / update Y - Table input 2 2 2 - Table output 2 2 2 + Table input air_vehicles + Insert / update 2 + Y + + + Table input ground_transportation + Insert / update 4 + Y + + + Table input water_vehicles + Insert / update 3 Y - Table input - TableInput + Insert / update + InsertUpdate Y @@ -54,36 +72,288 @@ 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 + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + address + address + Y + + + close_date + close_date + Y + + + kind_right + kind_right + Y + + + start_date + start_date + N + + + type_property + type_property + N + +
+ N - - 480 + 720 208 - Y
- Table input 2 + Insert / update 2 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + type_property + type_property + N + + + close_date + close_date + Y + + + start_date + start_date + N + + + vehicle_category + vehicle_category + Y + + + vehicle_type + vehicle_type + Y + +
+ N + + + 720 + 432 + +
+ + Insert / update 3 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + start_date + start_date + + + = + type_property + type_property + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + close_date + close_date + Y + + + start_date + start_date + N + + + type_property + type_property + N + + + vehicle_category + vehicle_category + Y + + + vehicle_type + vehicle_type + Y + +
+ N + + + 1200 + 432 + +
+ + Insert / update 4 + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + = + type_property + type_property + + + = + start_date + start_date + + ervu_dashboard + property
+ + recruit_id + recruit_id + N + + + type_property + type_property + N + + + brand_model + brand_model + Y + + + close_date + close_date + Y + + + issue_year + issue_year + Y + + + reg_plate + reg_plate + Y + + + start_date + start_date + N + + + vehicle_type + vehicle_type + Y + + + vin + vin + Y + +
+ N + + + 1200 + 208 + +
+ + Table input air_vehicles TableInput Y @@ -94,10 +364,50 @@ join prop on r.id = prop.recruit_id; ervu_person_registry + N + 0 + with prop as +(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u, + ri.recruit_id +from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' +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 +WHERE r.system_update_date >= '${UP_D}'; + Y + + + 464 + 432 + + + + Table input ground_transportation + TableInput + + Y + + 1 + + none + + + ervu_person_registry + N + 0 with prop as (select jsonb_array_elements(ri.info->'svedNazTS'->'nazTS') u, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedNazTS'->'nazTS') = 'array') select r.id recruit_id, @@ -110,22 +420,17 @@ select 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 +join prop on r.id = prop.recruit_id +WHERE r.system_update_date >= '${UP_D}'; + Y - - 480 - 304 - Y + 928 + 208 - Table input 2 2 + Table input realty TableInput Y @@ -136,35 +441,34 @@ join prop on r.id = prop.recruit_id; ervu_person_registry + N + 0 with prop as -(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u, +(select jsonb_array_elements(ri.info->'svedON'->'on') u, ri.recruit_id from public.recruits_info ri -where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array') +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' +where jsonb_typeof(ri.info->'svedON'->'on') = 'array') select r.id recruit_id, - u->>'naimVid' vehicle_type, - u->>'naznKat' vehicle_category, + 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, - 'air_vehicles' type_property + 'realty' type_property from public.recruits r -join prop on r.id = prop.recruit_id; - 0 - - N - N - N +join prop on r.id = prop.recruit_id +where +r.system_update_date >= '${UP_D}'; + Y - 480 - 384 - Y + 208 - Table input 2 2 2 + Table input water_vehicles TableInput Y @@ -175,31 +479,29 @@ join prop on r.id = prop.recruit_id; ervu_person_registry + N + 0 with prop as -(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u, +(select jsonb_array_elements(ri.info->'svedVodTS'->'vodTS') u, ri.recruit_id from public.recruits_info ri -where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array') +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' +where jsonb_typeof(ri.info->'svedVodTS'->'vodTS') = '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 + 'water_vehicles' type_property from public.recruits r -join prop on r.id = prop.recruit_id; - 0 - - N - N - N +join prop on r.id = prop.recruit_id +WHERE r.system_update_date >= '${UP_D}'; + Y - - 480 - 464 - Y + 928 + 432 @@ -213,31 +515,27 @@ join prop on r.id = prop.recruit_id; none - ervu-dashboard - ervu_dashboard - property
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + property
+ N + Y + N + Y - 688 - 208 - Y + 80
@@ -251,31 +549,27 @@ join prop on r.id = prop.recruit_id; none - ervu-dashboard - ervu_dashboard - property
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + property
+ N + Y + N + Y - - 688 - 304 - Y + 1136 + 96
@@ -289,31 +583,27 @@ join prop on r.id = prop.recruit_id; none - ervu-dashboard - ervu_dashboard - property
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + property
+ N + Y + N + Y - - 688 - 384 - Y + 1152 + 576
@@ -327,31 +617,27 @@ join prop on r.id = prop.recruit_id; none - ervu-dashboard - ervu_dashboard - property
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + property
+ N + Y + N + Y - - 688 - 464 - Y + 672 + 576
diff --git a/v1_apache-hop dash mapping/info_recruits/prosecution.hpl b/v1_apache-hop dash mapping/info_recruits/prosecution.hpl index 3d19252..0e4aefb 100644 --- a/v1_apache-hop dash mapping/info_recruits/prosecution.hpl +++ b/v1_apache-hop dash mapping/info_recruits/prosecution.hpl @@ -1,3 +1,4 @@ + prosecution @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,9 +23,85 @@ Table input Table output + N + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + recruit_id + recruit_id + + + + = + create_date + create_date + + + ervu_dashboard + prosecution
+ + recruit_id + recruit_id + N + + + authority_name + authority_name + Y + + + close_date + close_date + Y + + + create_date + create_date + Y + + + kind + kind + Y + + + law_point + law_point + Y + + + termination_basis + termination_basis + Y + +
+ N + + + 784 + 304 + +
Table input TableInput @@ -40,10 +114,13 @@ ervu_person_registry + N + 0 with ugol as (select jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') u, ri.recruit_id from public.recruits_info ri +join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' where jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array') select r.id recruit_id, @@ -54,18 +131,13 @@ select u->>'ugolovZakon' law_point, u->>'osnovPrekrashh' termination_basis from public.recruits r -join ugol on r.id = ugol.recruit_id; - 0 - - N - N - N +join ugol on r.id = ugol.recruit_id +where r.system_update_date >= '${UP_D}' + Y - 528 304 - Y @@ -79,31 +151,27 @@ join ugol on r.id = ugol.recruit_id; none - ervu-dashboard - ervu_dashboard - prosecution
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + prosecution
+ N + Y + N + Y - - 736 - 304 - Y + 752 + 144
diff --git a/v1_apache-hop dash mapping/info_recruits/select_delta_time_subpoena.hpl b/v1_apache-hop dash mapping/info_recruits/select_delta_time_subpoena.hpl new file mode 100644 index 0000000..581126d --- /dev/null +++ b/v1_apache-hop dash mapping/info_recruits/select_delta_time_subpoena.hpl @@ -0,0 +1,100 @@ + + + + select_delta_time_subpoena + Y + + + + Normal + + + N + 1000 + 100 + - + 2025/01/10 14:32:39.906 + - + 2025/01/10 14:32:39.906 + + + + + + Table input + Insert / update + N + + + Table input + Copy rows to result + Y + + + + Copy rows to result + RowsToResult + + Y + + 1 + + none + + + + + 768 + 240 + + + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + + + lookup table
+
+ N + + + 768 + 384 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu-dashboard + N + 0 + select max(status_change_date) AS STATUS_CHANGE_DATE +from ervu_dashboard.subpoena + N + + + 464 + 240 + + + + + +
diff --git a/v1_apache-hop dash mapping/info_recruits/spouse.hpl b/v1_apache-hop dash mapping/info_recruits/spouse.hpl index 386dbc9..a3a55dd 100644 --- a/v1_apache-hop dash mapping/info_recruits/spouse.hpl +++ b/v1_apache-hop dash mapping/info_recruits/spouse.hpl @@ -23,7 +23,7 @@ Select values Table output - Y + N Table input @@ -33,7 +33,7 @@ Select values Insert / update - N + Y @@ -54,11 +54,13 @@ = recruit_id recruit_id + = full_name full_name + ervu_dashboard citizen_spouse
@@ -74,7 +76,7 @@ death_az_number - divorce_az_number + death_az_number Y @@ -95,7 +97,7 @@ full_name full_name - Y + N information_excluded @@ -206,6 +208,7 @@ END AS information_excluded, ri.recruit_id FROM public.recruits_info ri + join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}' LEFT JOIN LATERAL ( SELECT jsonb_array_elements(ri.info->'svedSemPolozh'->'suprugi') AS supri WHERE jsonb_typeof(ri.info->'svedSemPolozh'->'suprugi') = 'array' @@ -236,8 +239,10 @@ SELECT divorce_date, information_excluded FROM public.recruits r -JOIN suprug ON r.id = suprug.recruit_id; - N +JOIN suprug ON r.id = suprug.recruit_id +where +r.system_update_date >= '${UP_D}'; + Y 192 diff --git a/v1_apache-hop dash mapping/info_recruits/subpoena.hpl b/v1_apache-hop dash mapping/info_recruits/subpoena.hpl index 22cc79f..7071527 100644 --- a/v1_apache-hop dash mapping/info_recruits/subpoena.hpl +++ b/v1_apache-hop dash mapping/info_recruits/subpoena.hpl @@ -1,3 +1,4 @@ + subpoena @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,9 +23,168 @@ Table input Table output + N + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + subpoena_id + subpoena_id + + + = + status_change_date + status_change_date + + ervu_dashboard + subpoena
+ + subpoena_id + subpoena_id + N + + + status_change_date + status_change_date + N + + + act_number + act_number + Y + + + address + address + Y + + + appearance + appearance + Y + + + appearance_status + appearance_status + Y + + + create_date + create_date + Y + + + delivery_date + delivery_date + Y + + + delivery_fio + delivery_fio + Y + + + delivery_status + delivery_status + Y + + + department_id + department_id + Y + + + fio_commiss + fio_commiss + Y + + + method_delivery + method_delivery + Y + + + method_sending + method_sending + Y + + + number + number + Y + + + recruit_id + recruit_id + Y + + + recruitment_name + recruitment_name + Y + + + send_date + send_date + Y + + + series + series + Y + + + sig_info + sig_info + Y + + + subpoena_reason + subpoena_reason + Y + + + subpoena_status + subpoena_status + Y + + + track_number + track_number + Y + + + visit_date + visit_date + Y + +
+ N + + + 1008 + 400 + +
Table input TableInput @@ -40,8 +197,11 @@ postgres.subpoena + N + 0 SELECT s.id AS subpoena_id, -- идентификатор повестки + s.status_change_date, s.recruit_id, -- идентификатор рекрута s.department_id, -- идентификатор ВК s.series, -- серия повестки @@ -98,18 +258,13 @@ LEFT JOIN public.send_dictionary AS sd 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 + ON sa.subpoena_id = s.id +WHERE s.status_change_date >= '${ST_CH_D}'; + Y - - 208 - 208 - Y + 688 + 400 @@ -123,31 +278,27 @@ LEFT JOIN public.subpoena_appearance AS sa none - ervu-dashboard - ervu_dashboard - subpoena
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + subpoena
+ N + Y + N + Y - - 416 - 208 - Y + 1056 + 688
diff --git a/v1_apache-hop dash mapping/info_recruits/temporary_measure.hpl b/v1_apache-hop dash mapping/info_recruits/temporary_measure.hpl index 9dbe087..1d36358 100644 --- a/v1_apache-hop dash mapping/info_recruits/temporary_measure.hpl +++ b/v1_apache-hop dash mapping/info_recruits/temporary_measure.hpl @@ -1,3 +1,4 @@ + temporary_measure @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -25,9 +23,108 @@ Table input Table output + N + + + Table input + Insert / update Y + + Insert / update + InsertUpdate + + Y + + 1 + + none + + + 100 + ervu-dashboard + + + = + subpoena_id + subpoena_id + + ervu_dashboard + temporary_measures
+ + applied_fact + applied_fact + Y + + + cancel_date + cancel_date + Y + + + decision_date_cancel + decision_date_cancel + Y + + + decision_date_create + decision_date_create + Y + + + decision_number_cancel + decision_number_cancel + Y + + + decision_number_create + decision_number_create + Y + + + recruit_id + recruit_id + Y + + + recruitment_id + recruitment_id + Y + + + recruitment_name + recruitment_name + Y + + + restriction_name + restriction_name + Y + + + status_measure + status_measure + Y + + + subpoena_id + subpoena_id + N + + + type + type + Y + +
+ N + + + 480 + 208 + +
Table input TableInput @@ -40,6 +137,8 @@ postgres.subpoena + N + 0 SELECT rd.subpoena_id, rd.vk_id AS recruitment_id, @@ -81,18 +180,13 @@ LEFT JOIN public.restriction AS rn 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 + ON s.id = rd.subpoena_id +WHERE s.status_change_date >= '${ST_CH_D}' + Y - 208 208 - Y @@ -106,31 +200,27 @@ LEFT JOIN public.subpoena AS s none - ervu-dashboard - ervu_dashboard - temporary_measures
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + temporary_measures
+ N + Y + N + Y - - 416 - 208 - Y + 432 + 400
diff --git a/v1_apache-hop dash mapping/job_general.hwf b/v1_apache-hop dash mapping/job_general.hwf index a195aa8..c8a8cfb 100644 --- a/v1_apache-hop dash mapping/job_general.hwf +++ b/v1_apache-hop dash mapping/job_general.hwf @@ -124,8 +124,6 @@ N N ${PROJECT_HOME}/info_recruits/job_info_recruits.hwf - - Nothing Y @@ -167,15 +165,15 @@ job_recruitments_all job_info_recruits.hwf Y - Y - N + N + Y
job_info_recruits.hwf job_last_recording_date Y - Y - N + N + Y 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 index 133aa3d..1abacc4 100644 --- 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 @@ -1,3 +1,4 @@ + passport_once @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -30,7 +28,7 @@ Table input 2 Table output 2 - Y + N @@ -45,6 +43,8 @@ ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number, ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series, @@ -57,17 +57,11 @@ 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 @@ -82,6 +76,8 @@ where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null; ervu_person_registry + N + 0 select r.id recruit_id, ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number, ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series, @@ -94,17 +90,11 @@ 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 + 528 + 480 @@ -118,31 +108,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null; none - ervu-dashboard - ervu_dashboard - passport
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + passport
+ N + Y + N + Y - 672 208 - Y
@@ -156,31 +142,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null; none - ervu-dashboard - ervu_dashboard - passport
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + passport
+ N + Y + N + Y - - 672 - 304 - Y + 992 + 480
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 index 10347ec..c19a42e 100644 --- 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 @@ -1,3 +1,4 @@ + subpoena_once @@ -6,7 +7,6 @@ Normal - / N @@ -16,8 +16,6 @@ 2024/08/15 14:02:51.713 - 2024/08/15 14:02:51.713 - H4sIAAAAAAAAAAMAAAAAAAAAAAA= - N @@ -40,8 +38,11 @@ postgres.subpoena + N + 0 SELECT s.id AS subpoena_id, -- идентификатор повестки + s.status_change_date, s.recruit_id, -- идентификатор рекрута s.department_id, -- идентификатор ВК s.series, -- серия повестки @@ -99,17 +100,11 @@ 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 @@ -123,31 +118,27 @@ LEFT JOIN public.subpoena_appearance AS sa none - ervu-dashboard - ervu_dashboard - subpoena
1000 - N - N - Y - N - N - - N - Y - N - - Y - N - + ervu-dashboard - + + N + N + N + N + Y + N + ervu_dashboard + N + subpoena
+ N + Y + N + Y - 416 208 - Y
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 e3da18f..89aee4e 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 @@ -179,7 +179,7 @@ Y local N - Y + N Y N 1248 @@ -725,7 +725,7 @@ N DELETE FROM total_registered.reg_mil_cat WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -743,7 +743,8 @@ WHERE recording_date = current_date N DELETE FROM main_dashboard.recruitment_campaign WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') + N N N @@ -760,7 +761,7 @@ WHERE recording_date = current_date N DELETE FROM main_dashboard.total_registered WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -778,7 +779,7 @@ WHERE recording_date = current_date N DELETE FROM main_dashboard.waiting_registration WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -796,7 +797,7 @@ WHERE recording_date = current_date N DELETE FROM recruitment_campaign.subpoenas WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N N @@ -813,7 +814,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.removed_registry WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N N @@ -830,7 +831,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.subpoenas WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -848,7 +849,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.driver_license WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N N @@ -865,7 +866,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.child_minor WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -883,7 +884,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.age WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -901,7 +902,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.marital_status WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -919,7 +920,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.education_level WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N N @@ -936,7 +937,7 @@ WHERE recording_date = current_date N DELETE FROM total_registered.busyness WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N @@ -954,7 +955,7 @@ WHERE recording_date = current_date N DELETE FROM recruitment_campaign.appeals WHERE recording_date = current_date - AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty') + AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region') N N N @@ -1276,7 +1277,7 @@ WHERE recording_date = current_date SQL total_registered.busyness total_registered.busyness(m_c).hpl Y - Y + N Y
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 86ed1b4..29ebfd0 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 @@ -65,11 +65,6 @@ Insert / update (total_registered.marital_status) Y - - Table input - Insert / update (total_registered.busyness) - Y - Table input Insert / update (total_registered.education_level) @@ -83,7 +78,7 @@ Table input Dummy (do nothing) - Y + N Dummy (do nothing) @@ -100,6 +95,11 @@ Insert / update (recruitment_campaign.subpoenas) Y + + Table input + Insert / update (total_registered.busyness) + Y + Dummy (do nothing) 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 c6b850c..25fa502 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 @@ -161,6 +161,16 @@ total_people Y + + convicts + convicts + Y + + + convicts_percent + convicts_percent + Y + Y @@ -240,7 +250,9 @@ WITH ids AS ( -- Преобразуем строковый массив в таблицу UUID - SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id + SELECT unnest(string_to_array(trim(both '{}' from + '${ARR_MC}' + ), ','))::uuid AS recruitment_id ), gender_separations AS ( SELECT 'MALE' AS gender @@ -302,7 +314,6 @@ status_info AS ( ELSE false END ) AS is_working, - -- Проверка на отсутствие сведений о вузе info->'svedVUZ'->>'prOtsSvedVUZ' = '1' AS no_info_vuz, @@ -313,11 +324,12 @@ status_info AS ( info->'svedTrud'->>'prOtsSvedTrud' = '1' AS no_info_work, r.target_recruitment_id AS recruitment_id, r.gender, - r.vu_current_info -> 'isMilitaryRegistered' AS registered + r.vu_current_info -> 'isMilitaryRegistered' AS registered, + r.vu_current_info->>'recruitmentCommercialInfo' AS sidit FROM public.recruits_info ri JOIN public.recruits r ON ri.recruit_id = r.id WHERE (r.vu_current_info -> 'isMilitaryRegistered' = 'true' OR r.vu_current_info -> 'isMilitaryRegistered' = 'false') - AND (r.gender = 'MALE' OR r.gender = 'FEMALE') + AND (r.gender = 'MALE' OR r.gender = 'FEMALE') AND r.current_recruitment_id IS NOT NULL AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids) ), @@ -340,7 +352,10 @@ summary AS ( COUNT(CASE WHEN no_info_vuz AND no_info_college AND no_info_work THEN 1 END) AS no_info, -- Общее количество людей - COUNT(*) AS total_people + COUNT(si.recruitment_id) AS total_people, + + COUNT(CASE WHEN sidit = 'true' THEN 1 END) AS convicts + FROM data_combinations dc LEFT JOIN status_info si ON si.recruitment_id = dc.recruitment_id @@ -356,7 +371,8 @@ summary_all AS ( SUM(study) AS study, SUM(work) AS work, SUM(no_info) AS no_info, - SUM(total_people) AS total_people + SUM(total_people) AS total_people, + SUM(convicts) AS convicts FROM summary GROUP BY recruitment_id, registered ) @@ -369,15 +385,19 @@ SELECT s.work, s.no_info, s.total_people, + s.convicts, -- Процент людей, которые учатся - ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent, + COALESCE(ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS study_percent, -- Процент людей, которые работают - ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent, + COALESCE(ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS work_percent, -- Процент людей, для которых отсутствуют сведения - ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent + COALESCE(ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS no_info_percent, + + COALESCE(ROUND(s.convicts * 100.0 / NULLIF((select sum(convicts) from summary_all), 0), 2), 0.0) AS convicts_percent + FROM summary s UNION ALL SELECT @@ -389,15 +409,17 @@ SELECT sa.work, sa.no_info, sa.total_people, + sa.convicts, -- Процент людей, которые учатся - ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent, + COALESCE(ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS study_percent, -- Процент людей, которые работают - ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent, + COALESCE(ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS work_percent, -- Процент людей, для которых отсутствуют сведения - ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent + COALESCE(ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS no_info_percent, + '0.0' AS convicts_percent FROM summary_all sa Y diff --git a/v1_apache-hop dash mapping/mil_district/total_registered.busyness(m_d).hpl b/v1_apache-hop dash mapping/mil_district/total_registered.busyness(m_d).hpl index 8156158..cae82e6 100644 --- a/v1_apache-hop dash mapping/mil_district/total_registered.busyness(m_d).hpl +++ b/v1_apache-hop dash mapping/mil_district/total_registered.busyness(m_d).hpl @@ -69,7 +69,8 @@ DELETE FROM total_registered.busyness WHERE recording_date = current_date AND schema = 'Region' - AND recruitment_id = '${MD_ID}' + AND recruitment_id = '${MD_ID}' + 368 @@ -98,7 +99,8 @@ WHERE recording_date = current_date DELETE FROM total_registered.busyness WHERE recording_date = current_date AND schema = 'MD_LVL' - AND recruitment_id = '${MD_ID}' + AND recruitment_id = '${MD_ID}' + 1552 @@ -156,25 +158,21 @@ WHERE recording_date = current_date = recruitment_id MD_ID - = schema schema - = "all_M_W" gender - = registered registered - total_registered busyness
@@ -233,6 +231,16 @@ WHERE recording_date = current_date schema N + + convicts + convicts + Y + + + convicts_percent + convicts_percent + Y + Y @@ -309,62 +317,167 @@ WHERE recording_date = current_date ervu-dashboard N 0 - SELECT - CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, - CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, - CASE - WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS study_percent, - CASE - WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS work_percent, + WITH +a AS ( + SELECT + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, - CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, - CASE - WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS not_work_percent, + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, - CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, - '${MD_ID}' AS recruitment_id, - "all_M_W" AS gender, - registered, - 'Region' AS schema -FROM total_registered.busyness -WHERE recruitment_id = ANY ( - string_to_array( - trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ',' - )::uuid[] + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${MD_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND "all_M_W" IN ('M', 'W') + AND schema = 'Organization' + AND recording_date = CURRENT_DATE + GROUP BY "all_M_W", registered +), + +a2 AS ( + SELECT + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, + + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, + + CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${MD_ID}' AS recruitment_id, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND "all_M_W" = 'ALL' + AND schema = 'Organization' + AND recording_date = CURRENT_DATE + GROUP BY registered ) -AND schema = 'Organization' -AND recording_date = CURRENT_DATE -GROUP BY "all_M_W", registered; + +SELECT + a.study, + a.work, + a.convicts, + a.study_percent, + a.work_percent, + a.not_work, + a.not_work_percent, + a.total_people, + a.recruitment_id, + a.gender, + a.registered, + 'Region' AS schema, + COALESCE( + CASE + WHEN a2.convicts > 0 + THEN ROUND((a.convicts / a2.convicts * 100), 2) + ELSE 0 + END, + 0 + ) AS convicts_percent +FROM a +LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered + +UNION ALL + +SELECT + a2.study, + a2.work, + a2.convicts, + a2.study_percent, + a2.work_percent, + a2.not_work, + a2.not_work_percent, + a2.total_people, + a2.recruitment_id, + 'ALL' AS gender, + a2.registered, + 'Region' AS schema, + 0 AS convicts_percent +FROM a2 Y diff --git a/v1_apache-hop dash mapping/ratings/job_ratings.hwf b/v1_apache-hop dash mapping/ratings/job_ratings.hwf index f78272e..69fedd8 100644 --- a/v1_apache-hop dash mapping/ratings/job_ratings.hwf +++ b/v1_apache-hop dash mapping/ratings/job_ratings.hwf @@ -79,19 +79,15 @@ N Y ${PROJECT_HOME}/ratings/ratings.appear_subpoena.hpl - - Basic VK_ARRAY VK_ARRAY_ID - REG_ID RECRUITMENT_REG_ID - Y @@ -226,7 +222,6 @@ ervu-dashboard N delete from ratings.conscription_info where recording_date = current_date - N N N @@ -242,7 +237,6 @@ ervu-dashboard N delete from ratings.consideration_complaint where recording_date = current_date - N N N 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 65e477d..aa10002 100644 --- a/v1_apache-hop dash mapping/region/job_recruitments_region.hwf +++ b/v1_apache-hop dash mapping/region/job_recruitments_region.hwf @@ -80,7 +80,6 @@ ARR_REG ARRAY_REGION - Y
@@ -765,7 +764,6 @@ ARR_REG ARRAY_REGION - Y @@ -853,8 +851,6 @@ N N ${PROJECT_HOME}/region/appeals.review_rating.hpl - - Basic Y @@ -886,14 +882,15 @@ ervu-dashboard N - DELETE FROM main_dashboard.recruitment_campaign + /*DELETE FROM main_dashboard.recruitment_campaign WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 400 + 976 + 1232 @@ -921,14 +918,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM recruitment_campaign.subpoenas + /*DELETE FROM recruitment_campaign.subpoenas WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 592 + 976 + 1424 @@ -956,14 +954,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM main_dashboard.total_registered + /*DELETE FROM main_dashboard.total_registered WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 464 + 976 + 1296 @@ -973,14 +972,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM main_dashboard.waiting_registration + /*DELETE FROM main_dashboard.waiting_registration WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 528 + 976 + 1360 @@ -990,14 +990,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.reg_mil_cat + /*DELETE FROM total_registered.reg_mil_cat WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 656 + 976 + 1488 @@ -1007,14 +1008,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.removed_registry + /*DELETE FROM total_registered.removed_registry WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 720 + 976 + 1552 @@ -1024,14 +1026,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.subpoenas + /*DELETE FROM total_registered.subpoenas WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 784 + 976 + 1616 @@ -1041,14 +1044,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.driver_license + /*DELETE FROM total_registered.driver_license WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 864 + 976 + 1696 @@ -1058,14 +1062,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.child_minor + /*DELETE FROM total_registered.child_minor WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 944 + 976 + 1776 @@ -1075,14 +1080,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.age + /*DELETE FROM total_registered.age WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 1024 + 976 + 1856 @@ -1092,14 +1098,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.marital_status + /*DELETE FROM total_registered.marital_status WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 1104 + 976 + 1936 @@ -1109,14 +1116,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.education_level + /*DELETE FROM total_registered.education_level WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 1184 + 976 + 2016 @@ -1126,14 +1134,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM total_registered.busyness + /*DELETE FROM total_registered.busyness WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 1264 + 976 + 2096 @@ -1143,14 +1152,15 @@ WHERE recording_date = current_date ervu-dashboard N - DELETE FROM recruitment_campaign.appeals + /*DELETE FROM recruitment_campaign.appeals WHERE recording_date = current_date - AND schema = 'Organization' + AND schema = 'Organization'*/ + N N N - 1344 - 1344 + 976 + 2176 @@ -1448,20 +1458,6 @@ WHERE recording_date = current_date Y Y - - job_get_rows_reg.hwf - SQL main_dashboard.recruitment_campaign - Y - Y - N - - - SQL main_dashboard.recruitment_campaign - main_dashboard.recruitment_campaign(reg) - Y - Y - Y - recruitment_campaign.subpoenas(reg) recruitment_campaign.subpoenas @@ -1476,188 +1472,6 @@ WHERE recording_date = current_date Y Y - - job_get_rows_reg.hwf - SQL recruitment_campaign.subpoenas - Y - Y - N - - - SQL recruitment_campaign.subpoenas - recruitment_campaign.subpoenas(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL main_dashboard.total_registered - Y - Y - N - - - SQL main_dashboard.total_registered - main_dashboard.total_registered(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL main_dashboard.waiting_registration - Y - Y - N - - - SQL main_dashboard.waiting_registration - main_dashboard.waiting_registration(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.reg_mil_cat - Y - Y - N - - - SQL total_registered.reg_mil_cat - total_registered.reg_mil_cat(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.removed_registry - Y - Y - N - - - SQL total_registered.removed_registry - total_registered.removed_registry(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.subpoenas - Y - Y - N - - - SQL total_registered.subpoenas - total_registered.subpoenas(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.driver_license - Y - Y - N - - - SQL total_registered.driver_license - total_registered.driver_license(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.child_minor - Y - Y - N - - - SQL total_registered.child_minor - total_registered.child_minor(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.age - Y - Y - N - - - SQL total_registered.age - total_registered.age(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.marital_status - Y - Y - N - - - SQL total_registered.marital_status - total_registered.marital_status(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.education_level - Y - Y - N - - - SQL total_registered.education_level - total_registered.education_level(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL total_registered.busyness - Y - Y - N - - - SQL total_registered.busyness - total_registered.busyness(reg) - Y - Y - Y - - - job_get_rows_reg.hwf - SQL recruitment_campaign.appeals - Y - Y - N - - - SQL recruitment_campaign.appeals - recruitment_campaign.appeals(reg) - Y - Y - Y - main_dashboard.total_registered(reg) main_dashboard.total_registered @@ -1826,6 +1640,104 @@ WHERE recording_date = current_date 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 + + + job_get_rows_reg.hwf + recruitment_campaign.appeals(reg) + Y + Y + N + diff --git a/v1_apache-hop dash mapping/region/main_dashboard.recruitment_campaign(reg).hpl b/v1_apache-hop dash mapping/region/main_dashboard.recruitment_campaign(reg).hpl index 96c13ee..ae13b95 100644 --- a/v1_apache-hop dash mapping/region/main_dashboard.recruitment_campaign(reg).hpl +++ b/v1_apache-hop dash mapping/region/main_dashboard.recruitment_campaign(reg).hpl @@ -306,6 +306,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY spring_autumn; Y diff --git a/v1_apache-hop dash mapping/region/main_dashboard.total_registered(reg).hpl b/v1_apache-hop dash mapping/region/main_dashboard.total_registered(reg).hpl index 3c5ebf5..9ee60f5 100644 --- a/v1_apache-hop dash mapping/region/main_dashboard.total_registered(reg).hpl +++ b/v1_apache-hop dash mapping/region/main_dashboard.total_registered(reg).hpl @@ -278,6 +278,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE; Y diff --git a/v1_apache-hop dash mapping/region/main_dashboard.waiting_registration(reg).hpl b/v1_apache-hop dash mapping/region/main_dashboard.waiting_registration(reg).hpl index 8959ff9..4b0b7ae 100644 --- a/v1_apache-hop dash mapping/region/main_dashboard.waiting_registration(reg).hpl +++ b/v1_apache-hop dash mapping/region/main_dashboard.waiting_registration(reg).hpl @@ -284,6 +284,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE; Y diff --git a/v1_apache-hop dash mapping/region/recruitment_campaign.appeals(reg).hpl b/v1_apache-hop dash mapping/region/recruitment_campaign.appeals(reg).hpl index 0d09469..a4860c4 100644 --- a/v1_apache-hop dash mapping/region/recruitment_campaign.appeals(reg).hpl +++ b/v1_apache-hop dash mapping/region/recruitment_campaign.appeals(reg).hpl @@ -268,6 +268,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY spring_autumn; Y diff --git a/v1_apache-hop dash mapping/region/recruitment_campaign.subpoenas(reg).hpl b/v1_apache-hop dash mapping/region/recruitment_campaign.subpoenas(reg).hpl index 169ea5f..c9ddddb 100644 --- a/v1_apache-hop dash mapping/region/recruitment_campaign.subpoenas(reg).hpl +++ b/v1_apache-hop dash mapping/region/recruitment_campaign.subpoenas(reg).hpl @@ -410,6 +410,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY spring_autumn; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.age(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.age(reg).hpl index 46295b6..dd82217 100644 --- a/v1_apache-hop dash mapping/region/total_registered.age(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.age(reg).hpl @@ -404,6 +404,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY "all_M_W", registered; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.busyness(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.busyness(reg).hpl index 5e59197..8f6da21 100644 --- a/v1_apache-hop dash mapping/region/total_registered.busyness(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.busyness(reg).hpl @@ -88,19 +88,16 @@ = recruitment_id REG_ID - = schema schema - = "all_M_W" gender - total_registered busyness
@@ -159,6 +156,16 @@ schema N + + convicts + convicts + Y + + + convicts_percent + convicts_percent + Y + Y @@ -235,61 +242,164 @@ ervu-dashboard N 0 - SELECT - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS study_percent, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS work_percent, + WITH a AS ( + SELECT + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, - CASE - WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' - THEN 0 - ELSE COALESCE( - CASE - WHEN SUM(busyness) > 0 - THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) - ELSE 0 - END, - 0 - ) - END AS not_work_percent, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${REG_ID}' AS recruitment_id, + "all_M_W" AS gender, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND schema IN ('Department', 'REG_LVL') + AND "all_M_W" IN ('M', 'W') + AND recording_date = CURRENT_DATE + GROUP BY "all_M_W", registered +), +a2 AS ( + SELECT + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(study) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS study_percent, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS work_percent, - CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, - '${REG_ID}' AS recruitment_id, - "all_M_W" AS gender, - registered, - 'Organization' AS schema -FROM total_registered.busyness -WHERE recruitment_id = ANY ( - string_to_array( - trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' - )::uuid[] + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work, + CASE + WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' + THEN 0 + ELSE COALESCE( + CASE + WHEN SUM(busyness) > 0 + THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2) + ELSE 0 + END, + 0 + ) + END AS not_work_percent, + CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people, + '${REG_ID}' AS recruitment_id, + registered + FROM total_registered.busyness + WHERE recruitment_id = ANY ( + string_to_array( + trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' + )::uuid[] + ) + AND schema IN ('Department', 'REG_LVL') + AND "all_M_W" = 'ALL' + AND recording_date = CURRENT_DATE + GROUP BY registered, "all_M_W" ) -AND recording_date = CURRENT_DATE -GROUP BY "all_M_W", registered; + +SELECT + a.study, + a.work, + a.convicts, + a.study_percent, + a.work_percent, + a.not_work, + a.not_work_percent, + a.total_people, + a.recruitment_id, + a.gender, + a.registered, + 'Organization' AS schema, + COALESCE( + CASE + WHEN a2.convicts > 0 + THEN ROUND((a.convicts / a2.convicts * 100), 2) + ELSE 0 + END, + 0 + ) AS convicts_percent +FROM a +LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered + +UNION ALL + +SELECT + a2.study, + a2.work, + a2.convicts, + a2.study_percent, + a2.work_percent, + a2.not_work, + a2.not_work_percent, + a2.total_people, + a2.recruitment_id, + 'ALL' AS gender, + a2.registered, + 'Organization' AS schema, + 0 AS convicts_percent +FROM a2 + Y diff --git a/v1_apache-hop dash mapping/region/total_registered.child_minor(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.child_minor(reg).hpl index a2d8f03..c66de67 100644 --- a/v1_apache-hop dash mapping/region/total_registered.child_minor(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.child_minor(reg).hpl @@ -323,6 +323,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY "all_M_W"; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.driver_license(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.driver_license(reg).hpl index 16ff928..82dcb34 100644 --- a/v1_apache-hop dash mapping/region/total_registered.driver_license(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.driver_license(reg).hpl @@ -341,6 +341,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY "all_M_W"; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.education_level(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.education_level(reg).hpl index f99f09b..44fda10 100644 --- a/v1_apache-hop dash mapping/region/total_registered.education_level(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.education_level(reg).hpl @@ -301,6 +301,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY "all_M_W"; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.marital_status(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.marital_status(reg).hpl index f3ef9cc..427e892 100644 --- a/v1_apache-hop dash mapping/region/total_registered.marital_status(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.marital_status(reg).hpl @@ -254,6 +254,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY "all_M_W"; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.reg_mil_cat(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.reg_mil_cat(reg).hpl index d62ccce..adbb21b 100644 --- a/v1_apache-hop dash mapping/region/total_registered.reg_mil_cat(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.reg_mil_cat(reg).hpl @@ -340,6 +340,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY mil_reg; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.removed_registry(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.removed_registry(reg).hpl index f7088d9..dac6d13 100644 --- a/v1_apache-hop dash mapping/region/total_registered.removed_registry(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.removed_registry(reg).hpl @@ -335,6 +335,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE; Y diff --git a/v1_apache-hop dash mapping/region/total_registered.subpoenas(reg).hpl b/v1_apache-hop dash mapping/region/total_registered.subpoenas(reg).hpl index e36fc08..d01729f 100644 --- a/v1_apache-hop dash mapping/region/total_registered.subpoenas(reg).hpl +++ b/v1_apache-hop dash mapping/region/total_registered.subpoenas(reg).hpl @@ -446,6 +446,7 @@ WHERE recruitment_id = ANY ( trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',' )::uuid[] ) +AND schema IN ('Department', 'REG_LVL') AND recording_date = CURRENT_DATE GROUP BY mil_reg; Y