Revert "ERVU-517 : election_candidate flow"

This reverts commit f5242a17
This commit is contained in:
Fusionshh 2025-09-23 15:59:34 +03:00
parent f3b188dc79
commit 81a2d44fb0
7 changed files with 735 additions and 1392 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>election_candidate_flow</name>
<name>border_crossing_flow</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,31 +13,16 @@
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/08 19:24:20.455</created_date>
<created_date>2025/08/05 14:31:22.799</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/08 19:24:20.455</modified_date>
<modified_date>2025/08/05 14:31:22.799</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>election_candidate_flag_update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record</from>
<to>election_candidate_input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Block until transforms finish</to>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
@ -45,41 +30,61 @@
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>election_candidate_output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_output</from>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_input</from>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -92,35 +97,13 @@
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT</abort_option>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>592</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>deputy_output</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>416</yloc>
<xloc>1328</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -154,8 +137,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>592</yloc>
<xloc>1328</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -185,8 +168,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>240</yloc>
<xloc>1856</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -215,7 +198,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>416</yloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -231,8 +214,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>240</yloc>
<xloc>1536</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -267,15 +250,50 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>416</yloc>
<xloc>1536</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>border_crossed_raw</aggregate>
<subject>is_border_crossed</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>N</distribute>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -285,47 +303,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>416</yloc>
<xloc>880</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flag_update</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>N</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_election_candidate_info</name>
<rename>has_election_candidate_info</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_input</name>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
@ -338,31 +321,28 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH filteredData AS (SELECT ri.recruit_id,
ri.info -> 'svedFL' -> 'svedKandidat' -> 'kandidat' as deputy_elem
FROM recruits_info ri
WHERE ri.info -> 'svedFL' -> 'svedKandidat' ->> 'kandidat' &lt;&gt; '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 ->&gt; 'dataSved', 'YYYY-MM-DD') AS source_update_date,
deputy_elem -> 'extend' ->> 'unikIdentGrazhd' AS citizen_unique_id,
deputy_elem ->> 'priznakAktualNaim' AS actual_status_name,
to_date(deputy_elem ->> 'dataReg', 'YYYY-MM-DD') AS registration_date,
deputy_elem ->> 'prichinaSnyatNaim' AS termination_reason,
to_date(deputy_elem ->> 'dataSnyatKandidat', 'YYYY-MM-DD') AS termination_date,
true as has_election_candidate_info
FROM filteredData fd;</sql>
<sql>SELECT
recruit_id,
(string_agg(elem->>'dataVyezd', ', '))::date as date_crossing,
(string_agg(elem->>'dataVozvrashh', ', '))::date as return_date,
1 as is_border_crossed
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at,
LATERAL jsonb_array_elements(info->'svedFL'->'extend'->'svedPeresechGran') as elem
WHERE jsonb_typeof(info->'svedFL'->'extend'->'svedPeresechGran') = 'array'
AND (elem->>'dataVyezd' IS NOT NULL OR elem->>'dataVozvrashh' IS NOT NULL)
GROUP BY recruit_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>512</xloc>
<yloc>416</yloc>
<xloc>496</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_output</name>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
@ -372,7 +352,7 @@ FROM filteredData fd;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
<field>
@ -380,32 +360,12 @@ FROM filteredData fd;</sql>
<stream_name>recruit_id</stream_name>
</field>
<field>
<column_name>source_id</column_name>
<stream_name>source_id</stream_name>
<column_name>date_crossing</column_name>
<stream_name>date_crossing</stream_name>
</field>
<field>
<column_name>source_update_date</column_name>
<stream_name>source_update_date</stream_name>
</field>
<field>
<column_name>citizen_unique_id</column_name>
<stream_name>citizen_unique_id</stream_name>
</field>
<field>
<column_name>actual_status_name</column_name>
<stream_name>actual_status_name</stream_name>
</field>
<field>
<column_name>registration_date</column_name>
<stream_name>registration_date</stream_name>
</field>
<field>
<column_name>termination_reason</column_name>
<stream_name>termination_reason</stream_name>
</field>
<field>
<column_name>termination_date</column_name>
<stream_name>termination_date</stream_name>
<column_name>return_date</column_name>
<stream_name>return_date</stream_name>
</field>
</fields>
<ignore_errors>N</ignore_errors>
@ -416,36 +376,96 @@ FROM filteredData fd;</sql>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>election_candidate</table>
<table>border_crossing</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>592</yloc>
<xloc>688</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>border_crossed</name>
<rename>border_crossed</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>border_crossed</field_name>
<formula_string>border_crossed_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>election_candidate_flag_update</source_transform>
<source_transform>Table output</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>election_candidate_output</source_transform>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>election_candidate_repeat</name>
<name>border_crossing_flow_repeat</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,26 +13,16 @@
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/14 15:17:48.470</created_date>
<created_date>2025/08/08 13:25:52.319</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/14 15:17:48.470</modified_date>
<modified_date>2025/08/08 13:25:52.319</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Block until transforms finish</from>
<to>election_candidate_flag_update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success</to>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
@ -41,45 +31,60 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Block until transforms finish</to>
<from>Detect empty stream</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>election_candidate_upsert</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_upsert</from>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record</from>
<to>election_candidate_input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -92,35 +97,13 @@
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT</abort_option>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1584</xloc>
<yloc>784</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>deputy_upsert</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>512</yloc>
<xloc>1312</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -154,8 +137,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1296</xloc>
<yloc>784</yloc>
<xloc>1312</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -185,8 +168,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1584</xloc>
<yloc>336</yloc>
<xloc>1776</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -208,17 +191,32 @@ and recruitment_id = '${IDM_ID}';
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET
<sql>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 = current_timestamp,
execution_datetime = DEFAULT,
error_description = NULL
where job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';</sql>
</sql>
<attributes/>
<GUI>
<xloc>368</xloc>
<yloc>512</yloc>
<xloc>272</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -234,8 +232,8 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>336</yloc>
<xloc>1568</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -270,15 +268,50 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1584</xloc>
<yloc>512</yloc>
<xloc>1568</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>border_crossed_raw</aggregate>
<subject>is_border_crossed</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>N</distribute>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -288,49 +321,12 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>512</yloc>
<xloc>864</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flag_update</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>N</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_election_candidate_info</name>
<rename>has_election_candidate_info</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1296</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_upsert</name>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
@ -340,67 +336,41 @@ and recruitment_id = '${IDM_ID}';</sql>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>source_id</field>
<name>source_id</name>
<name2/>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>election_candidate</table>
<table>border_crossing</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>source_id</name>
<rename>source_id</rename>
<update>N</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<name>date_crossing</name>
<rename>date_crossing</rename>
<update>Y</update>
</value>
<value>
<name>citizen_unique_id</name>
<rename>citizen_unique_id</rename>
<update>Y</update>
</value>
<value>
<name>actual_status_name</name>
<rename>actual_status_name</rename>
<update>Y</update>
</value>
<value>
<name>registration_date</name>
<rename>registration_date</rename>
<update>Y</update>
</value>
<value>
<name>termination_reason</name>
<rename>termination_reason</rename>
<update>Y</update>
</value>
<value>
<name>termination_date</name>
<rename>termination_date</rename>
<name>return_date</name>
<rename>return_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>784</yloc>
<xloc>672</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_input</name>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
@ -413,57 +383,93 @@ and recruitment_id = '${IDM_ID}';</sql>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<<<<<<< HEAD:mappings/info_recruits/raw_data/restriction_document_item/parallel/restriction_document_item_flow_delta.hpl
<sql>select
s.recruit_id,
CASE
WHEN rdi.applied_fact is true THEN 1
ELSE 0
END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
rdi.*
from public.restriction_document_item rdi
join public.restriction_document rd on
rd.id = coalesce(rdi.restriction_document_create_id,rdi.restriction_document_cancel_id)
join public.subpoena s on
s.id = rd.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND rd.vk_id = '${IDM_ID}'
AND rdi.updated_at >= '${M_RDI_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
=======
<sql>WITH filteredData AS (SELECT ri.recruit_id,
ri.info -> 'svedFL' -> 'svedKandidat' -> 'kandidat' as deputy_elem
FROM recruits_info ri
WHERE ri.info -> 'svedFL' -> 'svedKandidat' ->> 'kandidat' &lt;&gt; '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' ->> 'unikIdentGrazhd' AS citizen_unique_id,
deputy_elem ->> 'priznakAktualNaim' AS actual_status_name,
to_date(deputy_elem ->> 'dataReg', 'YYYY-MM-DD') AS registration_date,
deputy_elem ->> 'prichinaSnyatNaim' AS termination_reason,
to_date(deputy_elem ->> 'dataSnyatKandidat', 'YYYY-MM-DD') AS termination_date,
true as has_election_candidate_info
FROM filteredData fd;</sql>
>>>>>>> 10bcf8dc200fb1b4ce7b6f5b82d5b8cd20b5b935:mappings/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_repeat.hpl
<sql>SELECT
recruit_id,
(string_agg(elem->>'dataVyezd', ', '))::date as date_crossing,
(string_agg(elem->>'dataVozvrashh', ', '))::date as return_date,
1 as is_border_crossed
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at,
LATERAL jsonb_array_elements(info->'svedFL'->'extend'->'svedPeresechGran') as elem
WHERE jsonb_typeof(info->'svedFL'->'extend'->'svedPeresechGran') = 'array'
AND (elem->>'dataVyezd' IS NOT NULL OR elem->>'dataVozvrashh' IS NOT NULL)
GROUP BY recruit_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>576</xloc>
<yloc>512</yloc>
<xloc>480</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>border_crossed</name>
<rename>border_crossed</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>border_crossed</field_name>
<formula_string>border_crossed_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1088</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>election_candidate_flag_update</source_transform>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -471,11 +477,11 @@ FROM filteredData fd;</sql>
<min_pct_rows/>
</error>
<error>
<source_transform>election_candidate_upsert</source_transform>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -1,16 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>election_candidate_job</name>
<name>job_guardianship</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<workflow_status>0</workflow_status>
<created_user>-</created_user>
<created_date>2025/09/08 16:38:17.982</created_date>
<created_date>2025/06/05 14:27:15.055</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/08 16:38:17.982</modified_date>
<modified_date>2025/06/05 14:27:15.055</modified_date>
<parameters>
</parameters>
<parameter>
<name>M_R_CR_DATE</name>
<default_value>3001-01-01 00:00:00</default_value>
<description/>
</parameter>
<parameter>
<name>M_R_UP_DATE</name>
<default_value/>
<description/>
</parameter>
</parameters>
<actions>
<action>
<name>Start</name>
@ -26,12 +37,12 @@
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>688</xloc>
<yloc>176</yloc>
<xloc>416</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_job_execution_exists.hpl</name>
<name>check_if_citizen_guardianship_job_exists.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
@ -41,7 +52,7 @@
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/support/check_if_job_execution_exists.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/checkpoints/check_if_citizen_guardianship_job_exists.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -52,16 +63,21 @@
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1056</xloc>
<yloc>176</yloc>
<xloc>608</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>employer_job_execution_exists_check</name>
<name>citizen_guardianship_job_exists_check</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
<comparevalue/>
<fieldname/>
<fieldtype>boolean</fieldtype>
<mask/>
<maxvalue/>
<minvalue/>
<successbooleancondition>false</successbooleancondition>
<successcondition>equal</successcondition>
<successnumbercondition>equal</successnumbercondition>
@ -69,12 +85,12 @@
<valuetype>variable</valuetype>
<variablename>JOB_EXECUTED_FLAG</variablename>
<parallel>N</parallel>
<xloc>1312</xloc>
<yloc>176</yloc>
<xloc>880</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>recruitment_five_flow.hpl</name>
<name>recruitments_five_flow.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
@ -84,7 +100,7 @@
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/recruitments_five_flow.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -95,12 +111,12 @@
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>Y</parallel>
<xloc>1584</xloc>
<yloc>176</yloc>
<xloc>1248</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>recruitment_five_flow_repeat.hpl</name>
<name>recruitment_five_flow_on_error.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
@ -110,7 +126,7 @@
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/recruitment_five_flow_on_error.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -121,12 +137,12 @@
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1584</xloc>
<yloc>480</yloc>
<xloc>1120</xloc>
<yloc>512</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_need_to_repeat.hpl</name>
<name>check_if_need_to_repeat_job.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
@ -136,7 +152,7 @@
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/support/check_if_need_to_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/check_if_need_to_repeat_job.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -147,8 +163,8 @@
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1312</xloc>
<yloc>320</yloc>
<xloc>880</xloc>
<yloc>368</yloc>
<attributes_hac/>
</action>
<action>
@ -164,8 +180,8 @@
<valuetype>variable</valuetype>
<variablename>NEED_TO_REPEAT_JOB</variablename>
<parallel>N</parallel>
<xloc>1312</xloc>
<yloc>480</yloc>
<xloc>880</xloc>
<yloc>512</yloc>
<attributes_hac/>
</action>
<action>
@ -179,7 +195,7 @@
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_guardianship/recruitment_five_flow_delta.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -190,69 +206,50 @@
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1312</xloc>
<yloc>640</yloc>
<attributes_hac/>
</action>
<action>
<name>init_job_name</name>
<description/>
<type>SET_VARIABLES</type>
<attributes/>
<fields>
<field>
<variable_name>JOB_NAME</variable_name>
<variable_type>CURRENT_WORKFLOW</variable_type>
<variable_value>election_candidate_job</variable_value>
</field>
</fields>
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
<replacevars>N</replacevars>
<parallel>N</parallel>
<xloc>864</xloc>
<yloc>176</yloc>
<xloc>880</xloc>
<yloc>704</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>check_if_job_execution_exists.hpl</from>
<to>employer_job_execution_exists_check</to>
<from>Start</from>
<to>check_if_citizen_guardianship_job_exists.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>check_if_citizen_guardianship_job_exists.hpl</from>
<to>citizen_guardianship_job_exists_check</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>employer_job_execution_exists_check</from>
<to>check_if_need_to_repeat.hpl</to>
<from>citizen_guardianship_job_exists_check</from>
<to>recruitments_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>citizen_guardianship_job_exists_check</from>
<to>check_if_need_to_repeat_job.hpl</to>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>check_if_need_to_repeat.hpl</from>
<from>check_if_need_to_repeat_job.hpl</from>
<to>Simple evaluation</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>init_job_name</from>
<to>check_if_job_execution_exists.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>employer_job_execution_exists_check</from>
<to>recruitment_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Simple evaluation</from>
<to>recruitment_five_flow_repeat.hpl</to>
<to>recruitment_five_flow_on_error.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
@ -264,13 +261,6 @@
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Start</from>
<to>init_job_name</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops>
<notepads>
</notepads>

View file

@ -1,330 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitment_five_flow</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/08 19:24:07.006</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/08 19:24:07.006</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Get all recruitments</from>
<to>election_candidate_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments</from>
<to>election_candidate_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments</from>
<to>election_candidate_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments</from>
<to>election_candidate_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments</from>
<to>election_candidate_flow.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Get all recruitments</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard-test</connection>
<execute_each_row>N</execute_each_row>
<sql>SELECT
idm_id
FROM ervu_dashboard.recruitment;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flow.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flow.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flow.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flow.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flow.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,399 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitment_five_flow_delta</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/08 20:38:40.987</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/08 20:38:40.987</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>election_candidate_delta.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>get_max_source_update_date</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>election_candidate_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>election_candidate_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>election_candidate_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>election_candidate_delta.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard-test</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>get_max_source_update_date</lookup>
<sql>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;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_delta.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>MAX_SOURCE_UPDATE_DATE</variable>
<field>max_source_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
<name>get_max_source_update_date</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT max(source_update_date) AS max_source_update_date
FROM election_candidate;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>528</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_delta.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>MAX_SOURCE_UPDATE_DATE</variable>
<field>max_source_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_delta.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>MAX_SOURCE_UPDATE_DATE</variable>
<field>max_source_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_delta.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>MAX_SOURCE_UPDATE_DATE</variable>
<field>max_source_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>576</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_delta.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/parallel/election_candidate_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>idm_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>MAX_SOURCE_UPDATE_DATE</variable>
<field>max_source_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
<execution_time_field>ExecutionTime</execution_time_field>
<execution_result_field>ExecutionResult</execution_result_field>
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
<result_rows_target_transform/>
<result_files_target_transform/>
<result_files_file_name_field>FileName</result_files_file_name_field>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>656</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitment_five_flow_repeat</name>
<name>recruitment_five_flow_on_error</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,36 +13,36 @@
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/08 20:31:52.575</created_date>
<created_date>2025/08/05 12:54:50.126</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/08 20:31:52.575</modified_date>
<modified_date>2025/08/05 12:54:50.126</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>recruitment_five_flow_repeat.hpl</to>
<to>property_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>recruitment_five_flow_repeat.hpl 2</to>
<to>property_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>recruitment_five_flow_repeat.hpl 3</to>
<to>property_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>recruitment_five_flow_repeat.hpl 4</to>
<to>property_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>recruitment_five_flow_repeat.hpl 5</to>
<to>property_flow_repeat.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
@ -57,25 +57,25 @@
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard-test</connection>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT r.idm_id AS recruitment_id
<sql>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');</sql>
and job_name = 'property_job'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>656</xloc>
<yloc>464</yloc>
<xloc>272</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>recruitment_five_flow_repeat.hpl</name>
<name>property_flow_repeat.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -86,7 +86,7 @@ WHERE je.id IS NULL
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -98,6 +98,11 @@ WHERE je.id IS NULL
<field>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>property_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
@ -121,12 +126,12 @@ WHERE je.id IS NULL
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>304</yloc>
<xloc>544</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>recruitment_five_flow_repeat.hpl 2</name>
<name>property_flow_repeat.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -137,7 +142,7 @@ WHERE je.id IS NULL
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -149,6 +154,11 @@ WHERE je.id IS NULL
<field>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>property_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
@ -172,12 +182,12 @@ WHERE je.id IS NULL
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>384</yloc>
<xloc>544</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>recruitment_five_flow_repeat.hpl 3</name>
<name>property_flow_repeat.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -188,7 +198,7 @@ WHERE je.id IS NULL
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -200,6 +210,11 @@ WHERE je.id IS NULL
<field>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>property_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
@ -223,12 +238,12 @@ WHERE je.id IS NULL
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>464</yloc>
<xloc>544</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>recruitment_five_flow_repeat.hpl 4</name>
<name>property_flow_repeat.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -239,7 +254,7 @@ WHERE je.id IS NULL
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -251,6 +266,11 @@ WHERE je.id IS NULL
<field>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>property_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
@ -274,12 +294,12 @@ WHERE je.id IS NULL
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>544</yloc>
<xloc>544</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>recruitment_five_flow_repeat.hpl 5</name>
<name>property_flow_repeat.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -290,7 +310,7 @@ WHERE je.id IS NULL
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/recruitment_five_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/property/parallel/property_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -302,6 +322,11 @@ WHERE je.id IS NULL
<field>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>property_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform/>
@ -325,8 +350,8 @@ WHERE je.id IS NULL
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>624</yloc>
<xloc>544</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>election_candidate_delta</name>
<name>recruit_archive_flow_delta</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,26 +13,16 @@
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/09/14 15:17:52.106</created_date>
<created_date>2025/08/11 13:22:56.048</created_date>
<modified_user>-</modified_user>
<modified_date>2025/09/14 15:17:52.106</modified_date>
<modified_date>2025/08/11 13:22:56.048</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Block until transforms finish</from>
<to>election_candidate_flag_update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record</from>
<to>election_candidate_input</to>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
@ -46,38 +36,53 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Block until transforms finish</to>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_input</from>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>election_candidate_upsert</to>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_upsert</from>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>election_candidate_flag_update</from>
<to>Filter rows</to>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
</order>
@ -92,35 +97,13 @@
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT</abort_option>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>deputy_upsert</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>416</yloc>
<xloc>1344</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
@ -146,7 +129,7 @@
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'ERROR',
SET status = 'DELTA_ERROR',
error_description = ?
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
@ -154,8 +137,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1136</xloc>
<yloc>688</yloc>
<xloc>1344</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -178,15 +161,15 @@ and recruitment_id = '${IDM_ID}';
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'SUCCESS'
SET status = 'DELTA_SUCCESS'
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>240</yloc>
<xloc>1760</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
@ -208,14 +191,17 @@ and recruitment_id = '${IDM_ID}';
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</sql>
<sql>UPDATE etl.job_execution
SET
status = 'DELTA_PROCESSING',
execution_datetime = DEFAULT,
error_description = NULL
where job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';</sql>
<attributes/>
<GUI>
<xloc>208</xloc>
<yloc>416</yloc>
<xloc>352</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -231,8 +217,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>240</yloc>
<xloc>1568</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
@ -267,15 +253,50 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>416</yloc>
<xloc>1568</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_card_in_archive_raw</aggregate>
<subject>is_card_in_archive</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>N</distribute>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -285,93 +306,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>416</yloc>
<xloc>896</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_flag_update</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>N</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_election_candidate_info</field>
<name>has_election_candidate_info</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_election_candidate_info</name>
<rename>has_election_candidate_info</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1136</xloc>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH filteredData AS (SELECT ri.recruit_id,
ri.info -> 'svedFL' -> 'svedKandidat' -> 'kandidat' as deputy_elem
FROM recruits_info ri
WHERE ri.info -> 'svedFL' -> 'svedKandidat' ->> 'kandidat' &lt;&gt; 'null'
and COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
and to_date(ri.info -> 'svedFL' -> 'svedKandidat' -> 'kandidat' ->> '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' ->> 'unikIdentGrazhd' AS citizen_unique_id,
deputy_elem ->> 'priznakAktualNaim' AS actual_status_name,
to_date(deputy_elem ->> 'dataReg', 'YYYY-MM-DD') AS registration_date,
deputy_elem ->> 'prichinaSnyatNaim' AS termination_reason,
to_date(deputy_elem ->> 'dataSnyatKandidat', 'YYYY-MM-DD') AS termination_date,
true as has_election_candidate_info
FROM filteredData fd;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
<name>election_candidate_upsert</name>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
@ -381,72 +321,163 @@ FROM filteredData fd;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>source_id</field>
<name>source_id</name>
<name2/>
<field>id</field>
<name>id</name>
</key>
<schema>ervu_dashboard</schema>
<table>election_candidate</table>
<table>recruit_archive</table>
<value>
<name>id</name>
<rename>id</rename>
<update>N</update>
</value>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>archivation_reason_id</name>
<rename>archivation_reason_id</rename>
<update>Y</update>
</value>
<value>
<name>source_id</name>
<rename>source_id</rename>
<name>created_at</name>
<rename>created_at</rename>
<update>Y</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<name>updated_at</name>
<rename>updated_at</rename>
<update>Y</update>
</value>
<value>
<name>citizen_unique_id</name>
<rename>citizen_unique_id</rename>
<name>hidden</name>
<rename>hidden</rename>
<update>Y</update>
</value>
<value>
<name>actual_status_name</name>
<rename>actual_status_name</rename>
<update>Y</update>
</value>
<value>
<name>registration_date</name>
<rename>registration_date</rename>
<update>Y</update>
</value>
<value>
<name>termination_reason</name>
<rename>termination_reason</rename>
<update>Y</update>
</value>
<value>
<name>termination_date</name>
<rename>termination_date</rename>
<name>recruit_extract_enable</name>
<rename>recruit_extract_enable</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>688</yloc>
<xloc>704</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<sql>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_R_UP_DATE}'::timestamp</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>544</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>card_in_archive</name>
<rename>card_in_archive</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>card_in_archive</field_name>
<formula_string>has_card_in_archive_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>election_candidate_flag_update</source_transform>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -454,7 +485,7 @@ FROM filteredData fd;</sql>
<min_pct_rows/>
</error>
<error>
<source_transform>election_candidate_upsert</source_transform>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>