From e8323dcc91d4e5921d439f7a9c02c214f28878b6 Mon Sep 17 00:00:00 2001 From: Fusionshh Date: Tue, 23 Sep 2025 15:59:44 +0300 Subject: [PATCH] Revert "ERVU-516 : deputy flow" This reverts commit 832ecb21 --- .../recruitment_five_flow_on_error.hpl} | 97 ++-- ...citizen_information_search_flow_delta.hpl} | 347 +++++--------- .../deputy/recruitment_five_flow_delta.hpl | 399 ---------------- .../parallel/recruit_archive_flow.hpl} | 358 +++++++------- .../parallel/recruit_archive_flow_repeat.hpl} | 417 +++++++++-------- ...ividual_entrepreneur_execution_exists.hpl} | 23 +- .../recruitment_five_flow_on_error.hpl} | 390 +++++++++------- .../job_reference_data.hwf} | 442 ++++++++---------- .../property_type.hpl} | 166 ++++--- .../recruit_update_date_ervu_dashboard.hpl | 65 +-- 10 files changed, 1130 insertions(+), 1574 deletions(-) rename mappings/info_recruits/citizen_tables/{deputy/recruitment_five_flow_repeat.hpl => child/recruitment_five_flow_on_error.hpl} (83%) rename mappings/info_recruits/citizen_tables/{deputy/parallel/deputy_flow_repeat.hpl => citizen_information_search/parallel/citizen_information_search_flow_delta.hpl} (57%) delete mode 100644 mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_delta.hpl rename mappings/info_recruits/citizen_tables/{deputy/parallel/deputy_flow.hpl => recruit_archive/parallel/recruit_archive_flow.hpl} (70%) rename mappings/info_recruits/citizen_tables/{deputy/parallel/deputy_flow_delta.hpl => recruit_archive/parallel/recruit_archive_flow_repeat.hpl} (67%) rename mappings/info_recruits/citizen_tables/{deputy/constants/support/check_if_constants_exists.hpl => work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl} (77%) rename mappings/info_recruits/{citizen_tables/deputy/recruitment_five_flow.hpl => raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl} (78%) rename mappings/info_recruits/{citizen_tables/deputy/deputy_job.hwf => reference_data/job_reference_data.hwf} (56%) rename mappings/info_recruits/{citizen_tables/deputy/constants/deputy_constants_flow_repeat.hpl => reference_data/property_type.hpl} (53%) rename mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow.hpl => mappings_new/info_recruits/citizen_tables/citizen_address/recruit_update_date_ervu_dashboard.hpl (61%) diff --git a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/child/recruitment_five_flow_on_error.hpl similarity index 83% rename from mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_repeat.hpl rename to mappings/info_recruits/citizen_tables/child/recruitment_five_flow_on_error.hpl index 4b28dfd..d9d0f7a 100644 --- a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/child/recruitment_five_flow_on_error.hpl @@ -1,7 +1,7 @@ - recruitment_five_flow_repeat + recruitment_five_flow_on_error Y @@ -13,36 +13,36 @@ 1000 100 - - 2025/09/08 20:31:52.575 + 2025/08/05 12:54:50.126 - - 2025/09/08 20:31:52.575 + 2025/08/05 12:54:50.126 Table input - deputy_flow_repeat.hpl + child_flow_repeat.hpl Y Table input - deputy_flow_repeat.hpl 2 + child_flow_repeat.hpl 3 Y Table input - deputy_flow_repeat.hpl 3 + child_flow_repeat.hpl 2 Y Table input - deputy_flow_repeat.hpl 4 + child_flow_repeat.hpl 4 Y Table input - deputy_flow_repeat.hpl 5 + child_flow_repeat.hpl 5 Y @@ -57,25 +57,25 @@ none - ervu-dashboard-test + ervu-dashboard N - 0 - SELECT r.idm_id AS recruitment_id + + SELECT + r.idm_id as recruitment_id FROM ervu_dashboard.recruitment r LEFT JOIN etl.job_execution je ON r.idm_id = je.recruitment_id - AND je.job_name = 'disability_job' -WHERE je.id IS NULL - OR je.status IN ('ERROR', 'PROCESSING'); + and job_name = 'child_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); N - 656 - 464 + 272 + 368 - deputy_flow_repeat.hpl + child_flow_repeat.hpl PipelineExecutor Y @@ -86,7 +86,7 @@ WHERE je.id IS NULL local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow_repeat.hpl N 1 @@ -98,6 +98,11 @@ WHERE je.id IS NULL recruitment_id + + JOB_NAME + + child_job + Y @@ -121,12 +126,12 @@ WHERE je.id IS NULL - 864 - 304 + 464 + 208 - deputy_flow_repeat.hpl 2 + child_flow_repeat.hpl 2 PipelineExecutor Y @@ -137,7 +142,7 @@ WHERE je.id IS NULL local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow_repeat.hpl N 1 @@ -149,6 +154,11 @@ WHERE je.id IS NULL recruitment_id + + JOB_NAME + + child_job + Y @@ -172,12 +182,12 @@ WHERE je.id IS NULL - 864 - 384 + 464 + 288 - deputy_flow_repeat.hpl 3 + child_flow_repeat.hpl 3 PipelineExecutor Y @@ -188,7 +198,7 @@ WHERE je.id IS NULL local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow_repeat.hpl N 1 @@ -200,6 +210,11 @@ WHERE je.id IS NULL recruitment_id + + JOB_NAME + + child_job + Y @@ -223,12 +238,12 @@ WHERE je.id IS NULL - 864 - 464 + 464 + 368 - deputy_flow_repeat.hpl 4 + child_flow_repeat.hpl 4 PipelineExecutor Y @@ -239,7 +254,7 @@ WHERE je.id IS NULL local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow_repeat.hpl N 1 @@ -251,6 +266,11 @@ WHERE je.id IS NULL recruitment_id + + JOB_NAME + + child_job + Y @@ -274,12 +294,12 @@ WHERE je.id IS NULL - 864 - 544 + 464 + 448 - deputy_flow_repeat.hpl 5 + child_flow_repeat.hpl 5 PipelineExecutor Y @@ -290,7 +310,7 @@ WHERE je.id IS NULL local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/citizen_tables/child/parallel/child_flow_repeat.hpl N 1 @@ -302,6 +322,11 @@ WHERE je.id IS NULL recruitment_id + + JOB_NAME + + child_job + Y @@ -325,8 +350,8 @@ WHERE je.id IS NULL - 864 - 624 + 464 + 528 diff --git a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl b/mappings/info_recruits/citizen_tables/citizen_information_search/parallel/citizen_information_search_flow_delta.hpl similarity index 57% rename from mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl rename to mappings/info_recruits/citizen_tables/citizen_information_search/parallel/citizen_information_search_flow_delta.hpl index f07330c..ba10b53 100644 --- a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl +++ b/mappings/info_recruits/citizen_tables/citizen_information_search/parallel/citizen_information_search_flow_delta.hpl @@ -1,7 +1,7 @@ - deputy_flow_repeat + citizen_information_search_flow_delta Y @@ -13,26 +13,26 @@ 1000 100 - - 2025/09/14 15:17:48.470 + 2025/08/11 13:22:56.048 - - 2025/09/14 15:17:48.470 + 2025/08/11 13:22:56.048 - - Block until transforms finish - deputy_flag_update - Y - - - Change job status on error - Abort - Y - Create job execution record - deputy_input + Table input + Y + + + Insert / update + Change job status on error + Y + + + Insert / update + Detect empty stream Y @@ -46,40 +46,40 @@ Y - Identify last row in a stream - Block until transforms finish + Change job status on error + Abort + Y + + + Table input + Insert / update Y Identify last row in a stream - Detect empty stream + Add constants Y - deputy_flag_update - Change job status on error + Add constants + Update Y - deputy_flag_update + Update Filter rows Y - deputy_input - Identify last row in a stream - Y - - - Identify last row in a stream - deputy_upsert - Y - - - deputy_upsert + Update Change job status on error Y + + Insert / update + Identify last row in a stream + Y + Abort @@ -92,18 +92,18 @@ none - ABORT + ABORT_WITH_ERROR Y 0 - 1584 - 784 + 1120 + 384 - Block until transforms finish - BlockUntilTransformsFinish + Add constants + Constant Y @@ -112,16 +112,20 @@ none - - - - deputy_upsert - - + + + -1 + is_wanted + true + -1 + N + Boolean + + - 1056 - 512 + 864 + 608 @@ -147,7 +151,7 @@ Y N UPDATE etl.job_execution -SET status = 'ERROR', +SET status = 'DELTA_ERROR', error_description = ? WHERE job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; @@ -155,8 +159,8 @@ and recruitment_id = '${IDM_ID}'; - 1296 - 784 + 960 + 384 @@ -179,15 +183,16 @@ and recruitment_id = '${IDM_ID}'; N N UPDATE etl.job_execution -SET status = 'SUCCESS' +SET status = 'DELTA_SUCCESS' WHERE job_name = '${JOB_NAME}' -and recruitment_id = '${IDM_ID}'; +and recruitment_id = '${IDM_ID}' +and status = 'DELTA_PROCESSING'; - 1584 - 336 + 1280 + 608 @@ -211,15 +216,15 @@ and recruitment_id = '${IDM_ID}'; N UPDATE etl.job_execution SET - status = 'PROCESSING', - execution_datetime = current_timestamp, + status = 'DELTA_PROCESSING', + execution_datetime = DEFAULT, error_description = NULL where job_name = '${JOB_NAME}' and recruitment_id = '${IDM_ID}'; - 368 - 512 + 128 + 224 @@ -235,8 +240,8 @@ and recruitment_id = '${IDM_ID}'; - 784 - 336 + 1280 + 224 @@ -271,15 +276,15 @@ and recruitment_id = '${IDM_ID}'; Change job status on success - 1584 - 512 + 1072 + 608 Identify last row in a stream DetectLastRow - N + Y 1 @@ -289,16 +294,15 @@ and recruitment_id = '${IDM_ID}'; last_row - 784 - 512 + 752 + 608 -<<<<<<< HEAD:mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow_delta.hpl Insert / update InsertUpdate - Y + N 1 @@ -310,52 +314,52 @@ and recruitment_id = '${IDM_ID}'; = - id - id + recruit_id + recruit_id ervu_dashboard - recruit_archive
- - id - id - N - + citizen_information_search
recruit_id recruit_id N - archivation_reason_id - archivation_reason_id + name_organ_start_search + name_organ_start_search Y - created_at - created_at + article_criminal_code + article_criminal_code Y - updated_at - updated_at + wanted_start_date + wanted_start_date Y - hidden - hidden + wanted_end_date + wanted_end_date Y - recruit_extract_enable - recruit_extract_enable + grounds_stopping_search + grounds_stopping_search + Y + + + name_organ_end_search + name_organ_end_search Y
N - 704 - 352 + 752 + 224
@@ -369,48 +373,44 @@ and recruitment_id = '${IDM_ID}'; none - ervu_person_archive + ervu-dashboard N - - SELECT - id, - recruit_id, - archivation_reason_id, - created_at, - updated_at, - hidden, - recruit_extract_enable, - CASE - WHEN recruit_extract_enable IS true THEN 1 - ELSE 0 - END AS card_in_archive -FROM public.recruit_archive -WHERE '${IDM_ID}' != '' -- Проверка на пустую строку - AND vk_id = '${IDM_ID}' - --AND '${M_R_CR_DATE}'::timestamp >= ri.created_at - AND updated_at >= '${M_RECARCH_UP_DATE}'::timestamp + +SELECT + ri.recruit_id, + ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrg' AS name_organ_start_search, + ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'ugolovZakon' AS article_criminal_code, + TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date, + TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date, + ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search, + ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search +FROM recruits_info ri + JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id +WHERE'${IDM_ID}' != '' + AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= ri.created_at + AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp + AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object' + Y - 544 - 352 + 400 + 224 Update -======= - deputy_flag_update ->>>>>>> 10bcf8dc200fb1b4ce7b6f5b82d5b8cd20b5b935:mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_repeat.hpl Update - Y + N 1 none - 10000 + 1000 ervu-dashboard N @@ -422,144 +422,33 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку ervu_dashboard citizen
- has_deputy_info - has_deputy_info + is_wanted + is_wanted
N - Y + N - 1296 - 512 - -
- - deputy_input - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - WITH filteredData AS (SELECT ri.recruit_id, - ri.info -> 'svedFL' -> 'svedDeputat' -> 'deputat' as deputy_elem - FROM recruits_info ri - WHERE ri.info -> 'svedFL' -> 'svedDeputat' ->> 'deputat' <> 'null' - and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -SELECT fd.recruit_id, - deputy_elem ->> 'id' AS source_id, - to_date(deputy_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, - deputy_elem -> 'extend' ->> 'grazhdUID' AS citizen_unique_id, - deputy_elem ->> 'priznakAktualNaim' AS actual_status_name, - to_date(deputy_elem ->> 'dataIzbran', 'YYYY-MM-DD') AS election_date, - to_date(deputy_elem ->> 'dataOkonch', 'YYYY-MM-DD') AS end_date, - deputy_elem ->> 'prichinaDosrochKod' AS termination_reason_code, - to_date(deputy_elem ->> 'dataDosroch', 'YYYY-MM-DD') AS termination_date, - true as has_deputy_info -FROM filteredData fd; - Y - - - 592 - 512 - - - - deputy_upsert - InsertUpdate - - Y - - 1 - - none - - - 10000 - ervu-dashboard - - - = - source_id - source_id - - ervu_dashboard - deputy
- - recruit_id - recruit_id - N - - - source_id - source_id - N - - - source_update_date - source_update_date - Y - - - citizen_unique_id - citizen_unique_id - Y - - - actual_status_name - actual_status_name - Y - - - election_date - election_date - Y - - - end_date - end_date - Y - - - termination_reason_code - termination_reason_code - Y - - - termination_date - termination_date - Y - -
- N - - - 1056 - 784 + 960 + 608
- deputy_flag_update + Insert / update Change job status on error Y error_description - + error_code - deputy_upsert + Update Change job status on error Y diff --git a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_delta.hpl b/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_delta.hpl deleted file mode 100644 index e9b11e3..0000000 --- a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow_delta.hpl +++ /dev/null @@ -1,399 +0,0 @@ - - - - recruitment_five_flow_delta - Y - - - - Normal - - - N - 1000 - 100 - - - 2025/09/08 20:38:40.987 - - - 2025/09/08 20:38:40.987 - - - - - - Table input - deputy_flow_delta.hpl - Y - - - get_max_source_update_date - Table input - Y - - - Table input - deputy_flow_delta.hpl 2 - Y - - - Table input - deputy_flow_delta.hpl 3 - Y - - - Table input - deputy_flow_delta.hpl 4 - Y - - - Table input - deputy_flow_delta.hpl 5 - Y - - - - Table input - TableInput - - Y - - 1 - - none - - - ervu-dashboard-test - N - 0 - get_max_source_update_date - WITH mud AS ( - SELECT - recruitment_id, - MAX(execution_datetime) AS max_upd_date - FROM etl.job_execution - WHERE job_name = '${JOB_NAME}' - AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING') - GROUP BY recruitment_id -) -SELECT - r.idm_id, - ? max_source_update_date -FROM ervu_dashboard.recruitment r - JOIN mud ON mud.recruitment_id = r.idm_id - JOIN recruits_info ri - ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id - AND ri.updated_at > mud.max_upd_date; - Y - - - 704 - 496 - - - - get_max_source_update_date - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT max(source_update_date) AS max_source_update_date -FROM deputy; - N - - - 528 - 496 - - - - deputy_flow_delta.hpl - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - - MAX_SOURCE_UPDATE_DATE - max_source_update_date - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 896 - 336 - - - - deputy_flow_delta.hpl 2 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - - MAX_SOURCE_UPDATE_DATE - max_source_update_date - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 896 - 416 - - - - deputy_flow_delta.hpl 3 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - - MAX_SOURCE_UPDATE_DATE - max_source_update_date - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 896 - 496 - - - - deputy_flow_delta.hpl 4 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - - MAX_SOURCE_UPDATE_DATE - max_source_update_date - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 896 - 576 - - - - deputy_flow_delta.hpl 5 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - - MAX_SOURCE_UPDATE_DATE - max_source_update_date - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 896 - 656 - - - - - - diff --git a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl b/mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow.hpl similarity index 70% rename from mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl rename to mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow.hpl index 090ee02..f9bc3f4 100644 --- a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl +++ b/mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow.hpl @@ -1,7 +1,7 @@ - deputy_flow + recruit_archive_flow Y @@ -13,21 +13,16 @@ 1000 100 - - 2025/09/08 19:24:20.455 + 2025/08/05 14:31:22.799 - - 2025/09/08 19:24:20.455 + 2025/08/05 14:31:22.799 - - Change job status on error - Abort - Y - Create job execution record - deputy_input + Table input Y @@ -35,49 +30,59 @@ Change job status on success Y - - Identify last row in a stream - Detect empty stream - Y - - - Identify last row in a stream - deputy_output - Y - - - deputy_output - Change job status on error - Y - - - deputy_input - Identify last row in a stream - Y - Detect empty stream Change job status on success Y - deputy_flag_update - Filter rows + Change job status on error + Abort Y - deputy_flag_update - Change job status on error + Table input + Table output + Y + + + Group by + Identify last row in a stream Y Identify last row in a stream - Block until transforms finish + User defined Java expression Y - Block until transforms finish - deputy_flag_update + User defined Java expression + Update + Y + + + Table output + Change job status on error + Y + + + Update + Filter rows + Y + + + Update + Detect empty stream + Y + + + Update + Change job status on error + Y + + + Table output + Group by Y @@ -92,36 +97,13 @@ none - ABORT + ABORT_WITH_ERROR Y 0 - 1504 - 592 - - - - Block until transforms finish - BlockUntilTransformsFinish - - Y - - 1 - - none - - - - - - deputy_output - - - - - 976 - 416 + 1344 + 464 @@ -155,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1216 - 592 + 1344 + 320 @@ -186,8 +168,8 @@ and recruitment_id = '${IDM_ID}'; - 1504 - 240 + 1792 + 176 @@ -216,7 +198,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); 288 - 416 + 320 @@ -232,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 704 - 240 + 1584 + 176 @@ -268,15 +250,50 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1504 - 416 + 1584 + 304 + + + + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_card_in_archive_raw + is_card_in_archive + MAX + + + N + + + recruit_id + + + N + grp + + + 704 + 176 Identify last row in a stream DetectLastRow - N + Y 1 @@ -286,47 +303,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); last_row - 704 - 416 + 896 + 176 - deputy_flag_update - Update - - Y - - 1 - - none - - - 10000 - ervu-dashboard - N - - - = - recruit_id - recruit_id - - ervu_dashboard - citizen
- - has_deputy_info - has_deputy_info - -
- N - Y - - - 1216 - 416 - -
- - deputy_input + Table input TableInput Y @@ -336,34 +318,34 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard + ervu_person_archive N - WITH filteredData AS (SELECT ri.recruit_id, - ri.info -> 'svedFL' -> 'svedDeputat' -> 'deputat' as deputy_elem - FROM recruits_info ri - WHERE ri.info -> 'svedFL' -> 'svedDeputat' ->> 'deputat' <> 'null' - and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' -) -SELECT fd.recruit_id, - deputy_elem ->> 'id' AS source_id, - to_date(deputy_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, - deputy_elem -> 'extend' ->> 'grazhdUID' AS citizen_unique_id, - deputy_elem ->> 'priznakAktualNaim' AS actual_status_name, - to_date(deputy_elem ->> 'dataIzbran', 'YYYY-MM-DD') AS election_date, - to_date(deputy_elem ->> 'dataOkonch', 'YYYY-MM-DD') AS end_date, - deputy_elem ->> 'prichinaDosrochKod' AS termination_reason_code, - to_date(deputy_elem ->> 'dataDosroch', 'YYYY-MM-DD') AS termination_date, - true as has_deputy_info -FROM filteredData fd; + SELECT + id, + recruit_id, + archivation_reason_id, + created_at, + updated_at, + hidden, + recruit_extract_enable, + CASE + WHEN recruit_extract_enable IS true THEN 1 + ELSE 0 + END AS is_card_in_archive +FROM public.recruit_archive +WHERE '${IDM_ID}' != '' -- Проверка на пустую строку + AND vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= created_at + Y - 512 - 416 + 496 + 320 - deputy_output + Table output TableOutput Y @@ -373,44 +355,36 @@ FROM filteredData fd; none - 10000 + 1000 ervu-dashboard + + id + id + recruit_id recruit_id - source_id - source_id + archivation_reason_id + archivation_reason_id - source_update_date - source_update_date + created_at + created_at - citizen_unique_id - citizen_unique_id + updated_at + updated_at - actual_status_name - actual_status_name + hidden + hidden - election_date - election_date - - - end_date - end_date - - - termination_reason_code - termination_reason_code - - - termination_date - termination_date + recruit_extract_enable + recruit_extract_enable N @@ -421,24 +395,86 @@ FROM filteredData fd; N ervu_dashboard Y - deputy
+ recruit_archive
N Y N Y - 976 - 592 + 704 + 320 + +
+ + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + + = + recruit_id + recruit_id + + + ervu_dashboard + citizen
+ + card_in_archive + card_in_archive + +
+ N + Y + + + 1344 + 176 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + card_in_archive + has_card_in_archive_raw == 1 + Boolean + -1 + -1 + + + + + 1120 + 176 - deputy_flag_update + Table output Change job status on error Y - error_description + @@ -446,11 +482,11 @@ FROM filteredData fd; - deputy_output + Update Change job status on error Y - error_description + diff --git a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl b/mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow_repeat.hpl similarity index 67% rename from mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl rename to mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow_repeat.hpl index e9138f6..ef319ec 100644 --- a/mappings/info_recruits/citizen_tables/deputy/parallel/deputy_flow_delta.hpl +++ b/mappings/info_recruits/citizen_tables/recruit_archive/parallel/recruit_archive_flow_repeat.hpl @@ -1,7 +1,7 @@ - deputy_flow_delta + recruit_archive_flow_repeat Y @@ -13,31 +13,16 @@ 1000 100 - - 2025/09/14 15:17:52.106 + 2025/08/08 13:25:52.319 - - 2025/09/14 15:17:52.106 + 2025/08/08 13:25:52.319 - - Block until transforms finish - deputy_flag_update - Y - - - Change job status on error - Abort - Y - Create job execution record - deputy_input - Y - - - Detect empty stream - Change job status on success + Table input Y @@ -46,38 +31,58 @@ Y - Identify last row in a stream - Block until transforms finish + Detect empty stream + Change job status on success Y - Identify last row in a stream - Detect empty stream + Change job status on error + Abort Y - deputy_flag_update - Change job status on error - Y - - - deputy_input + Group by Identify last row in a stream Y Identify last row in a stream - deputy_upsert + User defined Java expression Y - deputy_upsert + User defined Java expression + Update + Y + + + Update + Detect empty stream + Y + + + Update + Filter rows + Y + + + Table input + Insert / update + Y + + + Insert / update + Group by + Y + + + Insert / update Change job status on error Y - deputy_flag_update - Filter rows + Update + Change job status on error Y @@ -92,36 +97,13 @@ none - ABORT + ABORT_WITH_ERROR Y 0 - 1552 - 688 - - - - Block until transforms finish - BlockUntilTransformsFinish - - Y - - 1 - - none - - - - - - deputy_upsert - - - - - 896 - 416 + 1120 + 336 @@ -155,8 +137,8 @@ and recruitment_id = '${IDM_ID}'; - 1136 - 688 + 1120 + 208 @@ -187,7 +169,7 @@ and recruitment_id = '${IDM_ID}'; 1552 - 240 + 80 @@ -209,14 +191,32 @@ and recruitment_id = '${IDM_ID}'; Y N N - INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id) -VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - + INSERT INTO etl.job_execution ( + id, + job_name, + status, + execution_datetime, + error_description, + recruitment_id +) +VALUES ( + DEFAULT, + '${JOB_NAME}', + 'PROCESSING', + DEFAULT, + NULL, + '${IDM_ID}' +) +ON CONFLICT (job_name, recruitment_id) +DO UPDATE SET + status = 'PROCESSING', + execution_datetime = DEFAULT, + error_description = NULL - 208 - 416 + 112 + 208 @@ -232,8 +232,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); - 624 - 240 + 1328 + 80 @@ -268,70 +268,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); Change job status on success - 1552 - 416 + 1328 + 176 - Identify last row in a stream - DetectLastRow - - N - - 1 - - none - - - last_row - - - 624 - 416 - - - - deputy_flag_update - Update - - Y - - 1 - - none - - - 10000 - ervu-dashboard - N - - - = - recruit_id - recruit_id - - - <> - has_deputy_info - has_deputy_info - - ervu_dashboard - citizen
- - has_deputy_info - has_deputy_info - -
- N - Y - - - 1136 - 416 - -
- - deputy_input + Table input TableInput Y @@ -341,35 +283,147 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}'); none - ervu-dashboard + ervu_person_archive N - WITH filteredData AS (SELECT ri.recruit_id, - ri.info -> 'svedFL' -> 'svedDeputat' -> 'deputat' as deputy_elem - FROM recruits_info ri - WHERE ri.info -> 'svedFL' -> 'svedDeputat' ->> 'deputat' <> 'null' - and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}' - and to_date(ri.info -> 'svedFL' -> 'svedDeputat' -> 'deputat' ->> 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}' -) -SELECT fd.recruit_id, - deputy_elem ->> 'id' AS source_id, - to_date(deputy_elem ->> 'dataSved', 'YYYY-MM-DD') AS source_update_date, - deputy_elem -> 'extend' ->> 'grazhdUID' AS citizen_unique_id, - deputy_elem ->> 'priznakAktualNaim' AS actual_status_name, - to_date(deputy_elem ->> 'dataIzbran', 'YYYY-MM-DD') AS election_date, - to_date(deputy_elem ->> 'dataOkonch', 'YYYY-MM-DD') AS end_date, - deputy_elem ->> 'prichinaDosrochKod' AS termination_reason_code, - to_date(deputy_elem ->> 'dataDosroch', 'YYYY-MM-DD') AS termination_date, - true as has_deputy_info -FROM filteredData fd; + SELECT + id, + recruit_id, + archivation_reason_id, + created_at, + updated_at, + hidden, + recruit_extract_enable, + CASE + WHEN recruit_extract_enable IS true THEN 1 + ELSE 0 + END AS card_in_archive +FROM public.recruit_archive +WHERE '${IDM_ID}' != '' -- Проверка на пустую строку + AND vk_id = '${IDM_ID}' + AND '${M_R_CR_DATE}'::timestamp >= created_at + Y - 432 - 416 + 320 + 208 - deputy_upsert + Group by + GroupBy + + Y + + 1 + + none + + + N + N + ${java.io.tmpdir} + + + has_card_in_archive_raw + is_card_in_archive + MAX + + + N + + + recruit_id + + + N + grp + + + 480 + 80 + + + + Identify last row in a stream + DetectLastRow + + Y + + 1 + + none + + + last_row + + + 672 + 80 + + + + Update + Update + + N + + 1 + + none + + + 100 + ervu-dashboard + Y + + + = + recruit_id + recruit_id + + ervu_dashboard + citizen
+ + card_in_archive + card_in_archive + +
+ N + Y + + + 1120 + 80 + +
+ + User defined Java expression + Janino + + Y + + 1 + + none + + + + card_in_archive + has_card_in_archive_raw == 1 + Boolean + -1 + -1 + + + + + 896 + 80 + + + + Insert / update InsertUpdate Y @@ -379,76 +433,67 @@ FROM filteredData fd; none - 10000 + 100 ervu-dashboard = - source_id - source_id + id + id + ervu_dashboard - deputy
+ recruit_archive
+ + id + id + N + recruit_id recruit_id N - source_id - source_id - N - - - source_update_date - source_update_date + archivation_reason_id + archivation_reason_id Y - citizen_unique_id - citizen_unique_id + created_at + created_at Y - actual_status_name - actual_status_name + updated_at + updated_at Y - election_date - election_date + hidden + hidden Y - end_date - end_date - Y - - - termination_reason_code - termination_reason_code - Y - - - termination_date - termination_date + recruit_extract_enable + recruit_extract_enable Y
N - 896 - 688 + 480 + 208
- deputy_flag_update + Update Change job status on error Y - error_description + @@ -456,7 +501,7 @@ FROM filteredData fd; - deputy_upsert + Insert / update Change job status on error Y diff --git a/mappings/info_recruits/citizen_tables/deputy/constants/support/check_if_constants_exists.hpl b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl similarity index 77% rename from mappings/info_recruits/citizen_tables/deputy/constants/support/check_if_constants_exists.hpl rename to mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl index 4b8d046..ad8c141 100644 --- a/mappings/info_recruits/citizen_tables/deputy/constants/support/check_if_constants_exists.hpl +++ b/mappings/info_recruits/citizen_tables/work/individual_entrepreneur/support/check_if_individual_entrepreneur_execution_exists.hpl @@ -1,7 +1,7 @@ - check_if_constants_exists + check_if_individual_entrepreneur_execution_exists Y @@ -13,9 +13,9 @@ 1000 100 - - 2025/09/15 15:58:29.569 + 2025/08/19 08:48:31.859 - - 2025/09/15 15:58:29.569 + 2025/08/19 08:48:31.859 @@ -39,8 +39,8 @@ - constasnts_exists - CONSTANTS_EXISTS + job_executed_flag + JOB_EXECUTED_FLAG PARENT_WORKFLOW @@ -48,7 +48,7 @@ 752 - 224 + 208 @@ -66,14 +66,15 @@ N 0 SELECT EXISTS ( - SELECT 1 - FROM deputy_termination_reason -) constasnts_exists; - Y + SELECT 1 + FROM etl.job_execution + WHERE job_name = 'individual_entrepreneur_job' + ) AS job_executed_flag; + N 464 - 224 + 208 diff --git a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow.hpl b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl similarity index 78% rename from mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow.hpl rename to mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl index cf4aa22..2090737 100644 --- a/mappings/info_recruits/citizen_tables/deputy/recruitment_five_flow.hpl +++ b/mappings/info_recruits/raw_data/restriction_document_item/recruitment_five_flow_on_error.hpl @@ -1,7 +1,7 @@ - recruitment_five_flow + recruitment_five_flow_on_error Y @@ -13,41 +13,41 @@ 1000 100 - - 2025/09/08 19:24:07.006 + 2025/08/05 12:54:50.126 - - 2025/09/08 19:24:07.006 + 2025/08/05 12:54:50.126 - Get all recruitments - deputy_flow.hpl + Table input + restriction_document_item_flow_repeat.hpl Y - Get all recruitments - deputy_flow.hpl 2 + Table input + restriction_document_item_flow_repeat.hpl 2 Y - Get all recruitments - deputy_flow.hpl 3 + Table input + restriction_document_item_flow_repeat.hpl 3 Y - Get all recruitments - deputy_flow.hpl 4 + Table input + restriction_document_item_flow_repeat.hpl 4 Y - Get all recruitments - deputy_flow.hpl 5 + Table input + restriction_document_item_flow_repeat.hpl 5 Y - Get all recruitments + Table input TableInput Y @@ -57,122 +57,25 @@ none - ervu-dashboard-test + ervu-dashboard N - SELECT -idm_id -FROM ervu_dashboard.recruitment; + 0 + SELECT + r.idm_id as recruitment_id +FROM ervu_dashboard.recruitment r + LEFT JOIN etl.job_execution je + ON r.idm_id = je.recruitment_id + and job_name = 'restriction_document_item_job' +where je.status is null or je.status in('ERROR', 'PROCESSING'); N - 560 - 448 - - - - deputy_flow.hpl - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 832 - 288 - - - - deputy_flow.hpl 2 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 832 + 272 368 - deputy_flow.hpl 3 + restriction_document_item_flow_repeat.hpl PipelineExecutor Y @@ -183,7 +86,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl N 1 @@ -192,9 +95,14 @@ FROM ervu_dashboard.recruitment; IDM_ID - idm_id + recruitment_id + + JOB_NAME + + restriction_document_item_job + Y @@ -218,12 +126,180 @@ FROM ervu_dashboard.recruitment; - 832 + 528 + 208 + + + + restriction_document_item_flow_repeat.hpl 2 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 288 + + + + restriction_document_item_flow_repeat.hpl 3 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 + 368 + + + + restriction_document_item_flow_repeat.hpl 4 + PipelineExecutor + + Y + + 1 + + none + + + local + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl + N + + 1 + + + + + IDM_ID + recruitment_id + + + + JOB_NAME + + restriction_document_item_job + + Y + + + ExecutionTime + ExecutionResult + ExecutionNrErrors + ExecutionLinesRead + ExecutionLinesWritten + ExecutionLinesInput + ExecutionLinesOutput + ExecutionLinesRejected + ExecutionLinesUpdated + ExecutionLinesDeleted + ExecutionFilesRetrieved + ExecutionExitStatus + ExecutionLogText + ExecutionLogChannelId + + + FileName + + + + 528 448 - deputy_flow.hpl 4 + restriction_document_item_flow_repeat.hpl 5 PipelineExecutor Y @@ -234,7 +310,7 @@ FROM ervu_dashboard.recruitment; local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl + ${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_repeat.hpl N 1 @@ -243,9 +319,14 @@ FROM ervu_dashboard.recruitment; IDM_ID - idm_id + recruitment_id + + JOB_NAME + + restriction_document_item_job + Y @@ -269,61 +350,10 @@ FROM ervu_dashboard.recruitment; - 832 + 528 528 - - deputy_flow.hpl 5 - PipelineExecutor - - Y - - 1 - - none - - - local - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/parallel/deputy_flow.hpl - N - - 1 - - - - - IDM_ID - idm_id - - - Y - - - ExecutionTime - ExecutionResult - ExecutionNrErrors - ExecutionLinesRead - ExecutionLinesWritten - ExecutionLinesInput - ExecutionLinesOutput - ExecutionLinesRejected - ExecutionLinesUpdated - ExecutionLinesDeleted - ExecutionFilesRetrieved - ExecutionExitStatus - ExecutionLogText - ExecutionLogChannelId - - - FileName - - - - 832 - 608 - - diff --git a/mappings/info_recruits/citizen_tables/deputy/deputy_job.hwf b/mappings/info_recruits/reference_data/job_reference_data.hwf similarity index 56% rename from mappings/info_recruits/citizen_tables/deputy/deputy_job.hwf rename to mappings/info_recruits/reference_data/job_reference_data.hwf index bc35fca..9b96309 100644 --- a/mappings/info_recruits/citizen_tables/deputy/deputy_job.hwf +++ b/mappings/info_recruits/reference_data/job_reference_data.hwf @@ -1,14 +1,14 @@ - deputy_job + job_reference_data Y - - 2025/09/08 16:38:17.982 + 2025/09/12 11:04:42.435 - - 2025/09/08 16:38:17.982 + 2025/09/12 11:04:42.435 @@ -26,12 +26,12 @@ 0 1 N - 112 - 176 + 432 + 352 - check_if_job_execution_exists.hpl + vu_set_reasons.hpl PIPELINE @@ -41,7 +41,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/support/check_if_job_execution_exists.hpl + ${PROJECT_HOME}/info_recruits/reference_data/vu_set_reasons.hpl Basic Y @@ -52,29 +52,12 @@ N Y N - 1056 - 176 + 784 + 160 - employer_job_execution_exists_check - - SIMPLE_EVAL - - boolean - false - equal - equal - N - variable - JOB_EXECUTED_FLAG - N - 1312 - 176 - - - - recruitment_five_flow.hpl + subpoena_status.hpl PIPELINE @@ -84,7 +67,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/recruitment_five_flow.hpl + ${PROJECT_HOME}/info_recruits/reference_data/subpoena_status.hpl Basic Y @@ -94,13 +77,13 @@ N N Y - Y - 1584 - 176 + N + 784 + 224 - recruitment_five_flow_repeat.hpl + subpoena_reason.hpl PIPELINE @@ -110,7 +93,137 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/recruitment_five_flow_repeat.hpl + ${PROJECT_HOME}/info_recruits/reference_data/subpoena_reason.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 288 + + + + sources_recruit.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/reference_data/sources_recruit.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 352 + + + + send_dictionary.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/reference_data/send_dictionary.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 416 + + + + restriction_document_status.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/reference_data/restriction_document_status.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 480 + + + + recruit_archivation_reason.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/reference_data/recruit_archivation_reason.hpl + Basic + + Y + + N + local + N + N + Y + N + 784 + 544 + + + + deferment_reason.hpl + + PIPELINE + + N + N + N + N + N + N + ${PROJECT_HOME}/info_recruits/reference_data/deferment_reason.hpl Basic @@ -123,12 +236,12 @@ N Y N - 1584 - 480 + 784 + 608 - check_if_need_to_repeat.hpl + property_type.hpl PIPELINE @@ -138,7 +251,7 @@ N N N - ${PROJECT_HOME}/info_recruits/citizen_tables/support/check_if_need_to_repeat.hpl + ${PROJECT_HOME}/info_recruits/reference_data/property_type.hpl Basic Y @@ -149,259 +262,74 @@ N Y N - 1312 - 320 - - - - Simple evaluation - - SIMPLE_EVAL - - boolean - true - equal - equal - N - variable - NEED_TO_REPEAT_JOB - N - 1312 - 480 - - - - recruitment_five_flow_delta.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/recruitment_five_flow_delta.hpl - Basic - - Y - - N - local - N - N - Y - N - 1312 - 640 - - - - init_job_name - - SET_VARIABLES - - - - JOB_NAME - CURRENT_WORKFLOW - deputy_job - - - CURRENT_WORKFLOW - N - N - 864 - 176 - - - - check_if_constants_exists.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/constants/support/check_if_constants_exists.hpl - Basic - - Y - - N - local - N - N - Y - N - 256 - 176 - - - - constants_exists - - SIMPLE_EVAL - - boolean - true - equal - equal - N - variable - CONSTANTS_EXISTS - N - 432 - 176 - - - - deputy_constants_flow.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow.hpl - Basic - - Y - - N - local - N - N - Y - N - 624 - 96 - - - - deputy_constants_flow_repeat.hpl - - PIPELINE - - N - N - N - N - N - N - ${PROJECT_HOME}/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow_repeat.hpl - Basic - - Y - - N - local - N - N - Y - N - 624 - 272 + 784 + 672 - - check_if_job_execution_exists.hpl - employer_job_execution_exists_check - Y - Y - N - - - employer_job_execution_exists_check - check_if_need_to_repeat.hpl - Y - N - N - - - check_if_need_to_repeat.hpl - Simple evaluation - Y - Y - N - - - init_job_name - check_if_job_execution_exists.hpl - Y - Y - N - Start - check_if_constants_exists.hpl + vu_set_reasons.hpl Y Y Y - check_if_constants_exists.hpl - constants_exists + Start + subpoena_status.hpl Y Y - N + Y - employer_job_execution_exists_check - recruitment_five_flow.hpl + Start + subpoena_reason.hpl Y Y - N + Y - Simple evaluation - recruitment_five_flow_repeat.hpl + Start + sources_recruit.hpl Y Y - N + Y - Simple evaluation - recruitment_five_flow_delta.hpl - Y - N - N - - - constants_exists - deputy_constants_flow_repeat.hpl + Start + send_dictionary.hpl Y Y - N + Y - constants_exists - deputy_constants_flow.hpl - Y - N - N - - - deputy_constants_flow.hpl - init_job_name + Start + restriction_document_status.hpl Y Y - N + Y - deputy_constants_flow_repeat.hpl - init_job_name + Start + recruit_archivation_reason.hpl Y Y - N + Y + + + Start + deferment_reason.hpl + Y + Y + Y + + + Start + property_type.hpl + Y + Y + Y diff --git a/mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow_repeat.hpl b/mappings/info_recruits/reference_data/property_type.hpl similarity index 53% rename from mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow_repeat.hpl rename to mappings/info_recruits/reference_data/property_type.hpl index 01dec19..97d674c 100644 --- a/mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow_repeat.hpl +++ b/mappings/info_recruits/reference_data/property_type.hpl @@ -1,7 +1,7 @@ - deputy_constants_flow_repeat + property_type Y @@ -13,81 +13,21 @@ 1000 100 - - 2025/09/15 15:51:34.378 + 2025/09/11 17:31:37.874 - - 2025/09/15 15:51:34.378 + 2025/09/11 17:31:37.874 - get_max_termination_reason_update_date - termination_reason_input_filtered - Y - - - termination_reason_input_filtered - termination_reason_upsert + Table input + Insert / update Y - get_max_termination_reason_update_date - TableInput - - Y - - 1 - - none - - - ervu-dashboard - N - 0 - SELECT - max(update_date) as max_update_date -FROM deputy_termination_reason; - - N - - - 256 - 256 - - - - termination_reason_input_filtered - TableInput - - Y - - 1 - - none - - - nsi - N - 0 - get_max_termination_reason_update_date - SELECT - key AS code, - value ->> 'value' AS value, - NOT hidden AS actual, - updated_at as update_date -FROM classifier_records -WHERE code = 'listOfSportsType' - AND updated_at > ?; - N - - - 560 - 256 - - - - termination_reason_upsert + Insert / update InsertUpdate Y @@ -97,7 +37,7 @@ WHERE code = 'listOfSportsType' none - 10000 + 100 ervu-dashboard @@ -106,33 +46,109 @@ WHERE code = 'listOfSportsType' code ervu_dashboard - deputy_termination_reason
+ property_type
code code N - value - value + name + name Y - actual - actual + type + type Y - update_date + created_at + created_at + Y + + + updated_at updated_at Y + + hidden + hidden + Y +
N - 832 - 256 + 688 + 336 + +
+ + Table input + TableInput + + Y + + 1 + + none + + + ervu_nsi + N + 0 + -- недвижимость +SELECT + key AS code, + value->'value' #>> '{}' AS name, + 'realty' AS type, + created_at, + updated_at, + hidden +FROM public.classifier_records where code = 'propertyRealtyTypeOfRight' + +UNION ALL + +-- наземный транспорт +SELECT + key AS code, + value->'value' #>> '{}' AS name, + 'ground_transportation' AS type, + created_at, + updated_at, + hidden +FROM public.classifier_records where code = 'propertyTypeOfVehicles' + +UNION ALL + +-- воздушный транспорт +SELECT + key AS code, + value->'value' #>> '{}' AS name, + 'air_vehicles' AS type, + created_at, + updated_at, + hidden +FROM public.classifier_records where code = 'propertyTypeOfAircraft' + +UNION ALL + +-- водный транспорт +SELECT + key AS code, + value->'value' #>> '{}' AS name, + 'water_vehicles' AS type, + created_at, + updated_at, + hidden +FROM public.classifier_records where code = 'propertyTypeOfWaterTransport' + N + + + 416 + 336 diff --git a/mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow.hpl b/mappings_new/info_recruits/citizen_tables/citizen_address/recruit_update_date_ervu_dashboard.hpl similarity index 61% rename from mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow.hpl rename to mappings_new/info_recruits/citizen_tables/citizen_address/recruit_update_date_ervu_dashboard.hpl index c8923cc..6f63f21 100644 --- a/mappings/info_recruits/citizen_tables/deputy/constants/deputy_constants_flow.hpl +++ b/mappings_new/info_recruits/citizen_tables/citizen_address/recruit_update_date_ervu_dashboard.hpl @@ -1,7 +1,7 @@ - deputy_constants_flow + recruit_update_date_ervu_dashboard Y @@ -13,21 +13,21 @@ 1000 100 - - 2025/09/08 16:43:23.854 + 2025/06/02 14:50:31.833 - - 2025/09/08 16:43:23.854 + 2025/06/02 14:50:31.833 - termination_reason_input - termination_reason_output + Table input + Table output Y - termination_reason_input + Table input TableInput Y @@ -37,25 +37,26 @@ none - nsi + ervu-dashboard N 0 - SELECT - key AS code, - value ->> 'value' AS value, - NOT hidden AS actual, - updated_at -FROM classifier_records -WHERE code = 'deputatDosrochPrichina'; + SELECT + created_at AS system_create_date, + updated_at AS system_update_date, + current_timestamp AS record_created, + 'job_recruits_info' AS workflow +FROM ervu_dashboard.recruits_info +WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.recruits_info) +limit 1 N - 192 - 144 + 896 + 304 - termination_reason_output + Table output TableOutput Y @@ -65,26 +66,10 @@ WHERE code = 'deputatDosrochPrichina'; none - 10000 + 1000 ervu-dashboard - - code - code - - - value - value - - - actual - actual - - - update_date - updated_at - - + N N N @@ -93,9 +78,9 @@ WHERE code = 'deputatDosrochPrichina'; Y N - ervu_dashboard - Y - deputy_termination_reason
+ public + N + recruit_create
N Y @@ -103,8 +88,8 @@ WHERE code = 'deputatDosrochPrichina'; Y - 416 - 144 + 1216 + 304