Merge branch 'develop' of 10.10.31.70:/ervu-dashboard-etl into develop

This commit is contained in:
r.gaztdinov 2025-09-04 17:53:12 +03:00
commit c5417b68cb
338 changed files with 39292 additions and 41668 deletions

View file

@ -196,46 +196,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -295,29 +265,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${ID_F1}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -335,7 +284,7 @@ SELECT
r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -354,21 +303,6 @@ SELECT
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration,
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F1}' != '' -- Проверка на пустую строку
@ -384,7 +318,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -153,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -215,29 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${ID_F2}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F2}'
AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -274,21 +223,6 @@ SELECT
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration,
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F2}' != '' -- Проверка на пустую строку
@ -304,7 +238,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -153,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -215,29 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${ID_F3}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F3}'
AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -274,21 +223,6 @@ SELECT
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration,
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F3}' != '' -- Проверка на пустую строку
@ -304,7 +238,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -153,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -215,29 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${ID_F4}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F4}'
AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -274,21 +223,6 @@ SELECT
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration,
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F4}' != '' -- Проверка на пустую строку
@ -304,7 +238,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -153,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -215,29 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${ID_F5}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F5}'
AND '${M_R_CR_DATE}' >= r.system_create_date::timestamp
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -274,21 +223,6 @@ SELECT
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration,
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F5}' != '' -- Проверка на пустую строку
@ -304,7 +238,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -44,6 +44,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -152,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -214,30 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
AND '${ID_F1}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F1}'
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
--r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -271,22 +220,7 @@ SELECT
WHEN ddd.hidden IS false then ddd.hidden
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
mrr.value AS reason_registration,
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F1}' != '' -- Проверка на пустую строку
@ -303,7 +237,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -44,6 +44,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -152,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -214,30 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
AND '${ID_F2}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F2}'
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
--r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -271,22 +220,7 @@ SELECT
WHEN ddd.hidden IS false then ddd.hidden
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
mrr.value AS reason_registration,
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F2}' != '' -- Проверка на пустую строку
@ -303,7 +237,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -44,6 +44,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -152,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -214,30 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
AND '${ID_F3}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F3}'
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
--r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -271,22 +220,7 @@ SELECT
WHEN ddd.hidden IS false then ddd.hidden
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
mrr.value AS reason_registration,
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F3}' != '' -- Проверка на пустую строку
@ -303,7 +237,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -44,6 +44,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -152,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -214,30 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
AND '${ID_F4}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F4}'
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
--r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -271,22 +220,7 @@ SELECT
WHEN ddd.hidden IS false then ddd.hidden
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
mrr.value AS reason_registration,
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F4}' != '' -- Проверка на пустую строку
@ -303,7 +237,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -44,6 +44,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -152,46 +153,16 @@
<rename>reason_registration</rename>
<update>Y</update>
</value>
<value>
<name>residence</name>
<rename>residence</rename>
<update>Y</update>
</value>
<value>
<name>start_date_residence</name>
<rename>start_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>end_date_residence</name>
<rename>end_date_residence</rename>
<update>Y</update>
</value>
<value>
<name>address_place_stay</name>
<rename>address_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>start_date_place_stay</name>
<rename>start_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>end_date_place_stay</name>
<rename>end_date_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>type_place_stay</name>
<rename>type_place_stay</rename>
<update>Y</update>
</value>
<value>
<name>id_ern</name>
<rename>id_ern</rename>
<update>Y</update>
</value>
<value>
<name>marital_status</name>
<rename>marital_status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -214,30 +185,8 @@
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with
adresses as ( -- по одному ли адресу тут должно быть??
SELECT
r.id as recruit_id,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
FROM
public.recruits AS r
LEFT JOIN
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
WHERE '${M_R_CR_DATE}'::timestamp >= r.system_create_date
AND r.system_update_date >= '${M_R_UP_DATE}'::timestamp
AND '${ID_F5}' != '' -- Проверка на пустую строку
AND COALESCE(current_recruitment_id, target_recruitment_id) = '${ID_F5}'
GROUP BY
r.id
)
SELECT
r.system_pgs_status,
<sql>SELECT
r.system_pgs_status,
r.full_name,
r.last_name,
r.first_name,
@ -255,7 +204,7 @@ SELECT
--r.vu_current_info,
r.military_registration_date AS date_registration,
r.vu_unset_date AS date_deregistration,
--ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
NULLIF(ri.info->'svedFL'->'svedSemPolozh'->>'semPolozh','')::int AS marital_status,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
--ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
--ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
@ -271,22 +220,7 @@ SELECT
WHEN ddd.hidden IS false then ddd.hidden
ELSE true
END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
mrr.value AS reason_registration
adr.actualAddress as residence, -- адрес места жительства
adr.actualAddress_regDateStart as start_date_residence, -- дата регистрации по месту жительства
adr.actualAddress_regDateEnd as end_date_residence, -- дата снятия с регистрации по месту жительства
adr.residenceAddress as address_place_stay, -- адресс регистрации по месту пребывания
adr.residenceAddress_regDateStart as start_date_place_stay, -- дата регистрации по месту пребывания
adr.residenceAddress_regDateEnd as end_date_place_stay, -- дата снятия с регистрации по месту пребывания
case
when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
else null
end as type_place_stay, -- тип регистрации
-- address_actual -- Адрес фактического проживания ***1
-- source_info_actual -- Источник сведений о месте фактического проживания ***1
-- date_info_actual -- Дата получения сведений об адресе фактического проживания ***1
-- date_loss_info_actual -- Дата потери актуальности сведений об адресе фактического проживания ***1
mrr.value AS reason_registration,
system_id_ern AS id_ern -- id единого регистра населения
FROM public.recruits AS r
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id AND '${ID_F5}' != '' -- Проверка на пустую строку
@ -303,7 +237,6 @@ LEFT JOIN (
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
--JOIN public.recruits_history rh on rh.recruit_id=r.id
--WHERE r.system_update_date >= '${UP_D}'
join adresses adr ON r.recruit_id=adr.recruit_id
-- ***1 - страница личные сведения есть поле, нет данных</sql>
<variables_active>Y</variables_active>

View file

@ -87,8 +87,7 @@
<sql> SELECT
'delta_citizen_liability_fz53_flow2' as job_name,
'ERROR' as status,
current_timestamp as record_created
</sql>
current_timestamp as record_created</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -55,6 +55,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruits_info</table>
@ -98,6 +99,11 @@
<rename>info</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -128,7 +134,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -55,6 +55,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruits_info</table>
@ -98,6 +99,11 @@
<rename>info</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -128,7 +134,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -55,6 +55,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruits_info</table>
@ -98,6 +99,11 @@
<rename>info</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -128,7 +134,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -55,6 +55,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruits_info</table>
@ -98,6 +99,11 @@
<rename>info</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -128,7 +134,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -55,6 +55,7 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>recruits_info</table>
@ -98,6 +99,11 @@
<rename>info</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -128,7 +134,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -131,6 +131,11 @@
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -198,7 +203,8 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.full_name
r.full_name,
r.addresses
FROM recruits_info ri
JOIN recruits r ON r.id = ri.recruit_id
WHERE

View file

@ -88,6 +88,11 @@
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -118,6 +123,7 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.addresses,
r.full_name--,
--'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата
FROM recruits_info ri

View file

@ -88,6 +88,11 @@
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -118,6 +123,7 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.addresses,
r.full_name--,
--'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата
FROM recruits_info ri

View file

@ -88,6 +88,11 @@
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -118,6 +123,7 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.addresses,
r.full_name--,
--'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата
FROM recruits_info ri

View file

@ -88,6 +88,11 @@
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>addresses</name>
<rename>addresses</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
@ -118,6 +123,7 @@
ri.gir_import_data_version_id,
r.current_recruitment_id,
r.target_recruitment_id,
r.addresses,
r.full_name--,
--'${RN_RMNT}' AS rn_recruitment -- порядковый номер военкомата
FROM recruits_info ri

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow4_error</name>
<name>check_if_need_to_repeat_job</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,22 +13,22 @@
<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/06/16 12:20:06.191</created_date>
<created_date>2025/08/08 12:27:51.630</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
<modified_date>2025/08/08 12:27:51.630</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<name>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -37,37 +37,18 @@
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<fields>
<field>
<field_name>need_to_repeat_job</field_name>
<variable_name>NEED_TO_REPEAT_JOB</variable_name>
<variable_type>ROOT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
<xloc>624</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
@ -84,15 +65,19 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow4' as job_name,
'ERROR' as status,
current_timestamp as record_created</sql>
<sql>SELECT EXISTS (SELECT 1
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'child_job'
where je.status is null or je.status in ('ERROR', 'PROCESSING')
limit 1
) as need_to_repeat_job;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
<xloc>336</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow1_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
/*
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
/*
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
SELECT
'child_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow1_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
/*
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
/*
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
SELECT
'child_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,254 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow2_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
/*
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
*/
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2--,
/*
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,254 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow2_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
/*
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
*/
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2--,
/*
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow3_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
*/
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
/*
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
*/
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3--,
/*
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow3_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
*/
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
/*
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
*/
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3--,
/*
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow4_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
*/
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
/*
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
*/
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4--,
/*
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow4_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
*/
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
/*
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
*/
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4--,
/*
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow5_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
*/
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
*/
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_child_flow5_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_child ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
*/
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
*/
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'child_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow1_success</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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow1' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow3_success</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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow3' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow4_success</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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow4' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow5_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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow5' as job_name,
'ERROR' as status,
current_timestamp as record_created</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow5_success</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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow5' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_to_processing</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/06/11 16:14:31.162</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 16:14:31.162</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
'PROCESSING' AS status,
'job_child' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_flow1' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_flow2' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_flow3' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_flow4' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_flow5' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>368</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_to_processing_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/06/16 13:42:26.494</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 13:42:26.494</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1248</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
'PROCESSING' AS status,
'delta_child' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_delta_flow1' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_delta_flow2' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_delta_flow3' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_delta_flow4' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'child_delta_flow5' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_job_passport_exists</name>
<name>check_if_child_job_exists</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,23 +13,23 @@
<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/06/11 15:20:18.267</created_date>
<created_date>2025/08/05 13:28:46.661</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 15:20:18.267</modified_date>
<modified_date>2025/08/05 13:28:46.661</modified_date>
</info>
<notepads>
</notepads>
<order>
<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>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
@ -44,21 +44,16 @@
</partitioning>
<fields>
<field>
<field_name>job_name</field_name>
<variable_name>PIPE</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
<field>
<field_name>status</field_name>
<variable_name>STATUS</variable_name>
<field_name>job_executed_flag</field_name>
<variable_name>JOB_EXECUTED_FLAG</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>352</yloc>
<xloc>672</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -75,29 +70,17 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
COALESCE(job_name, 'job_passport') AS job_name,
COALESCE(status, 'NEW') AS status,
current_timestamp::timestamp as record_created
FROM (
SELECT job_name, status
FROM public.etl_checkpoints
WHERE job_name = 'job_passport'
UNION ALL
SELECT NULL, NULL
WHERE NOT EXISTS (
SELECT 1
FROM public.etl_checkpoints
WHERE job_name = 'job_passport'
)
) t</sql>
<sql>SELECT EXISTS (
SELECT 1
FROM etl.job_execution
WHERE job_name = 'child_job'
limit 1
) AS job_executed_flag;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>
<yloc>352</yloc>
<xloc>384</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -111,17 +94,17 @@ FROM (
<method>none</method>
<schema_name/>
</partitioning>
<loglevel>Basic</loglevel>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${STATUS}</logmessage>
<fields>
</fields>
<attributes/>
<GUI>
<xloc>960</xloc>
<yloc>240</yloc>
<xloc>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,869 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>checkpoint_job_child_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/06/03 14:19:02.590</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 14:19:02.590</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Filter rows</from>
<to>Abort</to>
<enabled>N</enabled>
</hop>
<hop>
<from>JSON input state_child_flow1.json</from>
<to>Filter rows</to>
<enabled>N</enabled>
</hop>
<hop>
<from>JSON input state_child_flow2.json</from>
<to>Filter rows</to>
<enabled>N</enabled>
</hop>
<hop>
<from>JSON input state_child_flow3.json</from>
<to>Filter rows</to>
<enabled>N</enabled>
</hop>
<hop>
<from>JSON input state_child_flow4.json</from>
<to>Filter rows</to>
<enabled>N</enabled>
</hop>
<hop>
<from>JSON input state_child_flow5.json</from>
<to>Filter rows</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
<to>JSON input state_child_flow1.json</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
<to>JSON input state_child_flow2.json</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
<to>JSON input state_child_flow3.json</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
<to>JSON input state_child_flow4.json</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
<to>JSON input state_child_flow5.json</to>
<enabled>N</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>1264</xloc>
<yloc>592</yloc>
</GUI>
</transform>
<transform>
<name>Dummy (do nothing)</name>
<type>Dummy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>592</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>
<condition>
<conditions>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>child_flow1</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>status</leftvalue>
<negated>N</negated>
<operator>AND</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>ERROR</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>child_flow2</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>status</leftvalue>
<negated>N</negated>
<operator>AND</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>ERROR</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>OR</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>child_flow3</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>status</leftvalue>
<negated>N</negated>
<operator>AND</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>ERROR</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>OR</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>child_flow4</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>status</leftvalue>
<negated>N</negated>
<operator>AND</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>ERROR</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>OR</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>child_flow5</text>
<type>String</type>
</value>
</condition>
<condition>
<conditions>
</conditions>
<function>=</function>
<leftvalue>status</leftvalue>
<negated>N</negated>
<operator>AND</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>ERROR</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>OR</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
</conditions>
<function>=</function>
<leftvalue>pipeline</leftvalue>
<negated>N</negated>
<operator>-</operator>
<value>
<isnull>N</isnull>
<length>-1</length>
<name>constant</name>
<precision>-1</precision>
<text>recruits_info_flow1</text>
<type>String</type>
</value>
</condition>
</compare>
<send_true_to>Abort</send_true_to>
<attributes/>
<GUI>
<xloc>944</xloc>
<yloc>592</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1264</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>JSON input state_child_flow1.json</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<file>
<name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
</file>
<fields>
<field>
<name>pipeline</name>
<path>$.pipeline</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>status</name>
<path>$.status</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>JSON input state_child_flow2.json</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<file>
<name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
</file>
<fields>
<field>
<name>pipeline</name>
<path>$.pipeline</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>status</name>
<path>$.status</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>JSON input state_child_flow3.json</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<file>
<name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
</file>
<fields>
<field>
<name>pipeline</name>
<path>$.pipeline</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>status</name>
<path>$.status</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>592</yloc>
</GUI>
</transform>
<transform>
<name>JSON input state_child_flow4.json</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<file>
<name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
</file>
<fields>
<field>
<name>pipeline</name>
<path>$.pipeline</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>status</name>
<path>$.status</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>672</yloc>
</GUI>
</transform>
<transform>
<name>JSON input state_child_flow5.json</name>
<type>JsonInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<include>N</include>
<include_field/>
<rownum>N</rownum>
<addresultfile>N</addresultfile>
<readurl>N</readurl>
<removeSourceField>N</removeSourceField>
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
<ignoreMissingPath>Y</ignoreMissingPath>
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
<rownum_field/>
<file>
<name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json</name>
<filemask/>
<exclude_filemask/>
<file_required>N</file_required>
<include_subfolders>N</include_subfolders>
</file>
<fields>
<field>
<name>pipeline</name>
<path>$.pipeline</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
<field>
<name>status</name>
<path>$.status</path>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<length>-1</length>
<precision>-1</precision>
<trim_type>none</trim_type>
<repeat>N</repeat>
</field>
</fields>
<limit>0</limit>
<IsInFields>N</IsInFields>
<IsAFile>N</IsAFile>
<valueField/>
<shortFileFieldName/>
<pathFieldName/>
<hiddenFieldName/>
<lastModificationTimeFieldName/>
<uriNameFieldName/>
<rootUriNameFieldName/>
<extensionFieldName/>
<sizeFieldName/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH status_check AS (
SELECT
bool_or(status = 'ERROR' AND job_name IN (
'delta_child_flow1',
'delta_child_flow2',
'delta_child_flow3',
'delta_child_flow4',
'delta_child_flow5'
)) AS has_error,
count(*) FILTER (
WHERE status = 'SUCCESS' AND job_name IN (
'delta_child_flow1',
'delta_child_flow2',
'delta_child_flow3',
'delta_child_flow4',
'delta_child_flow5'
)
) = 5 AS all_success
FROM public.etl_checkpoints
)
SELECT
'job_child_delta' as job_name,
CASE
WHEN has_error THEN 'ERROR'
WHEN all_success THEN 'SUCCESS'
ELSE 'ERROR'
END AS status,
current_timestamp AS record_created
FROM status_check;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,595 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_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>User defined Java expression 2</from>
<to>Update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Change job status on error </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error </from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Detect empty 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>Table input </from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by 2</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Change job status on error </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by 2</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>1216</xloc>
<yloc>1024</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>1216</xloc>
<yloc>800</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',
error_description = null
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1744</xloc>
<yloc>608</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>112</xloc>
<yloc>800</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1568</xloc>
<yloc>480</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>1392</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Group by 2</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>minors_count_raw</aggregate>
<subject>is_minor</subject>
<type>SUM</type>
</field>
<field>
<aggregate>has_minor_child_raw</aggregate>
<subject>is_minor</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_dead_child_raw</aggregate>
<subject>is_dead</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>480</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>784</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Table input </name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS child_external_id,
NULLIF(ch->>'idERN', '') AS child_id_ern,
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
WHEN 1 THEN 3
WHEN 2 THEN 4
END AS kinship_type,
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo'
) AS full_name,
dates.birth_date,
dates.death_date,
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
CASE
WHEN dates.death_date IS NOT NULL THEN 0 -- умершие не могут быть несовершеннолетними
WHEN dates.birth_date IS NULL THEN 0 -- если дата рождения неизвестна, считаем взрослым
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
ELSE 0
END AS is_minor
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
CROSS JOIN LATERAL (
SELECT
MAKE_DATE(
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
MAKE_DATE(
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
) AS death_date
) AS dates
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>304</xloc>
<yloc>800</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>recruit_id</column_name>
<stream_name>recruit_id</stream_name>
</field>
<field>
<column_name>child_external_id</column_name>
<stream_name>child_external_id</stream_name>
</field>
<field>
<column_name>child_id_ern</column_name>
<stream_name>child_id_ern</stream_name>
</field>
<field>
<column_name>kinship_type</column_name>
<stream_name>kinship_type</stream_name>
</field>
<field>
<column_name>last_name</column_name>
<stream_name>last_name</stream_name>
</field>
<field>
<column_name>first_name</column_name>
<stream_name>first_name</stream_name>
</field>
<field>
<column_name>middle_name</column_name>
<stream_name>middle_name</stream_name>
</field>
<field>
<column_name>full_name</column_name>
<stream_name>full_name</stream_name>
</field>
<field>
<column_name>birth_date</column_name>
<stream_name>birth_date</stream_name>
</field>
<field>
<column_name>death_date</column_name>
<stream_name>death_date</stream_name>
</field>
<field>
<column_name>death_az_number</column_name>
<stream_name>death_az_number</stream_name>
</field>
<field>
<column_name>birth_az_number</column_name>
<stream_name>birth_az_number</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_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_child</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>800</yloc>
</GUI>
</transform>
<transform>
<name>Update 2</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>minors_count</name>
<rename>minors_count</rename>
</value>
<value>
<name>has_minor_child</name>
<rename>has_minor_child</rename>
</value>
<value>
<name>has_dead_child</name>
<rename>has_dead_child</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression 2</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>minors_count</field_name>
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
<value_type>String</value_type>
<value_length>10</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_minor_child</field_name>
<formula_string>has_minor_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_dead_child</field_name>
<formula_string>has_dead_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Create job execution record </source_transform>
<target_transform>Change job status on error </target_transform>
<is_enabled>N</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<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>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<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>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,229 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow1</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<pipeline_status>0</pipeline_status>
<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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Select values 4 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 4 2</from>
<to>Get variables</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Get variables</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>recruitment_id</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
<variable>ID_F1</variable>
</field>
</fields>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>944</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Select values 4 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>ID_F1</name>
<rename>ID_F1</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Select values 4 2</source_transform>
<target_transform>Get variables</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,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow2</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1088</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow3</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow4</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1072</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>528</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow5</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,598 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_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>Insert / update</from>
<to>Change job status on error </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update </from>
<to>Change job status on error </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record</from>
<to>Table input 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update </from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success </to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update </from>
<to>Detect empty 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>Change job status on error </from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update</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>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>N</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>1376</xloc>
<yloc>224</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',
error_description = null
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}'
and status = 'DELTA_PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1872</xloc>
<yloc>0</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
where job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';</sql>
<attributes/>
<GUI>
<xloc>288</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1616</xloc>
<yloc>144</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>1616</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>minors_count_raw</aggregate>
<subject>is_minor</subject>
<type>SUM</type>
</field>
<field>
<aggregate>has_minor_child_raw</aggregate>
<subject>is_minor</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_dead_child_raw</aggregate>
<subject>is_dead</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>0</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>1024</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
<value>
<name>child_external_id</name>
<rename>child_external_id</rename>
<update>N</update>
</value>
<value>
<name>first_name</name>
<rename>first_name</rename>
<update>Y</update>
</value>
<value>
<name>middle_name</name>
<rename>middle_name</rename>
<update>Y</update>
</value>
<value>
<name>last_name</name>
<rename>last_name</rename>
<update>Y</update>
</value>
<value>
<name>child_id_ern</name>
<rename>child_id_ern</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS child_external_id,
NULLIF(ch->>'idERN', '') AS child_id_ern,
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
WHEN 1 THEN 3
WHEN 2 THEN 4
END AS kinship_type,
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo'
) AS full_name,
dates.birth_date,
dates.death_date,
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
CASE
WHEN dates.death_date IS NOT NULL THEN 0 -- умершие не могут быть несовершеннолетними
WHEN dates.birth_date IS NULL THEN 0 -- если дата рождения неизвестна, считаем взрослым
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
ELSE 0
END AS is_minor
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
CROSS JOIN LATERAL (
SELECT
MAKE_DATE(
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
MAKE_DATE(
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
) AS death_date
) AS dates
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
AND c.update_date >= '${M_R_UP_DATE}'::timestamp
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>496</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Update </name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>minors_count</name>
<rename>minors_count</rename>
</value>
<value>
<name>has_minor_child</name>
<rename>has_minor_child</rename>
</value>
<value>
<name>has_dead_child</name>
<rename>has_dead_child</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>minors_count</field_name>
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
<value_type>String</value_type>
<value_length>10</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_minor_child</field_name>
<formula_string>has_minor_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_dead_child</field_name>
<formula_string>has_dead_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1232</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error </target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update </source_transform>
<target_transform>Change job status on error </target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,613 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>child_flow_repeat</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/08 13:25:52.319</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/08 13:25:52.319</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record 2</from>
<to>Table input 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</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 2</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update</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>976</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error 2</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>976</xloc>
<yloc>432</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',
error_description = null
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}'
and status = 'PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1440</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Create job execution record 2</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}'
)
ON CONFLICT (job_name, recruitment_id)
DO UPDATE SET
status = 'PROCESSING',
execution_datetime = DEFAULT,
error_description = NULL;</sql>
<attributes/>
<GUI>
<xloc>0</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Detect empty stream</name>
<type>DetectEmptyStream</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>0</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>1216</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>minors_count_raw</aggregate>
<subject>is_minor</subject>
<type>SUM</type>
</field>
<field>
<aggregate>has_minor_child_raw</aggregate>
<subject>is_minor</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_dead_child_raw</aggregate>
<subject>is_dead</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>608</xloc>
<yloc>192</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>608</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
<value>
<name>child_external_id</name>
<rename>child_external_id</rename>
<update>N</update>
</value>
<value>
<name>first_name</name>
<rename>first_name</rename>
<update>Y</update>
</value>
<value>
<name>middle_name</name>
<rename>middle_name</rename>
<update>Y</update>
</value>
<value>
<name>last_name</name>
<rename>last_name</rename>
<update>Y</update>
</value>
<value>
<name>child_id_ern</name>
<rename>child_id_ern</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>608</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS child_external_id,
NULLIF(ch->>'idERN', '') AS child_id_ern,
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
WHEN 1 THEN 3
WHEN 2 THEN 4
END AS kinship_type,
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo'
) AS full_name,
dates.birth_date,
dates.death_date,
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
CASE
WHEN dates.death_date IS NOT NULL THEN 0 -- умершие не могут быть несовершеннолетними
WHEN dates.birth_date IS NULL THEN 0 -- если дата рождения неизвестна, считаем взрослым
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
ELSE 0
END AS is_minor
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
CROSS JOIN LATERAL (
SELECT
MAKE_DATE(
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
MAKE_DATE(
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
) AS death_date
) AS dates
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>minors_count</name>
<rename>minors_count</rename>
</value>
<value>
<name>has_minor_child</name>
<rename>has_minor_child</rename>
</value>
<value>
<name>has_dead_child</name>
<rename>has_dead_child</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>minors_count</field_name>
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
<value_type>String</value_type>
<value_length>10</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_minor_child</field_name>
<formula_string>has_minor_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_dead_child</field_name>
<formula_string>has_dead_child_raw == 1 </formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>800</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error 2</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</source_transform>
<target_transform>Change job status on error 2</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_child_flow1</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_child_flow2</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_child_flow3</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_child_flow4</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_child_flow5</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_az_number</name>
<rename>birth_az_number</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>death_az_number</name>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
<name>death_date</name>
<rename>death_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>kinship_type</name>
<rename>kinship_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
)
select
r.recruit_id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from ervu_dashboard.citizen r
join child on r.recruit_id = child.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>child_flow_delta.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_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>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 = 'child_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>544</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>544</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>544</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>544</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>544</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>child_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>child_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/>
<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 = 'child_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>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>464</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>464</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>464</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>464</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</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>464</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,185 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruitment_rows_five_flow_if_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/05/23 14:28:22.572</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/23 14:28:22.572</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Copy rows to result</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Copy rows to result</name>
<type>RowsToResult</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>880</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH
fr_check AS (
SELECT
last_recruitment_id AS recruitment_id,
recruitment_created_date,
status,
job_name
FROM public.etl_checkpoints
WHERE status = 'ERROR' AND job_name IN ('child_flow1', 'child_flow2', 'child_flow3', 'child_flow4', 'child_flow5')
),
ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
FROM ordered
),
pivoted AS (
SELECT
position,
MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN created_at END) AS cr_flow1,
MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow1') THEN idm_id::text END) AS idm_flow1,
MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN created_at END) AS cr_flow2,
MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow2') THEN idm_id::text END) AS idm_flow2,
MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN created_at END) AS cr_flow3,
MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow3') THEN idm_id::text END) AS idm_flow3,
MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN created_at END) AS cr_flow4,
MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow4') THEN idm_id::text END) AS idm_flow4,
MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN created_at END) AS cr_flow5,
MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'child_flow5') THEN idm_id::text END) AS idm_flow5
FROM splitted
GROUP BY position
),
remains as (
SELECT
position,
cr_flow1,
idm_flow1::uuid,
cr_flow2,
idm_flow2::uuid,
cr_flow3,
idm_flow3::uuid,
cr_flow4,
idm_flow4::uuid,
cr_flow5,
idm_flow5::uuid
FROM pivoted
WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
order by position
),
idm1 as (
select
cr_flow1,
idm_flow1
from remains
where cr_flow1 is not null and idm_flow1 is not null
),
idm2 as (
select
cr_flow2,
idm_flow2
from remains
where cr_flow2 is not null and idm_flow2 is not null
),
idm3 as (
select
cr_flow3,
idm_flow3
from remains
where cr_flow3 is not null and idm_flow3 is not null
),
idm4 as (
select
cr_flow4,
idm_flow4
from remains
where cr_flow4 is not null and idm_flow4 is not null
),
idm5 as (
select
cr_flow5,
idm_flow5
from remains
where cr_flow5 is not null and idm_flow5 is not null
)
select
i1.*,
i2.*,
i3.*,
i4.*,
i5.*
FROM
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
FULL OUTER JOIN
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
FULL OUTER JOIN
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
FULL OUTER JOIN
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
FULL OUTER JOIN
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
limit 2</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>512</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,356 @@
<?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>child_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>child_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>child_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>child_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>child_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/>
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform>Change job status on success </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>Change job status on success </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>704</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform>Change job status on success 2</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>Change job status on success 2</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>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform>Change job status on success 4</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>Change job status on success 3</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>704</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform>Change job status on success 4</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>Change job status on success 4</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>704</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>child_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/child/parallel/child_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>child_job</input>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
</parameters>
<execution_result_target_transform>Change job status on success 5</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>Change job status on success 5</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>704</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_need_to_repeat_job</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/08 12:27:51.630</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/08 12:27:51.630</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<field_name>need_to_repeat_job</field_name>
<variable_name>NEED_TO_REPEAT_JOB</variable_name>
<variable_type>ROOT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT EXISTS (SELECT 1
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'citizen_address_job'
where je.status is null or je.status in ('ERROR', 'PROCESSING')
limit 1
) as need_to_repeat_job;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>336</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_job_punishment_exists</name>
<name>check_if_citizen_address_job_exists</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,23 +13,23 @@
<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/06/11 15:20:18.267</created_date>
<created_date>2025/08/05 13:28:46.661</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 15:20:18.267</modified_date>
<modified_date>2025/08/05 13:28:46.661</modified_date>
</info>
<notepads>
</notepads>
<order>
<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>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
@ -44,21 +44,16 @@
</partitioning>
<fields>
<field>
<field_name>job_name</field_name>
<variable_name>PIPE</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
<field>
<field_name>status</field_name>
<variable_name>STATUS</variable_name>
<field_name>job_executed_flag</field_name>
<variable_name>JOB_EXECUTED_FLAG</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>352</yloc>
<xloc>672</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -75,29 +70,17 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
COALESCE(job_name, 'job_punishment') AS job_name,
COALESCE(status, 'NEW') AS status,
current_timestamp::timestamp as record_created
FROM (
SELECT job_name, status
FROM public.etl_checkpoints
WHERE job_name = 'job_punishment'
UNION ALL
SELECT NULL, NULL
WHERE NOT EXISTS (
SELECT 1
FROM public.etl_checkpoints
WHERE job_name = 'job_punishment'
)
) t</sql>
<sql>SELECT EXISTS (
SELECT 1
FROM etl.job_execution
WHERE job_name = 'citizen_address_job'
limit 1
) AS job_executed_flag;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>
<yloc>352</yloc>
<xloc>384</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -111,17 +94,17 @@ FROM (
<method>none</method>
<schema_name/>
</partitioning>
<loglevel>Basic</loglevel>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${STATUS}</logmessage>
<fields>
</fields>
<attributes/>
<GUI>
<xloc>960</xloc>
<yloc>240</yloc>
<xloc>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>job_citizen_address</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/06/05 14:27:15.055</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/05 14:27:15.055</modified_date>
<parameters>
<parameter>
<name>M_R_CR_DATE</name>
<default_value>3001-01-01 00:00:00</default_value>
<description/>
</parameter>
<parameter>
<name>M_R_UP_DATE</name>
<default_value/>
<description/>
</parameter>
</parameters>
<actions>
<action>
<name>Start</name>
<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>416</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_citizen_address_job_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/citizen_address/checkpoints/check_if_citizen_address_job_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>608</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>citizen_address_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>880</xloc>
<yloc>208</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/citizen_address/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>1120</xloc>
<yloc>208</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/citizen_address/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>1120</xloc>
<yloc>512</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_need_to_repeat_job.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/citizen_address/check_if_need_to_repeat_job.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>880</xloc>
<yloc>368</yloc>
<attributes_hac/>
</action>
<action>
<name>Simple evaluation</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
<comparevalue/>
<fieldname/>
<fieldtype>boolean</fieldtype>
<mask/>
<maxvalue/>
<minvalue/>
<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>880</xloc>
<yloc>512</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/citizen_address/recruitment_five_flow_delta.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>880</xloc>
<yloc>704</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>check_if_citizen_address_job_exists.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>check_if_citizen_address_job_exists.hpl</from>
<to>citizen_address_job_exists_check</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>citizen_address_job_exists_check</from>
<to>recruitments_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>citizen_address_job_exists_check</from>
<to>check_if_need_to_repeat_job.hpl</to>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>check_if_need_to_repeat_job.hpl</from>
<to>Simple evaluation</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>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>

View file

@ -0,0 +1,395 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_address_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>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Detect empty 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>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>
</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>704</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>832</xloc>
<yloc>704</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}'
and status = 'PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>96</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>240</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>832</xloc>
<yloc>96</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>1328</xloc>
<yloc>320</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>640</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id::uuid,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateStart')::date END) AS residence_registration_date,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateEnd')::date END) AS residence_deregistration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS place_stay_address,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateStart')::date END) AS place_stay_registration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateEnd')::date END) AS place_stay_deregistration_date,
CASE
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '1' THEN 'В жилом помещении, не являющимся местом жительства физического лица'
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '2' THEN 'В учреждении уголовно-исполнительной системы'
ELSE NULL
END AS place_stay_registration_type,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN addr->>'reg' END) AS factual_address,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateStart')::date END) AS factual_info_received_date,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateEnd')::date END) AS factual_info_expiry_date
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.addresses) AS addr
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
GROUP BY ri.recruit_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>464</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>recruit_id</column_name>
<stream_name>recruit_id</stream_name>
</field>
<field>
<column_name>residence_address</column_name>
<stream_name>residence_address</stream_name>
</field>
<field>
<column_name>residence_registration_date</column_name>
<stream_name>residence_registration_date</stream_name>
</field>
<field>
<column_name>residence_deregistration_date</column_name>
<stream_name>residence_deregistration_date</stream_name>
</field>
<field>
<column_name>place_stay_address</column_name>
<stream_name>place_stay_address</stream_name>
</field>
<field>
<column_name>place_stay_registration_date</column_name>
<stream_name>place_stay_registration_date</stream_name>
</field>
<field>
<column_name>place_stay_deregistration_date</column_name>
<stream_name>place_stay_deregistration_date</stream_name>
</field>
<field>
<column_name>place_stay_registration_type</column_name>
<stream_name>place_stay_registration_type</stream_name>
</field>
<field>
<column_name>factual_address</column_name>
<stream_name>factual_address</stream_name>
</field>
<field>
<column_name>factual_info_received_date</column_name>
<stream_name>factual_info_received_date</stream_name>
</field>
<field>
<column_name>factual_info_expiry_date</column_name>
<stream_name>factual_info_expiry_date</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_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_address</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>832</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>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,405 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_address_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>Insert / update</from>
<to>Change job status on error</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>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Detect empty stream</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>1008</xloc>
<yloc>464</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>752</xloc>
<yloc>464</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}'
and status = 'DELTA_PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>16</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>128</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>752</xloc>
<yloc>16</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>1120</xloc>
<yloc>224</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>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_address</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>residence_address</name>
<rename>residence_address</rename>
<update>Y</update>
</value>
<value>
<name>residence_registration_date</name>
<rename>residence_registration_date</rename>
<update>Y</update>
</value>
<value>
<name>residence_deregistration_date</name>
<rename>residence_deregistration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_address</name>
<rename>place_stay_address</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_registration_date</name>
<rename>place_stay_registration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_deregistration_date</name>
<rename>place_stay_deregistration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_registration_type</name>
<rename>place_stay_registration_type</rename>
<update>Y</update>
</value>
<value>
<name>factual_address</name>
<rename>factual_address</rename>
<update>Y</update>
</value>
<value>
<name>factual_info_received_date</name>
<rename>factual_info_received_date</rename>
<update>Y</update>
</value>
<value>
<name>factual_info_expiry_date</name>
<rename>factual_info_expiry_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id::uuid,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateStart')::date END) AS residence_registration_date,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateEnd')::date END) AS residence_deregistration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS place_stay_address,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateStart')::date END) AS place_stay_registration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateEnd')::date END) AS place_stay_deregistration_date,
CASE
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '1' THEN 'В жилом помещении, не являющимся местом жительства физического лица'
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '2' THEN 'В учреждении уголовно-исполнительной системы'
ELSE NULL
END AS place_stay_registration_type,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN addr->>'reg' END) AS factual_address,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateStart')::date END) AS factual_info_received_date,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateEnd')::date END) AS factual_info_expiry_date
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.addresses) AS addr
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
AND c.update_date >= '${M_R_UP_DATE}'::timestamp
GROUP BY ri.recruit_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,418 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_address_flow_repeat</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/08 13:25:52.319</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/08 13:25:52.319</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Detect empty 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>Insert / update</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</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>1232</xloc>
<yloc>544</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>768</xloc>
<yloc>544</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}'
and status = 'PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>16</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}'
)
ON CONFLICT (job_name, recruitment_id)
DO UPDATE SET
status = 'PROCESSING',
execution_datetime = DEFAULT,
error_description = NULL;</sql>
<attributes/>
<GUI>
<xloc>176</xloc>
<yloc>272</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>768</xloc>
<yloc>16</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>1120</xloc>
<yloc>272</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>960</xloc>
<yloc>272</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_address</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>residence_address</name>
<rename>residence_address</rename>
<update>Y</update>
</value>
<value>
<name>residence_registration_date</name>
<rename>residence_registration_date</rename>
<update>Y</update>
</value>
<value>
<name>residence_deregistration_date</name>
<rename>residence_deregistration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_address</name>
<rename>place_stay_address</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_registration_date</name>
<rename>place_stay_registration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_deregistration_date</name>
<rename>place_stay_deregistration_date</rename>
<update>Y</update>
</value>
<value>
<name>place_stay_registration_type</name>
<rename>place_stay_registration_type</rename>
<update>Y</update>
</value>
<value>
<name>factual_address</name>
<rename>factual_address</rename>
<update>Y</update>
</value>
<value>
<name>factual_info_received_date</name>
<rename>factual_info_received_date</rename>
<update>Y</update>
</value>
<value>
<name>factual_info_expiry_date</name>
<rename>factual_info_expiry_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>768</xloc>
<yloc>272</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id::uuid,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateStart')::date END) AS residence_registration_date,
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateEnd')::date END) AS residence_deregistration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS place_stay_address,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateStart')::date END) AS place_stay_registration_date,
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateEnd')::date END) AS place_stay_deregistration_date,
CASE
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '1' THEN 'В жилом помещении, не являющимся местом жительства физического лица'
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '2' THEN 'В учреждении уголовно-исполнительной системы'
ELSE NULL
END AS place_stay_registration_type,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN addr->>'reg' END) AS factual_address,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateStart')::date END) AS factual_info_received_date,
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateEnd')::date END) AS factual_info_expiry_date
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.addresses) AS addr
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
GROUP BY ri.recruit_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>480</xloc>
<yloc>272</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>citizen_address_flow_delta.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_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/>
<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 = 'citizen_address_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>544</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>544</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>544</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>544</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>544</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>citizen_address_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_address_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/>
<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 = 'citizen_address_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>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>464</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>464</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>464</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>464</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>464</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,356 @@
<?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>citizen_address_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_address_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_address_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_address_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_address_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/>
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>704</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>704</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>704</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>citizen_address_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/citizen_address/parallel/citizen_address_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_address_job</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>704</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_need_to_repeat_job</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/08 12:27:51.630</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/08 12:27:51.630</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<field_name>need_to_repeat_job</field_name>
<variable_name>NEED_TO_REPEAT_JOB</variable_name>
<variable_type>ROOT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT EXISTS (SELECT 1
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'citizen_guardianship_job'
where je.status is null or je.status in ('ERROR', 'PROCESSING')
limit 1
) as need_to_repeat_job;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>336</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow1_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
/*
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
/*
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
SELECT
'citizen_guardianship_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow1_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
/*
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
/*
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
SELECT
'citizen_guardianship_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,254 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow2_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
/*
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
*/
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2--,
/*
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,254 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow2_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
/*
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
*/
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2--,
/*
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow3_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
*/
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
/*
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
*/
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3--,
/*
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,255 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow3_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
*/
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
/*
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
*/
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3--,
/*
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow4_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
*/
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
/*
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
*/
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4--,
/*
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow4_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
*/
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
/*
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
*/
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1--,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
*/
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4--,
/*
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
*/
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
/*
union all
SELECT
'job_citizen_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
*/
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow5_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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
*/
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
*/
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'ERROR' as status,
current_timestamp as record_created
from result_max
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,256 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_citizen_guardianship_flow5_success</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/06/16 09:14:18.787</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 09:14:18.787</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>last_recruitment_id</name>
<rename>last_recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_created_date</name>
<rename>recruitment_created_date</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH ordered AS (
SELECT
idm_id,
created_at,
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
COUNT(*) OVER () AS total_rows
FROM ervu_dashboard.recruitment
),
splitted AS (
SELECT *,
CEIL(total_rows / 5.0) AS part_size,
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
FROM ordered
),
flow_ranges AS (
SELECT
flow_num,
MIN(created_at) AS min_date,
MAX(created_at) AS max_date
FROM splitted
GROUP BY flow_num
),
recr_inf AS (
SELECT DISTINCT COALESCE(cit.recruitment_id, cit.target_recruitment_id) AS idm_id
FROM ervu_dashboard.citizen cit
join ervu_dashboard.citizen_guardianship ch on ch.recruit_id = cit.recruit_id
),
flow_data AS (
SELECT
fr.flow_num,
ri.idm_id,
(SELECT r.created_at FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
AND r.created_at BETWEEN fr.min_date AND fr.max_date
LIMIT 1) AS created_at
FROM recr_inf ri
CROSS JOIN flow_ranges fr
WHERE EXISTS (
SELECT 1 FROM ervu_dashboard.recruitment r
WHERE r.idm_id = ri.idm_id
)
),
result_ma as (
SELECT
/*
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
*/
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
FROM flow_data
),
result_max as ( --костыль
SELECT
/*
CASE
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow1
END AS cr_flow1,
idm_flow1,
CASE
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow2
END AS cr_flow2,
idm_flow2,
CASE
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow3
END AS cr_flow3,
idm_flow3,
CASE
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow4
END AS cr_flow4,
idm_flow4,
*/
CASE
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
ELSE cr_flow5
END AS cr_flow5,
idm_flow5
FROM result_ma
),
for_checkpoints as (
/*
SELECT
'job_citizen_flow1' as job_name,
idm_flow1 as last_recruitment_id,
cr_flow1 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow2' as job_name,
idm_flow2 as last_recruitment_id,
cr_flow2 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow3' as job_name,
idm_flow3 as last_recruitment_id,
cr_flow3 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
SELECT
'job_citizen_flow4' as job_name,
idm_flow4 as last_recruitment_id,
cr_flow4 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
union all
*/
SELECT
'citizen_guardianship_flow5' as job_name,
idm_flow5 as last_recruitment_id,
cr_flow5 as recruitment_created_date,
'SUCCESS' as status,
current_timestamp as record_created
from result_max
)
select * from for_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_citizen_guardianship_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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_citizen_guardianship' as job_name,
'ERROR' as status,
current_timestamp as record_created
union all
SELECT
'job_citizen_guardianship' as job_name,
'ERROR' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_citizen_guardianship_success</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/06/16 12:20:06.191</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_citizen_guardianship' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
union all
SELECT
'job_citizen_guardianship' as job_name,
'SUCCESS' as status,
current_timestamp as record_created
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_to_processing</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/06/11 16:14:31.162</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 16:14:31.162</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
'PROCESSING' AS status,
'job_citizen_guardianship' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'citizen_guardianship_flow1' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'citizen_guardianship_flow2' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'citizen_guardianship_flow3' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'citizen_guardianship_flow4' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints
UNION ALL
SELECT
'PROCESSING' AS status,
'citizen_guardianship_flow5' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>368</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,102 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_to_processing_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/06/16 13:42:26.494</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 13:42:26.494</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1248</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
'PROCESSING' AS status,
'delta_child' AS job_name,
current_timestamp AS record_created
--FROM public.etl_checkpoints</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_job_prosecution_exists</name>
<name>check_if_citizen_guardianship_job_exists</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,23 +13,23 @@
<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/06/11 15:20:18.267</created_date>
<created_date>2025/08/05 13:28:46.661</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 15:20:18.267</modified_date>
<modified_date>2025/08/05 13:28:46.661</modified_date>
</info>
<notepads>
</notepads>
<order>
<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>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
@ -44,21 +44,16 @@
</partitioning>
<fields>
<field>
<field_name>job_name</field_name>
<variable_name>PIPE</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
<field>
<field_name>status</field_name>
<variable_name>STATUS</variable_name>
<field_name>job_executed_flag</field_name>
<variable_name>JOB_EXECUTED_FLAG</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>352</yloc>
<xloc>672</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -75,29 +70,17 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
COALESCE(job_name, 'job_prosecution') AS job_name,
COALESCE(status, 'NEW') AS status,
current_timestamp::timestamp as record_created
FROM (
SELECT job_name, status
FROM public.etl_checkpoints
WHERE job_name = 'job_prosecution'
UNION ALL
SELECT NULL, NULL
WHERE NOT EXISTS (
SELECT 1
FROM public.etl_checkpoints
WHERE job_name = 'job_prosecution'
)
) t</sql>
<sql>SELECT EXISTS (
SELECT 1
FROM etl.job_execution
WHERE job_name = 'citizen_guardianship_job'
limit 1
) AS job_executed_flag;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>
<yloc>352</yloc>
<xloc>384</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
@ -111,17 +94,17 @@ FROM (
<method>none</method>
<schema_name/>
</partitioning>
<loglevel>Basic</loglevel>
<displayHeader>Y</displayHeader>
<fields>
</fields>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<loglevel>Basic</loglevel>
<logmessage>${STATUS}</logmessage>
<fields>
</fields>
<attributes/>
<GUI>
<xloc>960</xloc>
<yloc>240</yloc>
<xloc>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_job_citizen_guardianship_exists</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/06/11 15:20:18.267</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/11 15:20:18.267</modified_date>
</info>
<notepads>
</notepads>
<order>
<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>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<field_name>job_name</field_name>
<variable_name>PIPE</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
<field>
<field_name>status</field_name>
<variable_name>STATUS</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
COALESCE(job_name, 'job_citizen_guardianship') AS job_name,
COALESCE(status, 'NEW') AS status,
current_timestamp::timestamp as record_created
FROM (
SELECT job_name, status
FROM public.etl_checkpoints
WHERE job_name = 'job_citizen_guardianship'
UNION ALL
SELECT NULL, NULL
WHERE NOT EXISTS (
SELECT 1
FROM public.etl_checkpoints
WHERE job_name = 'job_citizen_guardianship'
)
) t</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>
<yloc>352</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>${STATUS}</logmessage>
<attributes/>
<GUI>
<xloc>960</xloc>
<yloc>240</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,122 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>delta_citizen_guardianship</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/06/03 16:10:48.509</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/03 16:10:48.509</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1072</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на пустую строку
--AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>job_guardianship</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<workflow_status>0</workflow_status>
<created_user>-</created_user>
<created_date>2025/06/05 14:27:15.055</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/05 14:27:15.055</modified_date>
<parameters>
<parameter>
<name>M_R_CR_DATE</name>
<default_value>3001-01-01 00:00:00</default_value>
<description/>
</parameter>
<parameter>
<name>M_R_UP_DATE</name>
<default_value/>
<description/>
</parameter>
</parameters>
<actions>
<action>
<name>Start</name>
<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>416</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_citizen_guardianship_job_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/citizen_guardianship/checkpoints/check_if_citizen_guardianship_job_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>608</xloc>
<yloc>208</yloc>
<attributes_hac/>
</action>
<action>
<name>citizen_guardianship_job_exists_check</name>
<description/>
<type>SIMPLE_EVAL</type>
<attributes/>
<comparevalue/>
<fieldname/>
<fieldtype>boolean</fieldtype>
<mask/>
<maxvalue/>
<minvalue/>
<successbooleancondition>false</successbooleancondition>
<successcondition>equal</successcondition>
<successnumbercondition>equal</successnumbercondition>
<successwhenvarset>N</successwhenvarset>
<valuetype>variable</valuetype>
<variablename>JOB_EXECUTED_FLAG</variablename>
<parallel>N</parallel>
<xloc>880</xloc>
<yloc>208</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/citizen_guardianship/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>1248</xloc>
<yloc>208</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/citizen_guardianship/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>1120</xloc>
<yloc>512</yloc>
<attributes_hac/>
</action>
<action>
<name>check_if_need_to_repeat_job.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/citizen_guardianship/check_if_need_to_repeat_job.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>880</xloc>
<yloc>368</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>880</xloc>
<yloc>512</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/citizen_guardianship/recruitment_five_flow_delta.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>880</xloc>
<yloc>704</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>check_if_citizen_guardianship_job_exists.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>check_if_citizen_guardianship_job_exists.hpl</from>
<to>citizen_guardianship_job_exists_check</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>citizen_guardianship_job_exists_check</from>
<to>recruitments_five_flow.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>citizen_guardianship_job_exists_check</from>
<to>check_if_need_to_repeat_job.hpl</to>
<enabled>Y</enabled>
<evaluation>N</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>check_if_need_to_repeat_job.hpl</from>
<to>Simple evaluation</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>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>

View file

@ -0,0 +1,512 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_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>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Create job execution record</from>
<to>Table input</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Add constants</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Add constants</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success 2</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>1280</xloc>
<yloc>544</yloc>
</GUI>
</transform>
<transform>
<name>Add constants</name>
<type>Constant</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>is_guardian</name>
<nullif>true</nullif>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<type>Boolean</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>0</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>1280</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on success 2</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}'
and status = 'PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1840</xloc>
<yloc>0</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>1536</xloc>
<yloc>160</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 2</send_true_to>
<attributes/>
<GUI>
<xloc>1520</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>0</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>912</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,
ch->'fioOpek'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo'
) AS full_name,
MAKE_DATE(
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
ch->>'snils' AS snils
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date;</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>Y</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>guardianship_external_id</column_name>
<stream_name>guardianship_external_id</stream_name>
</field>
<field>
<column_name>guardian_id_ern</column_name>
<stream_name>guardian_id_ern</stream_name>
</field>
<field>
<column_name>last_name</column_name>
<stream_name>last_name</stream_name>
</field>
<field>
<column_name>first_name</column_name>
<stream_name>first_name</stream_name>
</field>
<field>
<column_name>middle_name</column_name>
<stream_name>middle_name</stream_name>
</field>
<field>
<column_name>full_name</column_name>
<stream_name>full_name</stream_name>
</field>
<field>
<column_name>birth_date</column_name>
<stream_name>birth_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_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>citizen_guardianship</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>is_guardian</name>
<rename>is_guardian</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1280</xloc>
<yloc>0</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>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,228 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow1</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<pipeline_status>0</pipeline_status>
<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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<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>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>560</xloc>
<yloc>208</yloc>
<note>сведения о лице опекаемом или находящемся на попечении</note>
<width>349</width>
</notepad>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Select values 4 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 4 2</from>
<to>Get variables</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Get variables</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>recruitment_id</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
<variable>ID_F1</variable>
</field>
</fields>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>960</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Select values 4 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>ID_F1</name>
<rename>ID_F1</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F1}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F1}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Select values 4 2</source_transform>
<target_transform>Get variables</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,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow2</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<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>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>656</xloc>
<yloc>208</yloc>
<note>сведения о лице опекаемом или находящемся на попечении</note>
<width>349</width>
</notepad>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update 2</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update 2</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F2}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F2}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow3</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<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>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>800</xloc>
<yloc>256</yloc>
<note>сведения о лице опекаемом или находящемся на попечении</note>
<width>349</width>
</notepad>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F3}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F3}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow4</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<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>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>640</xloc>
<yloc>240</yloc>
<note>сведения о лице опекаемом или находящемся на попечении</note>
<width>349</width>
</notepad>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1088</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F4}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F4}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>528</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow5</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/05/21 14:05:02.260</created_date>
<modified_user>-</modified_user>
<modified_date>2025/05/21 14:05:02.260</modified_date>
</info>
<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>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>26</height>
<xloc>704</xloc>
<yloc>256</yloc>
<note>сведения о лице опекаемом или находящемся на попечении</note>
<width>349</width>
</notepad>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with person as
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${ID_F5}' != '' -- Проверка на пустую строку
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${ID_F5}'
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
select
r.recruit_id AS recruit_id,
concat_ws(' ', ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from ervu_dashboard.citizen r
join person on r.recruit_id = person.recruit_id</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>560</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,527 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_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>Add constants</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Add constants</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty 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>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success</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>1200</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Add constants</name>
<type>Constant</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>is_guardian</name>
<nullif>true</nullif>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<type>Boolean</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>0</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>
<argument>
<name>error_code</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>1200</xloc>
<yloc>224</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',
error_description = null
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}'
and status = 'DELTA_PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1712</xloc>
<yloc>0</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
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>1456</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>1456</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>0</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>864</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>first_name</name>
<rename>first_name</rename>
<update>Y</update>
</value>
<value>
<name>last_name</name>
<rename>last_name</rename>
<update>Y</update>
</value>
<value>
<name>middle_name</name>
<rename>middle_name</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>guardian_id_ern</name>
<rename>guardian_id_ern</rename>
<update>Y</update>
</value>
<value>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,
ch->'fioOpek'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo'
) AS full_name,
MAKE_DATE(
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
ch->>'snils' AS snils
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
AND c.update_date >= '${M_R_UP_DATE}'::timestamp;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>544</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>is_guardian</name>
<rename>is_guardian</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>0</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,542 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_guardianship_flow_repeat</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/08 13:25:52.319</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/08 13:25:52.319</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>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Add constants</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Add constants</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Change job status on error</from>
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Filter rows</from>
<to>Change job status on success</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Detect empty stream</from>
<to>Change job status on success</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>1232</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>Add constants</name>
<type>Constant</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>is_guardian</name>
<nullif>true</nullif>
<precision>-1</precision>
<set_empty_string>N</set_empty_string>
<type>Boolean</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>48</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>
<argument>
<name>error_code</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>1232</xloc>
<yloc>208</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}'
and status = 'PROCESSING';
</sql>
<attributes/>
<GUI>
<xloc>1808</xloc>
<yloc>48</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}'
)
ON CONFLICT (job_name, recruitment_id)
DO UPDATE SET
status = 'PROCESSING',
execution_datetime = DEFAULT,
error_description = NULL</sql>
<attributes/>
<GUI>
<xloc>160</xloc>
<yloc>208</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>1488</xloc>
<yloc>192</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>1504</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>48</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>896</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_guardianship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>first_name</name>
<rename>first_name</rename>
<update>Y</update>
</value>
<value>
<name>last_name</name>
<rename>last_name</rename>
<update>Y</update>
</value>
<value>
<name>middle_name</name>
<rename>middle_name</rename>
<update>Y</update>
</value>
<value>
<name>birth_date</name>
<rename>birth_date</rename>
<update>Y</update>
</value>
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
</value>
<value>
<name>guardian_id_ern</name>
<rename>guardian_id_ern</rename>
<update>Y</update>
</value>
<value>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
<name>snils</name>
<rename>snils</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
ri.recruit_id AS recruit_id,
(ch->>'id')::uuid AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,
ch->'fioOpek'->>'otchestvo' AS middle_name,
CONCAT_WS(' ',
ch->'fioOpek'->>'familiya',
ch->'fioOpek'->>'imya',
ch->'fioOpek'->>'otchestvo'
) AS full_name,
MAKE_DATE(
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
) AS birth_date,
ch->>'snils' AS snils
FROM ervu_dashboard.recruits_info ri
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
WHERE
'${IDM_ID}' != ''
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>is_guardian</name>
<rename>is_guardian</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1232</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Insert / update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>citizen_guardianship_flow_delta.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_delta.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_delta.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_delta.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_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>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 = 'citizen_guardianship_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>352</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>544</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>544</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>544</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>544</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>recruitment_id</field>
<input/>
</variable_mapping>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>544</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,360 @@
<?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>citizen_guardianship_flow_repeat.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_repeat.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_repeat.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_flow_repeat.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>citizen_guardianship_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 = 'citizen_guardianship_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>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>464</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>464</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>464</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>464</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>464</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -0,0 +1,356 @@
<?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>citizen_guardianship_flow.hpl</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_guardianship_flow.hpl 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_guardianship_flow.hpl 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_guardianship_flow.hpl 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get all recruitments ordered by created_date</from>
<to>citizen_guardianship_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;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>704</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>704</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>704</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>citizen_guardianship_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/citizen_guardianship/parallel/citizen_guardianship_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>
<variable_mapping>
<variable>JOB_NAME</variable>
<field/>
<input>citizen_guardianship_job</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>704</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>change_status_delta_child_flow3_error</name>
<name>check_if_need_to_repeat_job</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
@ -13,22 +13,22 @@
<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/06/16 12:20:06.191</created_date>
<created_date>2025/08/08 12:27:51.630</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/16 12:20:06.191</modified_date>
<modified_date>2025/08/08 12:27:51.630</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<name>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -37,37 +37,18 @@
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>job_name</field>
<name>job_name</name>
</key>
<schema>public</schema>
<table>etl_checkpoints</table>
<value>
<name>job_name</name>
<rename>job_name</rename>
<update>N</update>
</value>
<value>
<name>record_created</name>
<rename>record_created</rename>
<update>Y</update>
</value>
<value>
<name>status</name>
<rename>status</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<fields>
<field>
<field_name>need_to_repeat_job</field_name>
<variable_name>NEED_TO_REPEAT_JOB</variable_name>
<variable_type>ROOT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>304</yloc>
<xloc>624</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
@ -84,15 +65,19 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
'delta_child_flow3' as job_name,
'ERROR' as status,
current_timestamp as record_created</sql>
<sql>SELECT EXISTS (SELECT 1
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'citizen_information_search_job'
where je.status is null or je.status in ('ERROR', 'PROCESSING')
limit 1
) as need_to_repeat_job;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
<xloc>336</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>check_if_citizen_information_search_job_exists</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 13:28:46.661</created_date>
<modified_user>-</modified_user>
<modified_date>2025/08/05 13:28:46.661</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Set variables</from>
<to>Write to log</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Set variables</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Set variables</name>
<type>SetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<field_name>job_executed_flag</field_name>
<variable_name>JOB_EXECUTED_FLAG</variable_name>
<variable_type>PARENT_WORKFLOW</variable_type>
</field>
</fields>
<use_formatting>Y</use_formatting>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT EXISTS (
SELECT 1
FROM etl.job_execution
WHERE job_name = 'citizen_information_search_job'
limit 1
) AS job_executed_flag;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>384</xloc>
<yloc>336</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>
<loglevel>Basic</loglevel>
<displayHeader>Y</displayHeader>
<limitRows>N</limitRows>
<limitRowsNumber>0</limitRowsNumber>
<logmessage>${STATUS}</logmessage>
<fields>
</fields>
<attributes/>
<GUI>
<xloc>944</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

Some files were not shown because too many files have changed in this diff Show more