Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Fusionshh 2025-10-15 11:22:55 +03:00
commit 14a2383086
61 changed files with 3514 additions and 954 deletions

View file

@ -320,7 +320,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id,
(string_agg(elem->>'dataVyezd', ', '))::date as date_crossing,
@ -401,16 +400,13 @@ GROUP BY ri.recruit_id;</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>border_crossed</field>
<name>border_crossed</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -434,14 +434,11 @@ ${LIMIT_FW}</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_appealing_violations_fz53</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -474,12 +471,6 @@ ${LIMIT_FW}</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_appealing_violations_fz53</field>
<name>has_appealing_violations_fz53</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -228,7 +228,6 @@
</field>
</fields>
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
<filename/>
<replacevars>N</replacevars>
<parallel>N</parallel>
<xloc>336</xloc>

View file

@ -360,7 +360,6 @@ JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Пров
AND '${M_R_CR_DATE}' >= i.created_at
--AND '${INFRINGEMENT_DATE}'::timestamp &lt;= coalesce(i.updated_at, i.created_at) -- для дельты
WHERE --hidden IS FALSE AND
@ -455,14 +454,11 @@ ${LIMIT_FW}</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_criminal_liability_fz53</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -495,12 +491,6 @@ ${LIMIT_FW}</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_criminal_liability_fz53</field>
<name>has_criminal_liability_fz53</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_criminal_liability_fz53</table>
@ -434,6 +432,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.decision-document-service</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
i.recruit_id,
i.created_at,
@ -468,8 +467,7 @@ and recruitment_id = '${IDM_ID}';</sql>
FROM public.infringement i
JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}'
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at)
--AND '${INFRINGEMENT_DATE}'::timestamp &lt;= coalesce(i.updated_at, i.created_at) -- для дельты
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp
WHERE --hidden IS FALSE AND
i.type = 'CRIMINAL'
@ -495,19 +493,16 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</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_criminal_liability_fz53</field>
<name>has_criminal_liability_fz53</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -21,6 +21,11 @@
<default_value>;</default_value>
<description/>
</parameter>
<parameter>
<name>M_INFR_UP_DATE</name>
<default_value/>
<description/>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<default_value>3001-01-01 00:00:00</default_value>
@ -228,7 +233,6 @@
</field>
</fields>
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
<filename/>
<replacevars>N</replacevars>
<parallel>N</parallel>
<xloc>304</xloc>

View file

@ -105,16 +105,35 @@ LIMIT 1;</sql>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<field>
<column_name>system_create_date</column_name>
<stream_name>system_create_date</stream_name>
</field>
<field>
<column_name>system_update_date</column_name>
<stream_name>system_update_date</stream_name>
</field>
<field>
<column_name>workflow</column_name>
<stream_name>workflow</stream_name>
</field>
<field>
<column_name>record_created</column_name>
<stream_name>record_created</stream_name>
</field>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>public</schema>
<specify_fields>N</specify_fields>
<specify_fields>Y</specify_fields>
<table>recruit_create</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>

View file

@ -449,14 +449,11 @@ ${LIMIT_FW}</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_liability_fz53</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -489,12 +486,6 @@ ${LIMIT_FW}</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_liability_fz53</field>
<name>has_liability_fz53</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_liability_fz53</table>
@ -439,6 +437,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.decision-document-service</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
i.recruit_id,
i.created_at,
@ -472,8 +471,7 @@ and recruitment_id = '${IDM_ID}';</sql>
FROM public.infringement i
JOIN public.recruit r ON r.id = i.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(r.current_recruitment, r.target_recruitment) = '${IDM_ID}'
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp --coalesce(i.updated_at,i.created_at)
--AND '${INFRINGEMENT_DATE}'::timestamp &lt;= coalesce(i.updated_at, i.created_at) -- для дельты
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp
WHERE -- hidden IS FALSE AND
type = 'ADMINISTRATIVE'
@ -499,19 +497,16 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</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_liability_fz53</field>
<name>has_liability_fz53</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -23,13 +23,28 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Copy rows to result</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +59,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>944</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
@ -62,7 +77,7 @@
<fields>
<field>
<default_value/>
<field_name>MAX_INFRINGEMENT_UPDATE_DATE</field_name>
<field_name>max_infringement_update_date</field_name>
<variable_name>M_INFR_UP_DATE</variable_name>
<variable_type>GP_WORKFLOW</variable_type>
</field>
@ -92,8 +107,7 @@
system_update_date AS MAX_INFRINGEMENT_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'infringement_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'infringement_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +117,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_INFR_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -320,7 +320,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select
ri.recruit_id,
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
@ -408,14 +407,11 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizenship</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -440,16 +436,13 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>acquired_citizenship</field>
<name>acquired_citizenship</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -325,7 +325,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH base AS (
SELECT
ri.recruit_id,
@ -437,14 +436,11 @@ FROM citizen</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizenship_foreign</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -469,21 +465,13 @@ FROM citizen</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_residence</field>
<name>has_foreign_residence</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_citizenship</field>
<name>has_foreign_citizenship</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -402,7 +402,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH base AS (
SELECT
ri.recruit_id,
@ -484,21 +483,13 @@ FROM citizen</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_residence</field>
<name>has_foreign_residence</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_citizenship</field>
<name>has_foreign_citizenship</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -348,13 +348,11 @@ DO UPDATE SET
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>type</field>
<name>type</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizenship_foreign</table>
@ -419,7 +417,6 @@ DO UPDATE SET
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH base AS (
SELECT
ri.recruit_id,
@ -494,21 +491,13 @@ FROM citizen</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_residence</field>
<name>has_foreign_residence</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_foreign_citizenship</field>
<name>has_foreign_citizenship</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -449,14 +449,11 @@ WHERE d.type_code = '2' -- освобождение</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>deferment_liberation</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -489,18 +486,6 @@ WHERE d.type_code = '2' -- освобождение</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_liberation</field>
<name>has_liberation</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_deferment</field>
<name>has_deferment</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -333,7 +333,6 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>deferment_id</field>
<name>deferment_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>deferment_liberation</table>
@ -489,18 +488,6 @@ WHERE d.type_code = '2' -- освобождение</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_liberation</field>
<name>has_liberation</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_deferment</field>
<name>has_deferment</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -348,7 +348,6 @@ DO UPDATE SET
<condition>=</condition>
<field>deferment_id</field>
<name>deferment_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>deferment_liberation</table>
@ -504,18 +503,6 @@ WHERE d.type_code = '2' -- освобождение</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_liberation</field>
<name>has_liberation</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_deferment</field>
<name>has_deferment</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>912</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
@ -127,6 +137,31 @@ from base</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_RECDEF_UP_DATE}
${M_DEFDEC_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1440</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -420,14 +420,11 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>deferment_liberation</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -460,12 +457,6 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>defer_conscription</field>
<name>defer_conscription</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -325,7 +325,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base AS (
SELECT
@ -475,14 +474,11 @@ FROM all_data</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>drivers_licence</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -507,21 +503,13 @@ FROM all_data</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>tractor_license</field>
<name>tractor_license</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_driver_license</field>
<name>has_driver_license</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -422,7 +422,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base AS (
SELECT
@ -538,21 +537,13 @@ FROM all_data</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>tractor_license</field>
<name>tractor_license</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_driver_license</field>
<name>has_driver_license</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -348,19 +348,16 @@ DO UPDATE SET
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>tractor_driver</field>
<name>tractor_driver</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>driver</field>
<name>driver</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>drivers_licence</table>
@ -440,7 +437,6 @@ DO UPDATE SET
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base AS (
SELECT
@ -541,21 +537,13 @@ FROM all_data</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>tractor_license</field>
<name>tractor_license</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_driver_license</field>
<name>has_driver_license</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -0,0 +1,386 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>inn_job</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/08/05 12:45:28.561</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 12:45:28.561</modified_date>
<parameters>
<parameter>
<name>COMMENT</name>
<default_value> </default_value>
<description/>
</parameter>
<parameter>
<name>LIMIT_FW</name>
<default_value>;</default_value>
<description/>
</parameter>
<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>0001-01-01 00:00:00</default_value>
<description/>
</parameter>
</parameters>
<actions>
<action>
<name>Start</name>
<description/>
<type>SPECIAL</type>
<attributes/>
<DayOfMonth>1</DayOfMonth>
<hour>12</hour>
<intervalMinutes>60</intervalMinutes>
<intervalSeconds>0</intervalSeconds>
<minutes>0</minutes>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>144</xloc>
<yloc>304</yloc>
<attributes_hac/>
</action>
<action>
<name>inn_job_exists_check</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
<fieldtype>boolean</fieldtype>
<successbooleancondition>false</successbooleancondition>
<successcondition>equal</successcondition>
<successnumbercondition>equal</successnumbercondition>
<successwhenvarset>N</successwhenvarset>
<valuetype>variable</valuetype>
<variablename>JOB_EXECUTED_FLAG</variablename>
<parallel>N</parallel>
<xloc>688</xloc>
<yloc>304</yloc>
<attributes_hac/>
</action>
<action>
<name>recruitments_five_flow.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<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/inn/recruitments_five_flow.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>Y</parallel>
<xloc>928</xloc>
<yloc>304</yloc>
<attributes_hac/>
</action>
<action>
<name>recruitment_five_flow_on_error.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<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/inn/recruitment_five_flow_on_error.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>928</xloc>
<yloc>608</yloc>
<attributes_hac/>
</action>
<action>
<name>Simple evaluation</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
<fieldtype>boolean</fieldtype>
<successbooleancondition>true</successbooleancondition>
<successcondition>equal</successcondition>
<successnumbercondition>equal</successnumbercondition>
<successwhenvarset>N</successwhenvarset>
<valuetype>variable</valuetype>
<variablename>NEED_TO_REPEAT_JOB</variablename>
<parallel>N</parallel>
<xloc>688</xloc>
<yloc>608</yloc>
<attributes_hac/>
</action>
<action>
<name>recruitment_five_flow_delta.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<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/inn/recruitment_five_flow_delta.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>688</xloc>
<yloc>800</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_job_execution_exists.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<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>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>464</xloc>
<yloc>304</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_need_to_repeat.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<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>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>688</xloc>
<yloc>448</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>inn_job</variable_value>
</field>
</fields>
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
<replacevars>N</replacevars>
<parallel>N</parallel>
<xloc>272</xloc>
<yloc>304</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>inn_job_exists_check</from>
<to>recruitments_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Simple evaluation</from>
<to>recruitment_five_flow_on_error.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Simple evaluation</from>
<to>recruitment_five_flow_delta.hpl</to>
<enabled>Y</enabled>
<evaluation>N</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>Start</from>
<to>init_job_name</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>check_if_job_execution_exists.hpl</from>
<to>inn_job_exists_check</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>inn_job_exists_check</from>
<to>check_if_need_to_repeat.hpl</to>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>check_if_need_to_repeat.hpl</from>
<to>Simple evaluation</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
<notepad>
<backgroundcolorblue>251</backgroundcolorblue>
<backgroundcolorgreen>232</backgroundcolorgreen>
<backgroundcolorred>201</backgroundcolorred>
<bordercolorblue>90</bordercolorblue>
<bordercolorgreen>58</bordercolorgreen>
<bordercolorred>14</bordercolorred>
<fontbold>N</fontbold>
<fontcolorblue>90</fontcolorblue>
<fontcolorgreen>58</fontcolorgreen>
<fontcolorred>14</fontcolorred>
<fontitalic>N</fontitalic>
<fontsize>-1</fontsize>
<height>26</height>
<xloc>800</xloc>
<yloc>256</yloc>
<note>Первичка</note>
<width>65</width>
</notepad>
<notepad>
<backgroundcolorblue>251</backgroundcolorblue>
<backgroundcolorgreen>232</backgroundcolorgreen>
<backgroundcolorred>201</backgroundcolorred>
<bordercolorblue>90</bordercolorblue>
<bordercolorgreen>58</bordercolorgreen>
<bordercolorred>14</bordercolorred>
<fontbold>N</fontbold>
<fontcolorblue>90</fontcolorblue>
<fontcolorgreen>58</fontcolorgreen>
<fontcolorred>14</fontcolorred>
<fontitalic>N</fontitalic>
<fontsize>-1</fontsize>
<height>26</height>
<xloc>800</xloc>
<yloc>560</yloc>
<note>Повторка</note>
<width>64</width>
</notepad>
<notepad>
<backgroundcolorblue>251</backgroundcolorblue>
<backgroundcolorgreen>232</backgroundcolorgreen>
<backgroundcolorred>201</backgroundcolorred>
<bordercolorblue>90</bordercolorblue>
<bordercolorgreen>58</bordercolorgreen>
<bordercolorred>14</bordercolorred>
<fontbold>N</fontbold>
<fontcolorblue>90</fontcolorblue>
<fontcolorgreen>58</fontcolorgreen>
<fontcolorred>14</fontcolorred>
<fontitalic>N</fontitalic>
<fontsize>-1</fontsize>
<height>26</height>
<xloc>608</xloc>
<yloc>720</yloc>
<note>Дельта</note>
<width>49</width>
</notepad>
<notepad>
<backgroundcolorblue>251</backgroundcolorblue>
<backgroundcolorgreen>232</backgroundcolorgreen>
<backgroundcolorred>201</backgroundcolorred>
<bordercolorblue>90</bordercolorblue>
<bordercolorgreen>58</bordercolorgreen>
<bordercolorred>14</bordercolorred>
<fontbold>N</fontbold>
<fontcolorblue>90</fontcolorblue>
<fontcolorgreen>58</fontcolorgreen>
<fontcolorred>14</fontcolorred>
<fontitalic>N</fontitalic>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>150</height>
<xloc>1200</xloc>
<yloc>80</yloc>
<note>inn_job
M_R_UP_DATE
M_R_CR_DATE
0001-01-01 00:00:00
3001-01-01 00:00:00</note>
<width>114</width>
</notepad>
</notepads>
<attributes/>
</workflow>

View file

@ -0,0 +1,377 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>inn_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/08/05 14:31:22.799</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 14:31:22.799</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<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>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Table output inn</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output inn</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output inn</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output inn</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
<type>Abort</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>error_description</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'ERROR',
error_description = ?
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on success</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'SUCCESS'
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>Create job execution record</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<quoteString>N</quoteString>
<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>
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Filter rows</name>
<type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compare>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>last_row</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>Y</text>
<type>Boolean</type>
</value>
</condition>
</compare>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>768</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>N</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
base as (
SELECT
ri.recruit_id,
ri.info
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
true as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
UNION ALL
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'inn'->'predINN'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
false as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>496</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table output inn</name>
<type>TableOutput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
<field>
<column_name>recruit_id</column_name>
<stream_name>recruit_id</stream_name>
</field>
<field>
<column_name>inn</column_name>
<stream_name>inn</stream_name>
</field>
<field>
<column_name>actual</column_name>
<stream_name>actual</stream_name>
</field>
<field>
<column_name>source_update_date</column_name>
<stream_name>source_update_date</stream_name>
</field>
<field>
<column_name>source_id</column_name>
<stream_name>source_id</stream_name>
</field>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>inn</table>
<tablename_field/>
<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>1024</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Table output inn</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,410 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>inn_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/08/11 13:22:56.048</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/11 13:22:56.048</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</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>Identify last row in a stream</from>
<to>Insert / update inn</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
<type>Abort</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>error_description</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'DELTA_ERROR',
error_description = ?
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on success</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'DELTA_SUCCESS'
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1408</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>Create job execution record</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<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>336</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1408</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Filter rows</name>
<type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compare>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>last_row</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>Y</text>
<type>Boolean</type>
</value>
</condition>
</compare>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>816</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update inn</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>source_id</field>
<name>source_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>inn</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>inn</name>
<rename>inn</rename>
<update>Y</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<update>Y</update>
</value>
<value>
<name>source_id</name>
<rename>source_id</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>N</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 base AS (
SELECT
ri.recruit_id,
ri.info,
ri.info->'svedFL'->'svedBS'->'inn'->'aktINN' AS akt_inn,
ri.info->'svedFL'->'svedBS'->'inn'->'predINN' AS pred_inn
FROM ervu_dashboard.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 (
(
(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved') IS NOT NULL
AND to_date(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
)
OR
(
(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved') IS NOT NULL
AND to_date(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
)
)
),
inn_data AS (
SELECT
recruit_id,
akt_inn->>'id' AS source_id,
to_date(akt_inn->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(akt_inn->>'inn', '[^0-9]', '', 'g') AS inn,
true AS actual,
'aktINN' AS inn_type
FROM base
WHERE
(akt_inn->>'dataSved') IS NOT NULL
AND to_date(akt_inn->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(akt_inn->>'inn', '[^0-9]', '', 'g')) = 12
UNION ALL
SELECT
recruit_id,
pred_inn->>'id' AS source_id,
to_date(pred_inn->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(pred_inn->>'inn', '[^0-9]', '', 'g') AS inn,
false AS actual,
'predINN' AS inn_type
FROM base
WHERE
(pred_inn->>'dataSved') IS NOT NULL
AND to_date(pred_inn->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(pred_inn->>'inn', '[^0-9]', '', 'g')) = 12
)
SELECT
recruit_id,
source_id,
source_update_date,
inn,
actual
FROM inn_data;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>544</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update inn</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>snils_inn_flow</name>
<name>inn_flow_repeat</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,9 +13,9 @@
<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/08/05 14:31:22.799</created_date>
<created_date>2025/08/08 13:25:52.319</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 14:31:22.799</modified_date>
<modified_date>2025/08/08 13:25:52.319</modified_date>
</info>
<notepads>
</notepads>
@ -25,6 +25,11 @@
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success</to>
@ -40,26 +45,6 @@
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update snils</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update snils</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update snils</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update inn</to>
@ -67,7 +52,17 @@
</hop>
<hop>
<from>Insert / update inn</from>
<to>Insert / update snils</to>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
</order>
@ -87,8 +82,8 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>512</yloc>
<xloc>1296</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -122,8 +117,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>512</yloc>
<xloc>1008</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -153,8 +148,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>160</yloc>
<xloc>1440</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
@ -176,14 +171,32 @@ 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>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
</sql>
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>320</yloc>
<xloc>272</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -199,8 +212,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>320</yloc>
<xloc>1440</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -235,8 +248,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>160</yloc>
<xloc>1008</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
@ -254,7 +267,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>320</yloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -273,14 +286,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>inn</field>
<name/>
<field>source_id</field>
<name>source_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -305,68 +312,17 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<rename>source_update_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update snils</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>snils</field>
<name/>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>snils</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<name>source_id</name>
<rename>source_id</rename>
<update>N</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>320</yloc>
<xloc>1008</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -393,33 +349,11 @@ base as (
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
null as inn,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
true AS actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
UNION ALL
SELECT
recruit_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
null as inn,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
false AS actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
UNION ALL
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
null as snils,
true as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
@ -428,24 +362,22 @@ UNION ALL
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'inn'->'predINN'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
null as snils,
false as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
${LIMIT_FW}</sql>
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>496</xloc>
<yloc>320</yloc>
<xloc>480</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update snils</source_transform>
<source_transform>Insert / update inn</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>

View file

@ -0,0 +1,397 @@
<?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/08/11 13:16:11.204</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/11 13:16:11.204</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>inn_flow_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>inn_flow_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_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</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<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
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>352</xloc>
<yloc>288</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) FROM ervu_dashboard.inn
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>128</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_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/inn/parallel/inn_flow_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>592</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_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/inn/parallel/inn_flow_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>592</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_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/inn/parallel/inn_flow_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>608</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_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/inn/parallel/inn_flow_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>608</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_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/inn/parallel/inn_flow_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>608</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,335 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitment_five_flow_on_error</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/08/05 12:54:50.126</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 12:54:50.126</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>inn_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>inn_flow_repeat.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</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<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 job_name = 'snils_inn_job'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_repeat.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/inn/parallel/inn_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_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>560</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_repeat.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/inn/parallel/inn_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_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>576</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_repeat.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/inn/parallel/inn_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_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>576</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_repeat.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/inn/parallel/inn_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_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>576</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>inn_flow_repeat.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/inn/parallel/inn_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_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>576</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,348 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitments_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/04/18 09:48:01.970</created_date>
<modified_user>-</modified_user>
<modified_date>2025/04/18 09:48:01.970</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>inn_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>inn_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>inn_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>inn_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>inn_flow.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Get all recruitments ordered by created_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
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>inn_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/inn/parallel/inn_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment</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>720</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>inn_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/inn/parallel/inn_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment</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>736</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>inn_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/inn/parallel/inn_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment</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>720</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>inn_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/inn/parallel/inn_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment</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>720</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>inn_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/inn/parallel/inn_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
<group_field/>
<group_time/>
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment</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>720</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -340,7 +340,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as(
SELECT
@ -640,36 +639,13 @@ from all_data</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_property</field>
<name>has_property</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_ground_transport</field>
<name>has_ground_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_air_transport</field>
<name>has_air_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_water_transport</field>
<name>has_water_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_possibility_reg_residence</field>
<name>has_possibility_reg_residence</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -66,10 +66,30 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<from>Update 2</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Update 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update 5</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
@ -80,6 +100,26 @@
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
@ -102,7 +142,7 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1392</xloc>
<xloc>1648</xloc>
<yloc>528</yloc>
</GUI>
</transform>
@ -137,7 +177,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1392</xloc>
<xloc>1648</xloc>
<yloc>352</yloc>
</GUI>
</transform>
@ -168,7 +208,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1872</xloc>
<xloc>2128</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -217,7 +257,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1632</xloc>
<xloc>1888</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -253,7 +293,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1632</xloc>
<xloc>1888</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -447,7 +487,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as(
SELECT
@ -646,82 +685,6 @@ FROM all_data</sql>
<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>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_property</field>
<name>has_property</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_ground_transport</field>
<name>has_ground_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_air_transport</field>
<name>has_air_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_water_transport</field>
<name>has_water_transport</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_possibility_reg_residence</field>
<name>has_possibility_reg_residence</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
<value>
<name>has_possibility_reg_residence</name>
<rename>has_possibility_reg_residence</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
@ -775,7 +738,207 @@ FROM all_data</sql>
</formula>
<attributes/>
<GUI>
<xloc>1168</xloc>
<xloc>1152</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>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_possibility_reg_residence</field>
<name>has_possibility_reg_residence</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_possibility_reg_residence</name>
<rename>has_possibility_reg_residence</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1696</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 2</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>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_water_transport</field>
<name>has_water_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1600</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 3</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>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_air_transport</field>
<name>has_air_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 4</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>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_ground_transport</field>
<name>has_ground_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1408</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 5</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>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_property</field>
<name>has_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -804,6 +967,54 @@ FROM all_data</sql>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 2</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 3</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 4</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 5</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -375,7 +375,7 @@ SELECT recruit_id,
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
ELSE punishment_info ->> 'kodIzmSrokNakaz'
END AS sentence_changed, -- Признак изменения срока
string_agg(law_articles, ', ') AS law_point, -- Статьи УК
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
-- Блок "Сведения об отбывании наказания"
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
@ -525,25 +525,21 @@ GROUP BY recruit_id, punishment_info;</sql>
<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_punishment_execution_info</field>
<name>has_punishment_execution_info</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_sentence_info</field>
<name>has_sentence_info</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -502,6 +502,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH punishment_data AS (
SELECT ri.recruit_id,
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info
@ -526,7 +527,7 @@ SELECT recruit_id,
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
ELSE punishment_info ->> 'kodIzmSrokNakaz'
END AS sentence_changed, -- Признак изменения срока
string_agg(law_articles, ', ') AS law_point, -- Статьи УК
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
-- Блок "Сведения об отбывании наказания"
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
@ -566,25 +567,21 @@ GROUP BY recruit_id, punishment_info;</sql>
<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_punishment_execution_info</field>
<name>has_punishment_execution_info</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_sentence_info</field>
<name>has_sentence_info</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -497,6 +497,7 @@ DO UPDATE SET
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH punishment_data AS (
SELECT ri.recruit_id,
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info
@ -520,7 +521,7 @@ SELECT recruit_id,
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
ELSE punishment_info ->> 'kodIzmSrokNakaz'
END AS sentence_changed, -- Признак изменения срока
string_agg(law_articles, ', ') AS law_point, -- Статьи УК
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
-- Блок "Сведения об отбывании наказания"
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
@ -560,25 +561,21 @@ GROUP BY recruit_id, punishment_info;</sql>
<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_punishment_execution_info</field>
<name>has_punishment_execution_info</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_sentence_info</field>
<name>has_sentence_info</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -391,14 +391,11 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>recruit_archive</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -431,12 +428,6 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>card_in_archive</field>
<name>card_in_archive</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>

View file

@ -328,7 +328,6 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruit_archive</table>
@ -388,6 +387,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
id,
recruit_id,
@ -403,8 +403,7 @@ and recruitment_id = '${IDM_ID}';</sql>
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>
AND updated_at >= '${M_RECARCH_UP_DATE}'::timestamp</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -426,19 +425,16 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>card_in_archive</field>
<name>card_in_archive</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -41,13 +41,11 @@
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
created_at AS system_create_date,
updated_at AS system_update_date,
COALESCE(MAX(created_at), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(updated_at), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'recruit_archive_table' AS workflow
FROM ervu_dashboard.recruit_archive
WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.recruit_archive)
limit 1</sql>
FROM ervu_dashboard.recruit_archive;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
@ -92,8 +102,7 @@
system_update_date AS MAX_RECRUIT_ARCHIVE_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'recruit_archive_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'recruit_archive_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +112,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_RECARCH_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -0,0 +1,377 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>snils_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/08/05 14:31:22.799</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 14:31:22.799</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<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>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
<type>Abort</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<abort_option>ABORT_WITH_ERROR</abort_option>
<always_log_rows>Y</always_log_rows>
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>error_description</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'ERROR',
error_description = ?
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on success</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>UPDATE etl.job_execution
SET status = 'SUCCESS'
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>Create job execution record</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<quoteString>N</quoteString>
<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>
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1632</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Filter rows</name>
<type>FilterRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compare>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>last_row</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>Y</text>
<type>Boolean</type>
</value>
</condition>
</compare>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>N</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
base as (
SELECT
ri.recruit_id,
ri.info
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
true AS actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
UNION ALL
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
false AS actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>496</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
<field>
<column_name>source_id</column_name>
<stream_name>source_id</stream_name>
</field>
<field>
<column_name>recruit_id</column_name>
<stream_name>recruit_id</stream_name>
</field>
<field>
<column_name>actual</column_name>
<stream_name>actual</stream_name>
</field>
<field>
<column_name>source_update_date</column_name>
<stream_name>source_update_date</stream_name>
</field>
<field>
<column_name>snils</column_name>
<stream_name>snils</stream_name>
</field>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>snils</table>
<tablename_field/>
<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>1024</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Table output</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>snils_inn_flow_delta</name>
<name>snils_flow_delta</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -45,16 +45,6 @@
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update inn</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Insert / update snils</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update snils</from>
<to>Filter rows</to>
@ -70,6 +60,11 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update snils</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -256,60 +251,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>736</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update inn</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>inn</field>
</key>
<schema>ervu_dashboard</schema>
<table>inn</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>inn</name>
<rename>inn</rename>
<update>Y</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>928</xloc>
<xloc>816</xloc>
<yloc>224</yloc>
</GUI>
</transform>
@ -329,12 +271,9 @@ and recruitment_id = '${IDM_ID}';</sql>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>snils</field>
<field>source_id</field>
<name>source_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>snils</table>
@ -358,6 +297,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<rename>source_update_date</rename>
<update>Y</update>
</value>
<value>
<name>source_id</name>
<rename>source_id</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -380,86 +324,69 @@ and recruitment_id = '${IDM_ID}';</sql>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as (
SELECT
<sql>WITH base AS (
SELECT
ri.recruit_id,
ri.info,
to_date(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS akt_snils_date,
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS akt_snils_number,
to_date(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS pred_snils_date,
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS pred_snils_number,
to_date(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS akt_inn_date,
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS akt_inn_number,
to_date(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS pred_inn_date,
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS pred_inn_number
ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS' AS akt_snils,
ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS' AS pred_snils
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}'
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
WHERE
(to_date(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11)
OR
(to_date(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11)
OR
(to_date(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12)
OR
(to_date(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12)
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND
(
(
(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved') IS NOT NULL
AND to_date(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
)
OR
(
(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved') IS NOT NULL
AND to_date(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
)
)
limit 10
),
snils_data AS (
SELECT
recruit_id,
akt_snils->>'id' AS source_id,
to_date(akt_snils->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(akt_snils->>'snils', '[^0-9]', '', 'g') AS snils,
true AS actual,
'aktsnils' AS snils_type
FROM base
WHERE
(akt_snils->>'dataSved') IS NOT NULL
AND to_date(akt_snils->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(akt_snils->>'snils', '[^0-9]', '', 'g')) = 11
UNION ALL
SELECT
recruit_id,
pred_snils->>'id' AS source_id,
to_date(pred_snils->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(pred_snils->>'snils', '[^0-9]', '', 'g') AS snils,
false AS actual,
'predsnils' AS snils_type
FROM base
WHERE
(pred_snils->>'dataSved') IS NOT NULL
AND to_date(pred_snils->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
AND LENGTH(REGEXP_REPLACE(pred_snils->>'snils', '[^0-9]', '', 'g')) = 11
)
-- SNILS aktSNILS (актуальные)
SELECT
SELECT
recruit_id,
akt_snils_date AS source_update_date,
null as inn,
akt_snils_number AS snils,
true AS actual
FROM base
WHERE akt_snils_date IS NOT NULL
AND LENGTH(akt_snils_number) = 11
UNION ALL
-- SNILS predSNILS (предыдущие)
SELECT
recruit_id,
pred_snils_date AS source_update_date,
null as inn,
pred_snils_number AS snils,
false AS actual
FROM base
WHERE pred_snils_date IS NOT NULL
AND LENGTH(pred_snils_number) = 11
UNION ALL
-- INN aktINN (актуальные)
SELECT
recruit_id,
akt_inn_date AS source_update_date,
akt_inn_number AS inn,
null as snils,
true as actual
FROM base
WHERE akt_inn_date IS NOT NULL
AND LENGTH(akt_inn_number) = 12
UNION ALL
-- INN predINN (предыдущие)
SELECT
recruit_id,
pred_inn_date AS source_update_date,
pred_inn_number AS inn,
null as snils,
false as actual
FROM base
WHERE pred_inn_date IS NOT NULL
AND LENGTH(pred_inn_number) = 12</sql>
source_id,
source_update_date,
snils,
actual
FROM snils_data;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>snils_inn_flow_repeat</name>
<name>snils_flow_repeat</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -62,11 +62,6 @@
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update inn</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update inn</from>
<to>Insert / update snils</to>
<enabled>Y</enabled>
</hop>
@ -271,63 +266,7 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update inn</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>inn</field>
<name/>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>inn</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>inn</name>
<rename>inn</rename>
<update>Y</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>source_update_date</name>
<rename>source_update_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>848</xloc>
<xloc>736</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -347,14 +286,8 @@ DO UPDATE SET
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>IS NOT NULL</condition>
<field>snils</field>
<name/>
<field>source_id</field>
<name>source_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -379,6 +312,11 @@ DO UPDATE SET
<rename>source_update_date</rename>
<update>Y</update>
</value>
<value>
<name>source_id</name>
<rename>source_id</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -413,8 +351,8 @@ base as (
)
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
null as inn,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
true AS actual
FROM base
@ -424,36 +362,12 @@ UNION ALL
SELECT
recruit_id,
info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'id' AS source_id,
to_date(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
null as inn,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
false AS actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
UNION ALL
SELECT
recruit_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
null as snils,
true as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
UNION ALL
SELECT
recruit_id,
to_date(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
null as snils,
false as actual
FROM base
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
${LIMIT_FW}</sql>
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -22,7 +22,7 @@
<order>
<hop>
<from>Table input</from>
<to>snils_inn_flow_delta.hpl</to>
<to>snils_flow_delta.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
@ -32,22 +32,22 @@
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_delta.hpl 2</to>
<to>snils_flow_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_delta.hpl 3</to>
<to>snils_flow_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_delta.hpl 4</to>
<to>snils_flow_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_delta.hpl 5</to>
<to>snils_flow_delta.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
@ -102,10 +102,7 @@ FROM ervu_dashboard.recruitment r
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT GREATEST(
(SELECT MAX(source_update_date) FROM ervu_dashboard.inn),
(SELECT MAX(source_update_date) FROM ervu_dashboard.snils)
) AS max_source_update_date;</sql>
<sql>SELECT MAX(source_update_date) FROM ervu_dashboard.snils</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
@ -114,7 +111,7 @@ FROM ervu_dashboard.recruitment r
</GUI>
</transform>
<transform>
<name>snils_inn_flow_delta.hpl</name>
<name>snils_flow_delta.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -125,7 +122,7 @@ FROM ervu_dashboard.recruitment r
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -170,7 +167,7 @@ FROM ervu_dashboard.recruitment r
</GUI>
</transform>
<transform>
<name>snils_inn_flow_delta.hpl 2</name>
<name>snils_flow_delta.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -181,7 +178,7 @@ FROM ervu_dashboard.recruitment r
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -226,7 +223,7 @@ FROM ervu_dashboard.recruitment r
</GUI>
</transform>
<transform>
<name>snils_inn_flow_delta.hpl 3</name>
<name>snils_flow_delta.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -237,7 +234,7 @@ FROM ervu_dashboard.recruitment r
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -282,7 +279,7 @@ FROM ervu_dashboard.recruitment r
</GUI>
</transform>
<transform>
<name>snils_inn_flow_delta.hpl 4</name>
<name>snils_flow_delta.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -293,7 +290,7 @@ FROM ervu_dashboard.recruitment r
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -338,7 +335,7 @@ FROM ervu_dashboard.recruitment r
</GUI>
</transform>
<transform>
<name>snils_inn_flow_delta.hpl 5</name>
<name>snils_flow_delta.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -349,7 +346,7 @@ FROM ervu_dashboard.recruitment r
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_delta.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>

View file

@ -22,27 +22,27 @@
<order>
<hop>
<from>Table input</from>
<to>snils_inn_flow_repeat.hpl</to>
<to>snils_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_repeat.hpl 2</to>
<to>snils_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_repeat.hpl 3</to>
<to>snils_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_repeat.hpl 4</to>
<to>snils_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>snils_inn_flow_repeat.hpl 5</to>
<to>snils_flow_repeat.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
@ -75,7 +75,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow_repeat.hpl</name>
<name>snils_flow_repeat.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -86,7 +86,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -121,12 +121,12 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>624</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>snils_inn_flow_repeat.hpl 2</name>
<name>snils_flow_repeat.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -137,7 +137,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -172,12 +172,12 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>624</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>snils_inn_flow_repeat.hpl 3</name>
<name>snils_flow_repeat.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -188,7 +188,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -223,12 +223,12 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>624</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>snils_inn_flow_repeat.hpl 4</name>
<name>snils_flow_repeat.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -239,7 +239,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -274,12 +274,12 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>624</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>snils_inn_flow_repeat.hpl 5</name>
<name>snils_flow_repeat.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -290,7 +290,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow_repeat.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow_repeat.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -325,7 +325,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>624</xloc>
<yloc>528</yloc>
</GUI>
</transform>

View file

@ -22,27 +22,27 @@
<order>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>snils_inn_flow.hpl</to>
<to>snils_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>snils_inn_flow.hpl 2</to>
<to>snils_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>snils_inn_flow.hpl 3</to>
<to>snils_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>snils_inn_flow.hpl 4</to>
<to>snils_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>snils_inn_flow.hpl 5</to>
<to>snils_flow.hpl 5</to>
<enabled>Y</enabled>
</hop>
</order>
@ -88,7 +88,7 @@ ${COMMENT}*/</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow.hpl</name>
<name>snils_flow.hpl</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -99,7 +99,7 @@ ${COMMENT}*/</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -139,7 +139,7 @@ ${COMMENT}*/</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow.hpl 2</name>
<name>snils_flow.hpl 2</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -150,7 +150,7 @@ ${COMMENT}*/</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -190,7 +190,7 @@ ${COMMENT}*/</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow.hpl 3</name>
<name>snils_flow.hpl 3</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -201,7 +201,7 @@ ${COMMENT}*/</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -241,7 +241,7 @@ ${COMMENT}*/</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow.hpl 4</name>
<name>snils_flow.hpl 4</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -252,7 +252,7 @@ ${COMMENT}*/</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>
@ -292,7 +292,7 @@ ${COMMENT}*/</sql>
</GUI>
</transform>
<transform>
<name>snils_inn_flow.hpl 5</name>
<name>snils_flow.hpl 5</name>
<type>PipelineExecutor</type>
<description/>
<distribute>Y</distribute>
@ -303,7 +303,7 @@ ${COMMENT}*/</sql>
<schema_name/>
</partitioning>
<run_configuration>local</run_configuration>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils_inn/parallel/snils_inn_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/parallel/snils_flow.hpl</filename>
<filenameInField>N</filenameInField>
<filenameField/>
<group_size>1</group_size>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>snils_inn_job</name>
<name>snils_job</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -52,7 +52,7 @@
<attributes_hac/>
</action>
<action>
<name>snils_inn_job_exists_check</name>
<name>snils_job_exists_check</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
@ -79,7 +79,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/snils_inn/recruitments_five_flow.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/recruitments_five_flow.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -105,7 +105,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/snils_inn/recruitment_five_flow_on_error.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/recruitment_five_flow_on_error.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -148,7 +148,9 @@
<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/snils_inn/recruitment_five_flow_delta.hpl</filename>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/snils/recruitment_five_flow_delta.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -224,11 +226,10 @@
<field>
<variable_name>JOB_NAME</variable_name>
<variable_type>CURRENT_WORKFLOW</variable_type>
<variable_value>snils_inn_job</variable_value>
<variable_value>snils_job</variable_value>
</field>
</fields>
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
<filename/>
<replacevars>N</replacevars>
<parallel>N</parallel>
<xloc>272</xloc>
@ -238,7 +239,7 @@
</actions>
<hops>
<hop>
<from>snils_inn_job_exists_check</from>
<from>snils_job_exists_check</from>
<to>recruitments_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
@ -274,13 +275,13 @@
</hop>
<hop>
<from>check_if_job_execution_exists.hpl</from>
<to>snils_inn_job_exists_check</to>
<to>snils_job_exists_check</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>snils_inn_job_exists_check</from>
<from>snils_job_exists_check</from>
<to>check_if_need_to_repeat.hpl</to>
<enabled>Y</enabled>
<evaluation>N</evaluation>
@ -369,7 +370,7 @@
<height>150</height>
<xloc>1200</xloc>
<yloc>80</yloc>
<note>snils_inn_job
<note>snils_job
M_R_UP_DATE

View file

@ -343,7 +343,6 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>subpoena</table>
@ -443,7 +442,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
s.id, --id повестки
CASE
@ -510,31 +508,13 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_sent_summons</field>
<name>has_sent_summons</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_served_summons</field>
<name>has_served_summons</name>
</key>
<key>
<condition>&lt;></condition>
<field>appeared_to_recruitment_center</field>
<name>appeared_to_recruitment_center</name>
</key>
<key>
<condition>&lt;></condition>
<field>not_appeared_by_valid_excuse</field>
<name>not_appeared_by_valid_excuse</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -358,7 +358,6 @@ DO UPDATE SET
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>subpoena</table>
@ -458,7 +457,6 @@ DO UPDATE SET
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
s.id, --id повестки
CASE
@ -525,31 +523,13 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_sent_summons</field>
<name>has_sent_summons</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_served_summons</field>
<name>has_served_summons</name>
</key>
<key>
<condition>&lt;></condition>
<field>appeared_to_recruitment_center</field>
<name>appeared_to_recruitment_center</name>
</key>
<key>
<condition>&lt;></condition>
<field>not_appeared_by_valid_excuse</field>
<name>not_appeared_by_valid_excuse</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>912</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -92,8 +102,7 @@
system_update_date AS MAX_SUBPOENA_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'subpoena_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'subpoena_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +112,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_S_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1360</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -41,13 +41,11 @@
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
create_date AS system_create_date,
status_change_date AS system_update_date,
COALESCE(MAX(create_date), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(status_change_date), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'subpoena_table' AS workflow
FROM ervu_dashboard.subpoena
WHERE status_change_date = (SELECT MAX(status_change_date) FROM ervu_dashboard.subpoena)
limit 1</sql>
FROM ervu_dashboard.subpoena</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -40,18 +40,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/citizen_liability_fz53_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<parameter>
<name>M_INFR_UP_DATE</name>
<stream_name/>
<value>${M_INFR_UP_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -76,18 +72,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_criminal_liability_fz53/citizen_criminal_liability_fz53_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<parameter>
<name>M_INFR_UP_DATE</name>
<stream_name/>
<value>${M_INFR_UP_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -154,18 +146,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/deferment_liberation/deferment_liberation_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_DEFDEC_UP_DATE</name>
<stream_name/>
<value>${M_DEFDEC_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -190,18 +178,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/deferment_liberation_permission/deferment_liberation_permission_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_RECDEF_UP_DATE</name>
<stream_name/>
<value>${M_RECDEF_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -226,18 +210,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/recruit_archive_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_RECARCH_UP_DATE</name>
<stream_name/>
<value>${M_RECARCH_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -262,18 +242,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/subpoena_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_S_UP_DATE</name>
<stream_name/>
<value>${M_S_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -298,18 +274,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/restriction_document/restriction_document_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_RESTRDOC_UP_DATE</name>
<stream_name/>
<value>${M_RESTRDOC_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -334,18 +306,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/restriction_document_item_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_RDI_UP_DATE</name>
<stream_name/>
<value>${M_RDI_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -370,18 +338,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/subpoena_appearance_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_SA_UP_DATE</name>
<stream_name/>
<value>${M_SA_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -406,18 +370,14 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/subpoena_send_info/subpoena_send_info_job.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<parameter>
<name>M_S_UP_DATE</name>
<stream_name/>
<value>${M_S_UP_DATE}</value>
</parameter>
<parameter>
<name>M_R_CR_DATE</name>
<stream_name/>
<value>${M_R_CR_DATE}</value>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
@ -442,8 +402,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/subpoena/job_last_update_date_subpoena.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -468,8 +426,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_appealing_violations_fz53/job_last_update_date_appeal_document.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -494,8 +450,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/job_last_update_date_infringement.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -520,8 +474,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/deferment_liberation/job_last_update_date_deferment_decision.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -546,8 +498,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/job_last_update_date_recruit_archive.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -572,8 +522,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/restriction_document/job_last_update_date_restriction_document.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -598,8 +546,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/restriction_document_item/job_last_update_date_restriction_document_item.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -624,8 +570,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/raw_data/subpoena_appearance/job_last_update_date_subpoena_appearance.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -881,6 +825,26 @@
<note>в следующий пайплайн(check_status_job_info_recruits_from_json.hpl) родительского воркфлоу вписать новый созданный воркфлоу, который создан тут</note>
<width>849</width>
</notepad>
<notepad>
<backgroundcolorblue>251</backgroundcolorblue>
<backgroundcolorgreen>232</backgroundcolorgreen>
<backgroundcolorred>201</backgroundcolorred>
<bordercolorblue>90</bordercolorblue>
<bordercolorgreen>58</bordercolorgreen>
<bordercolorred>14</bordercolorred>
<fontbold>N</fontbold>
<fontcolorblue>90</fontcolorblue>
<fontcolorgreen>58</fontcolorgreen>
<fontcolorred>14</fontcolorred>
<fontitalic>N</fontitalic>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>1600</xloc>
<yloc>1376</yloc>
<note>rdi</note>
<width>24</width>
</notepad>
</notepads>
<attributes/>
</workflow>

View file

@ -273,13 +273,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>restriction_document</table>
@ -374,13 +372,14 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
*
FROM public.restriction_document
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND updated_at >= '${M_R_UP_DATE}'::timestamp
AND updated_at >= '${M_RESTRDOC_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
<variables_active>Y</variables_active>

View file

@ -41,13 +41,11 @@
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
created_at AS system_create_date,
updated_at AS system_update_date,
COALESCE(MAX(created_at), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(updated_at), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'restriction_document_table' AS workflow
FROM ervu_dashboard.restriction_document
WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.restriction_document)
limit 1</sql>
FROM ervu_dashboard.restriction_document</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>944</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
@ -92,8 +102,7 @@
system_update_date AS MAX_RESTRICTION_DOCUMENT_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'restriction_document_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'restriction_document_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +112,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_RESTRDOC_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -270,9 +270,10 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_active_temporary_measure</aggregate>
<aggregate>has_active_temporary_measure_raw</aggregate>
<subject>is_active_temporary_measure</subject>
<type>MAX</type>
<valuefield/>
</field>
</fields>
<give_back_row>N</give_back_row>
@ -282,6 +283,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<linenr_fieldname/>
<prefix>grp</prefix>
<attributes/>
<GUI>
@ -424,14 +426,11 @@ ${LIMIT_FW}</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>restriction_document_item</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -456,19 +455,11 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</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_active_temporary_measure</field>
<name>has_active_temporary_measure</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -328,13 +328,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>restriction_document_item</table>
@ -434,6 +432,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select
s.recruit_id,
CASE
@ -449,7 +448,7 @@ s.id = rd.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND rd.vk_id = '${IDM_ID}'
AND rdi.updated_at >= '${M_R_UP_DATE}'::timestamp
AND rdi.updated_at >= '${M_RDI_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
<variables_active>Y</variables_active>
@ -473,19 +472,16 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</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_active_temporary_measure</field>
<name>has_active_temporary_measure</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>

View file

@ -41,13 +41,11 @@
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
created_at AS system_create_date,
updated_at AS system_update_date,
COALESCE(MAX(created_at), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(updated_at), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'restriction_document_item_table' AS workflow
FROM ervu_dashboard.restriction_document_item
WHERE updated_at = (SELECT MAX(updated_at) FROM ervu_dashboard.restriction_document_item)
limit 1</sql>
FROM ervu_dashboard.restriction_document_item</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>896</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
@ -92,8 +102,7 @@
system_update_date AS MAX_RESTRICTION_DOCUMENT_ITEM_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'restriction_document_item_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'restriction_document_item_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +112,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_RDI_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -273,13 +273,11 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_date_time</field>
<name>created_date_time</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>subpoena_appearance</table>
@ -339,13 +337,14 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select sa.*
from public.subpoena_appearance sa
join public.subpoena s on s.id = sa.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND s.department_id = '${IDM_ID}'
AND sa.change_date_time >= '${M_R_UP_DATE}'::timestamp
AND sa.change_date_time >= '${M_SA_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
<variables_active>Y</variables_active>

View file

@ -23,13 +23,23 @@
<hop>
<from>Copy rows to result</from>
<to>Set variables</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
@ -44,8 +54,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>320</yloc>
<xloc>896</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -92,8 +102,7 @@
system_update_date AS MAX_SUBPOENA_APPEARANCE_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create)
and workflow = 'subpoena_appearance_table'
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'subpoena_appearance_table')
order by record_created desc
limit 1</sql>
<variables_active>N</variables_active>
@ -103,6 +112,30 @@ limit 1</sql>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Write to log</name>
<type>WriteToLog</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${M_SA_UP_DATE}</logmessage>
<attributes/>
<GUI>
<xloc>1424</xloc>
<yloc>240</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -41,13 +41,11 @@
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
created_date_time AS system_create_date,
change_date_time AS system_update_date,
COALESCE(MAX(created_date_time), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(change_date_time), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'subpoena_appearance_table' AS workflow
FROM ervu_dashboard.subpoena_appearance
WHERE change_date_time = (SELECT MAX(change_date_time) FROM ervu_dashboard.subpoena_appearance)
limit 1</sql>
FROM ervu_dashboard.subpoena_appearance</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -273,7 +273,6 @@ and recruitment_id = '${IDM_ID}';</sql>
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>subpoena_send_info</table>
@ -368,13 +367,14 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select ssi.*
from public.subpoena_send_info ssi
join public.subpoena s on s.id = ssi.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND s.department_id = '${IDM_ID}'
AND s.status_change_date >= '${M_R_UP_DATE}'::timestamp
AND s.status_change_date >= '${M_S_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
<variables_active>Y</variables_active>
<attributes/>