Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
cf4b629fe8
29 changed files with 1704 additions and 273 deletions
|
|
@ -228,7 +228,6 @@
|
|||
</field>
|
||||
</fields>
|
||||
<file_variable_type>CURRENT_WORKFLOW</file_variable_type>
|
||||
<filename/>
|
||||
<replacevars>N</replacevars>
|
||||
<parallel>N</parallel>
|
||||
<xloc>224</xloc>
|
||||
|
|
@ -380,6 +379,26 @@ M_R_CR_DATE
|
|||
3001-01-01 00:00:00</note>
|
||||
<width>117</width>
|
||||
</notepad>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>26</height>
|
||||
<xloc>631</xloc>
|
||||
<yloc>124</yloc>
|
||||
<note>dataSved - не предусмотрена</note>
|
||||
<width>171</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
|
|
|
|||
|
|
@ -178,6 +178,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>/*
|
||||
with
|
||||
adresses as ( -- по одному ли адресу тут должно быть??
|
||||
|
|
@ -257,7 +258,7 @@ SELECT
|
|||
system_id_ern AS id_ern, -- id единого регистра населения
|
||||
ra.id_pack,
|
||||
r.registered_reason,-- причина постановки на воинский учет
|
||||
r.(vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
(r.vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
r.vu_document_received,-- факт выдачи документа воинского учета
|
||||
r.vu_document_receive_date, -- дата выдачи документа воинского учета
|
||||
r.vu_unset_date, -- дата снятия с учета
|
||||
|
|
@ -425,14 +426,11 @@ ${LIMIT_FW}</sql>
|
|||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
|
|||
|
|
@ -273,7 +273,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -443,6 +442,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>/*
|
||||
with
|
||||
adresses as ( -- по одному ли адресу тут должно быть??
|
||||
|
|
@ -522,7 +522,7 @@ SELECT
|
|||
system_id_ern AS id_ern, -- id единого регистра населения
|
||||
ra.id_pack,
|
||||
r.registered_reason,-- причина постановки на воинский учет
|
||||
r.(vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
(r.vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
r.vu_document_received,-- факт выдачи документа воинского учета
|
||||
r.vu_document_receive_date, -- дата выдачи документа воинского учета
|
||||
r.vu_unset_date, -- дата снятия с учета
|
||||
|
|
|
|||
|
|
@ -287,7 +287,6 @@ DO UPDATE SET
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
@ -457,6 +456,7 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>/*
|
||||
with
|
||||
adresses as ( -- по одному ли адресу тут должно быть??
|
||||
|
|
@ -536,7 +536,7 @@ SELECT
|
|||
system_id_ern AS id_ern, -- id единого регистра населения
|
||||
ra.id_pack,
|
||||
r.registered_reason,-- причина постановки на воинский учет
|
||||
r.(vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
(r.vu_current_info->'personalDataProcessingAgreeConfirmed')::bool AS has_agree_confirmed, -- получено согласте на обработку персональных данных
|
||||
r.vu_document_received,-- факт выдачи документа воинского учета
|
||||
r.vu_document_receive_date, -- дата выдачи документа воинского учета
|
||||
r.vu_unset_date, -- дата снятия с учета
|
||||
|
|
|
|||
|
|
@ -320,15 +320,17 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select
|
||||
ri.recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis, -- основание приобретения гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number, -- номер решения о приобретении гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date, -- дата решения о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority, -- наименование органа, принявшего решение о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis, -- основание выхода гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number, -- номер решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority, -- наименование органа, принявшего решение о выходе из гражданства РФ +
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null THEN 1
|
||||
|
|
@ -397,6 +399,10 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<column_name>renunciation_authority</column_name>
|
||||
<stream_name>renunciation_authority</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>source_update_date</column_name>
|
||||
<stream_name>source_update_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
|
|
@ -434,19 +440,16 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>acquired_citizenship</field>
|
||||
<name>acquired_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -328,19 +328,16 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>acquiring_number</field>
|
||||
<name>acquiring_number</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>renunciation_number</field>
|
||||
<name>renunciation_number</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship</table>
|
||||
|
|
@ -389,6 +386,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>renunciation_authority</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -410,15 +412,17 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select
|
||||
ri.recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis, -- основание приобретения гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number, -- номер решения о приобретении гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date, -- дата решения о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority, -- наименование органа, принявшего решение о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis, -- основание выхода гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number, -- номер решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority, -- наименование органа, принявшего решение о выходе из гражданства РФ +
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null THEN 1
|
||||
|
|
@ -427,7 +431,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
FROM ervu_dashboard.recruits_info ri
|
||||
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
and to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'
|
||||
--AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
|
|
@ -451,19 +456,16 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>acquired_citizenship</field>
|
||||
<name>acquired_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -404,6 +404,11 @@ DO UPDATE SET
|
|||
<rename>renunciation_authority</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -425,15 +430,17 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>select
|
||||
ri.recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis, -- основание приобретения гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number, -- номер решения о приобретении гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date, -- дата решения о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority, -- наименование органа, принявшего решение о приобретении гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis, -- основание выхода гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number, -- номер решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date, -- дата решения о выходе из гражданства РФ +
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority, -- наименование органа, принявшего решение о выходе из гражданства РФ +
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null THEN 1
|
||||
|
|
@ -466,19 +473,16 @@ where --ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>acquired_citizenship</field>
|
||||
<name>acquired_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<to>citizenship_flow_delta.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>get_max_source_update_date</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
|
|
@ -60,13 +65,22 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
<sql>WITH mud AS (
|
||||
SELECT
|
||||
recruitment_id,
|
||||
MAX(execution_datetime) AS max_upd_date
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
|
||||
GROUP BY recruitment_id
|
||||
)
|
||||
SELECT
|
||||
r.idm_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'citizenship_job'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||
JOIN recruits_info ri
|
||||
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||
AND ri.updated_at > mud.max_upd_date;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -329,6 +343,29 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>get_max_source_update_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT max(source_update_date) AS max_source_update_date
|
||||
FROM ervu_dashboard.citizenship;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>144</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -325,6 +325,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH base AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
|
|
@ -354,6 +355,7 @@ citizen AS (
|
|||
)
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(data->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
CASE
|
||||
WHEN type='residense' THEN data->>'osnovPriobrPP'
|
||||
END::text AS residense_right_basis,
|
||||
|
|
@ -426,6 +428,10 @@ FROM citizen</sql>
|
|||
<column_name>type</column_name>
|
||||
<stream_name>type</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>source_update_date</column_name>
|
||||
<stream_name>source_update_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
|
|
@ -463,25 +469,21 @@ FROM citizen</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_residence</field>
|
||||
<name>has_foreign_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_citizenship</field>
|
||||
<name>has_foreign_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -333,13 +333,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type</field>
|
||||
<name>type</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
|
|
@ -378,6 +376,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -399,35 +402,44 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH base AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.info
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||
WHERE '${IDM_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array'
|
||||
OR jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array'
|
||||
AND (
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array'
|
||||
OR jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array'
|
||||
)
|
||||
),
|
||||
citizen AS (
|
||||
filtered_data AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') AS data,
|
||||
recruit_id,
|
||||
elem AS data,
|
||||
'citizenship' AS type
|
||||
FROM base ri
|
||||
FROM base ri,
|
||||
LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') AS elem
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array'
|
||||
AND to_date(elem->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedPP') AS data,
|
||||
recruit_id,
|
||||
elem AS data,
|
||||
'residense' AS type
|
||||
FROM base ri WHERE jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array'
|
||||
FROM base ri,
|
||||
LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedPP') AS elem
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array'
|
||||
AND to_date(elem->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
)
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(data->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
CASE
|
||||
WHEN type='residense' THEN data->>'osnovPriobrPP'
|
||||
END::text AS residense_right_basis,
|
||||
|
|
@ -472,25 +484,21 @@ FROM citizen</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_residence</field>
|
||||
<name>has_foreign_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_citizenship</field>
|
||||
<name>has_foreign_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -393,6 +393,11 @@ DO UPDATE SET
|
|||
<rename>type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -414,6 +419,7 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH base AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
|
|
@ -443,6 +449,7 @@ citizen AS (
|
|||
)
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(data->>'dataSved', 'YYYY-MM-DD') AS source_update_date, -- дата обновления сведений
|
||||
CASE
|
||||
WHEN type='residense' THEN data->>'osnovPriobrPP'
|
||||
END::text AS residense_right_basis,
|
||||
|
|
@ -487,25 +494,21 @@ FROM citizen</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_residence</field>
|
||||
<name>has_foreign_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_foreign_citizenship</field>
|
||||
<name>has_foreign_citizenship</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<to>citizenship_foreign_flow_delta.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>get_max_source_update_date</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
|
|
@ -60,14 +65,23 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
<sql>WITH mud AS (
|
||||
SELECT
|
||||
recruitment_id,
|
||||
MAX(execution_datetime) AS max_upd_date
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
|
||||
GROUP BY recruitment_id
|
||||
)
|
||||
SELECT
|
||||
r.idm_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'citizenship_foreign_job'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||
JOIN recruits_info ri
|
||||
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||
AND ri.updated_at > mud.max_upd_date;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
|
|
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -329,6 +343,29 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>get_max_source_update_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT max(source_update_date) AS max_source_update_date
|
||||
FROM ervu_dashboard.citizenship_foreign;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>160</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -325,6 +325,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base AS (
|
||||
SELECT
|
||||
|
|
@ -341,6 +342,7 @@ base AS (
|
|||
all_data AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'kodStatus' AS status,-- статус удостоверения // 1 - действителен, 2 - недействителен
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' AS licence_series, -- серия и номер
|
||||
NULL AS licence_number, -- ?серия и номер в одном поле?
|
||||
|
|
@ -360,7 +362,8 @@ all_data AS (
|
|||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
'1' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'kodStatusUTM'
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
'1' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
(SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
|
||||
|
|
@ -377,7 +380,8 @@ all_data AS (
|
|||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
'0' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'kodStatusUTM'
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
'0' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
(SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
|
||||
|
|
@ -462,6 +466,10 @@ FROM all_data</sql>
|
|||
<column_name>tractor_driver</column_name>
|
||||
<stream_name>tractor_driver</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>source_update_date</column_name>
|
||||
<stream_name>source_update_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
|
|
@ -499,25 +507,21 @@ FROM all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>tractor_license</field>
|
||||
<name>tractor_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_driver_license</field>
|
||||
<name>has_driver_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -333,19 +333,16 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>tractor_driver</field>
|
||||
<name>tractor_driver</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>driver</field>
|
||||
<name>driver</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
|
|
@ -399,6 +396,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>tractor_driver</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -420,15 +422,28 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base AS (
|
||||
SELECT
|
||||
ri.recruit_id recruit_id,
|
||||
ri.info
|
||||
ri.info,
|
||||
CASE
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
THEN to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataSved', 'YYYY-MM-DD')
|
||||
END as driver_update_date,
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' IS NOT NULL
|
||||
THEN to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataSved', 'YYYY-MM-DD')
|
||||
END as akt_update_date,
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM' IS NOT NULL
|
||||
THEN to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataSved', 'YYYY-MM-DD')
|
||||
END as pred_update_date
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
--AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
OR ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' IS NOT NULL
|
||||
OR ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM' IS NOT NULL
|
||||
|
|
@ -436,6 +451,7 @@ base AS (
|
|||
all_data AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.driver_update_date AS source_update_date,
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'kodStatus' AS status,-- статус удостоверения // 1 - действителен, 2 - недействителен
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' AS licence_series, -- серия и номер
|
||||
NULL AS licence_number, -- ?серия и номер в одном поле?
|
||||
|
|
@ -449,12 +465,14 @@ all_data AS (
|
|||
NULL AS return_date,
|
||||
false AS tractor_driver
|
||||
FROM base ri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
AND ri.driver_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.akt_update_date AS source_update_date,
|
||||
'1' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
|
|
@ -467,11 +485,13 @@ all_data AS (
|
|||
true AS tractor_driver
|
||||
FROM base ri
|
||||
WHERE ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' IS NOT NULL
|
||||
AND ri.akt_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.pred_update_date AS source_update_date,
|
||||
'0' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
|
|
@ -484,6 +504,7 @@ all_data AS (
|
|||
true AS tractor_driver
|
||||
FROM base ri
|
||||
WHERE ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM' IS NOT NULL
|
||||
AND ri.pred_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
)
|
||||
SELECT
|
||||
*,
|
||||
|
|
@ -517,25 +538,21 @@ FROM all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>tractor_license</field>
|
||||
<name>tractor_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_driver_license</field>
|
||||
<name>has_driver_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -414,6 +414,11 @@ DO UPDATE SET
|
|||
<rename>tractor_driver</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -435,6 +440,7 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base AS (
|
||||
SELECT
|
||||
|
|
@ -451,6 +457,7 @@ base AS (
|
|||
all_data AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'kodStatus' AS status,-- статус удостоверения // 1 - действителен, 2 - недействителен
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' AS licence_series, -- серия и номер
|
||||
NULL AS licence_number, -- ?серия и номер в одном поле?
|
||||
|
|
@ -470,7 +477,8 @@ all_data AS (
|
|||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
'1' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'kodStatusUTM'
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
'1' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
(SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
|
||||
|
|
@ -487,7 +495,8 @@ all_data AS (
|
|||
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
'0' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'kodStatusUTM'
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
'0' AS status, -- статус удостоверения тракториста // ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'kodStatusUTM'
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'serUTM' AS licence_series, -- серия удостоверения тракториста
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'nomUTM' AS licence_number, -- номер удостоверения тракториста
|
||||
(SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
|
||||
|
|
@ -532,25 +541,21 @@ FROM all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>tractor_license</field>
|
||||
<name>tractor_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_driver_license</field>
|
||||
<name>has_driver_license</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -146,7 +146,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -197,7 +197,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -248,7 +248,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -299,7 +299,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<to>drivers_licence_flow_repeat.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>get_max_source_update_date</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
|
|
@ -60,14 +65,23 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
<sql>WITH mud AS (
|
||||
SELECT
|
||||
recruitment_id,
|
||||
MAX(execution_datetime) AS max_upd_date
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
|
||||
GROUP BY recruitment_id
|
||||
)
|
||||
SELECT
|
||||
r.idm_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'drivers_licence_job'
|
||||
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||
JOIN recruits_info ri
|
||||
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||
AND ri.updated_at > mud.max_upd_date;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>272</xloc>
|
||||
|
|
@ -95,7 +109,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -146,7 +160,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -197,7 +211,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -248,7 +262,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -299,7 +313,7 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -329,6 +343,29 @@ where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
|||
<yloc>528</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>get_max_source_update_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT max(source_update_date) AS max_source_update_date
|
||||
FROM ervu_dashboard.drivers_licence;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>64</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
|
|
@ -50,11 +50,6 @@
|
|||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_output</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_input</from>
|
||||
<to>Identify last row in a stream</to>
|
||||
|
|
@ -65,6 +60,31 @@
|
|||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_output</from>
|
||||
<to>Block until transforms finish</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Block until transforms finish</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Identify last row in a stream</from>
|
||||
<to>Group by</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Group by</from>
|
||||
<to>Update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Update</from>
|
||||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Abort</name>
|
||||
|
|
@ -82,8 +102,30 @@
|
|||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Block until transforms finish</name>
|
||||
<type>BlockUntilTransformsFinish</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1168</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -117,8 +159,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>992</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -148,7 +190,7 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -230,10 +272,80 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Group by</name>
|
||||
<type>GroupBy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<add_linenr>N</add_linenr>
|
||||
<all_rows>N</all_rows>
|
||||
<directory>${java.io.tmpdir}</directory>
|
||||
<fields>
|
||||
<field>
|
||||
<aggregate>has_incapacity_info</aggregate>
|
||||
<subject>has_incapacity_info</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_id</aggregate>
|
||||
<subject>source_id</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_update_date</aggregate>
|
||||
<subject>source_update_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>capacity_status</aggregate>
|
||||
<subject>capacity_status</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>court_name</aggregate>
|
||||
<subject>court_name</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>register_date</aggregate>
|
||||
<subject>register_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>deregistration_date</aggregate>
|
||||
<subject>deregistration_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>last_row</aggregate>
|
||||
<subject>last_row</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
</fields>
|
||||
<give_back_row>N</give_back_row>
|
||||
<group>
|
||||
<field>
|
||||
<name>recruit_id</name>
|
||||
</field>
|
||||
</group>
|
||||
<ignore_aggregate>N</ignore_aggregate>
|
||||
<prefix>grp</prefix>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Identify last row in a stream</name>
|
||||
<type>DetectLastRow</type>
|
||||
|
|
@ -252,6 +364,41 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>N</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_incapacity_info</name>
|
||||
<rename>has_incapacity_info</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>Y</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>912</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>incapacity_input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -265,13 +412,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH filteredData AS (
|
||||
SELECT ri.recruit_id,
|
||||
ri.info -> 'svedFL' -> 'svedNedeesp' -> 'nedeesposob' as nedeesposob_arr
|
||||
FROM recruits_info ri
|
||||
WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedNedeesp' -> 'nedeesposob') = 'array'
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
-- AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
)
|
||||
SELECT fd.recruit_id,
|
||||
nedeesposob_elem ->> 'id' AS source_id,
|
||||
|
|
@ -279,7 +425,8 @@ SELECT fd.recruit_id,
|
|||
nedeesposob_elem ->> 'naimStatus' AS capacity_status,
|
||||
nedeesposob_elem ->> 'naimOrg' AS court_name,
|
||||
to_date(nedeesposob_elem ->> 'dataPrisv', 'YYYY-MM-DD') AS register_date,
|
||||
to_date(nedeesposob_elem ->> 'dataOkonch', 'YYYY-MM-DD') AS deregistration_date
|
||||
to_date(nedeesposob_elem ->> 'dataOkonch', 'YYYY-MM-DD') AS deregistration_date,
|
||||
true as has_incapacity_info
|
||||
FROM filteredData fd
|
||||
CROSS JOIN LATERAL jsonb_array_elements(fd.nedeesposob_arr -> 'svedFL' -> 'svedNedeesp' -> 'nedeesposob') AS nedeesposob_elem;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
|
|
@ -347,11 +494,23 @@ FROM filteredData fd
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>992</xloc>
|
||||
<xloc>912</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<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/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
<error>
|
||||
<source_transform>incapacity_output</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
|
|
|
|||
|
|
@ -56,13 +56,33 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_upsert</from>
|
||||
<to>Filter rows</to>
|
||||
<from>Detect empty stream</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Detect empty stream</from>
|
||||
<to>Change job status on success</to>
|
||||
<from>Group by</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>Identify last row in a stream</from>
|
||||
<to>Group by</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_upsert</from>
|
||||
<to>Block until transforms finish</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Block until transforms finish</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
|
|
@ -82,7 +102,7 @@
|
|||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1744</xloc>
|
||||
<xloc>1888</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -117,7 +137,7 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1520</xloc>
|
||||
<xloc>1568</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -148,7 +168,7 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1744</xloc>
|
||||
<xloc>1888</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -233,10 +253,80 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1744</xloc>
|
||||
<xloc>1888</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Group by</name>
|
||||
<type>GroupBy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<add_linenr>N</add_linenr>
|
||||
<all_rows>N</all_rows>
|
||||
<directory>${java.io.tmpdir}</directory>
|
||||
<fields>
|
||||
<field>
|
||||
<aggregate>has_incapacity_info</aggregate>
|
||||
<subject>has_incapacity_info</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_id</aggregate>
|
||||
<subject>source_id</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_update_date</aggregate>
|
||||
<subject>source_update_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>capacity_status</aggregate>
|
||||
<subject>capacity_status</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>court_name</aggregate>
|
||||
<subject>court_name</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>register_date</aggregate>
|
||||
<subject>register_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>deregistration_date</aggregate>
|
||||
<subject>deregistration_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>last_row</aggregate>
|
||||
<subject>last_row</subject>
|
||||
<type>FIRST_INCL_NULL</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>1232</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Identify last row in a stream</name>
|
||||
<type>DetectLastRow</type>
|
||||
|
|
@ -255,6 +345,41 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>N</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_incapacity_info</name>
|
||||
<rename>has_incapacity_info</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>Y</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1392</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>incapacity_input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -268,7 +393,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH filteredData AS (SELECT ri.recruit_id,
|
||||
ri.info -> 'svedFL' -> 'svedNedeesp' -> 'nedeesposob' as nedeesposob_arr
|
||||
FROM recruits_info ri
|
||||
|
|
@ -351,11 +475,45 @@ WHERE to_date(nedeesposob_elem ->> 'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPD
|
|||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1520</xloc>
|
||||
<xloc>1568</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Block until transforms finish</name>
|
||||
<type>BlockUntilTransformsFinish</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1744</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Update</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
<error>
|
||||
<source_transform>incapacity_upsert</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
|
|
|
|||
|
|
@ -50,11 +50,6 @@
|
|||
<to>incapacity_upsert</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_upsert</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_upsert</from>
|
||||
<to>Change job status on error</to>
|
||||
|
|
@ -65,6 +60,31 @@
|
|||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Group by</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>Identify last row in a stream</from>
|
||||
<to>Group by</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_upsert</from>
|
||||
<to>Block until transforms finish</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Block until transforms finish</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Abort</name>
|
||||
|
|
@ -82,7 +102,7 @@
|
|||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1344</xloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>640</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -148,7 +168,7 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1344</xloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -233,7 +253,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1344</xloc>
|
||||
<xloc>1424</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -268,7 +288,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH filteredData AS (
|
||||
SELECT ri.recruit_id,
|
||||
ri.info -> 'svedFL' -> 'svedNedeesp' -> 'nedeesposob' as nedeesposob_arr
|
||||
|
|
@ -356,6 +375,133 @@ FROM filteredData fd
|
|||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Group by</name>
|
||||
<type>GroupBy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<add_linenr>N</add_linenr>
|
||||
<all_rows>N</all_rows>
|
||||
<directory>${java.io.tmpdir}</directory>
|
||||
<fields>
|
||||
<field>
|
||||
<aggregate>has_incapacity_info</aggregate>
|
||||
<subject>has_incapacity_info</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_id</aggregate>
|
||||
<subject>source_id</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>source_update_date</aggregate>
|
||||
<subject>source_update_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>capacity_status</aggregate>
|
||||
<subject>capacity_status</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>court_name</aggregate>
|
||||
<subject>court_name</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>register_date</aggregate>
|
||||
<subject>register_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>deregistration_date</aggregate>
|
||||
<subject>deregistration_date</subject>
|
||||
<type>FIRST_INCL_NULL</type>
|
||||
</field>
|
||||
<field>
|
||||
<aggregate>last_row</aggregate>
|
||||
<subject>last_row</subject>
|
||||
<type>FIRST_INCL_NULL</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>832</xloc>
|
||||
<yloc>640</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<type>Update</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>N</error_ignored>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>has_incapacity_info</name>
|
||||
<rename>has_incapacity_info</rename>
|
||||
</value>
|
||||
</lookup>
|
||||
<skip_lookup>Y</skip_lookup>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>976</xloc>
|
||||
<yloc>640</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Block until transforms finish</name>
|
||||
<type>BlockUntilTransformsFinish</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1280</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>incapacity_upsert</source_transform>
|
||||
|
|
@ -369,6 +515,18 @@ FROM filteredData fd
|
|||
<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/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
|
|||
|
|
@ -340,6 +340,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as(
|
||||
SELECT
|
||||
|
|
@ -354,7 +355,7 @@ prop AS (
|
|||
SELECT
|
||||
base.recruit_id,
|
||||
'realty' AS property_type,
|
||||
ry.value AS property_data
|
||||
property_data.value AS property_data
|
||||
FROM base
|
||||
LEFT JOIN LATERAL jsonb_array_elements(
|
||||
CASE
|
||||
|
|
@ -362,7 +363,7 @@ prop AS (
|
|||
THEN base.info->'svedFL'->'svedON'->'on'
|
||||
ELSE '[]'::jsonb
|
||||
END
|
||||
) AS ry ON true
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array'
|
||||
|
||||
UNION ALL
|
||||
|
|
@ -417,9 +418,10 @@ all_data as(
|
|||
-- Недвижимость
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля
|
||||
property_data->'adrObSob'->>'adrObSobTekst' AS address,
|
||||
property_data->>'kodVidPrav' AS vehicle_type,
|
||||
property_data->>'kodVidPrav' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -438,9 +440,10 @@ all_data as(
|
|||
-- Наземный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'vidTS' AS vehicle_type,
|
||||
property_data->>'vidTS' AS property_code,
|
||||
property_data->>'godVyp' AS issue_year,
|
||||
property_data->>'markaTS' AS brand_model,
|
||||
property_data->>'gosRegZn' AS reg_plate,
|
||||
|
|
@ -459,9 +462,10 @@ all_data as(
|
|||
-- Воздушный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -480,9 +484,10 @@ all_data as(
|
|||
-- Водный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -498,9 +503,10 @@ all_data as(
|
|||
)
|
||||
select
|
||||
recruit_id,
|
||||
source_update_date,
|
||||
kind_right,
|
||||
address,
|
||||
vehicle_type,
|
||||
property_code,
|
||||
issue_year::int,
|
||||
brand_model,
|
||||
reg_plate,
|
||||
|
|
@ -561,8 +567,8 @@ from all_data</sql>
|
|||
<stream_name>address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>vehicle_type</column_name>
|
||||
<stream_name>vehicle_type</stream_name>
|
||||
<column_name>property_code</column_name>
|
||||
<stream_name>property_code</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>issue_year</column_name>
|
||||
|
|
@ -596,19 +602,20 @@ from all_data</sql>
|
|||
<column_name>type_property</column_name>
|
||||
<stream_name>type_property</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>source_update_date</column_name>
|
||||
<stream_name>source_update_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_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
|
|
@ -633,43 +640,36 @@ from all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_property</field>
|
||||
<name>has_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_ground_transport</field>
|
||||
<name>has_ground_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_air_transport</field>
|
||||
<name>has_air_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_water_transport</field>
|
||||
<name>has_water_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_possibility_reg_residence</field>
|
||||
<name>has_possibility_reg_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -348,19 +348,16 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -380,8 +377,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_type</name>
|
||||
<rename>vehicle_type</rename>
|
||||
<name>property_code</name>
|
||||
<rename>property_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
|
|
@ -424,6 +421,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>type_property</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -445,22 +447,21 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as(
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.info
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
--AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
),
|
||||
prop AS (
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
'realty' AS property_type,
|
||||
ry.value AS property_data
|
||||
property_data.value AS property_data
|
||||
FROM base
|
||||
LEFT JOIN LATERAL jsonb_array_elements(
|
||||
CASE
|
||||
|
|
@ -468,8 +469,9 @@ prop AS (
|
|||
THEN base.info->'svedFL'->'svedON'->'on'
|
||||
ELSE '[]'::jsonb
|
||||
END
|
||||
) AS ry ON true
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array'
|
||||
AND to_date(property_data->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
|
@ -486,6 +488,7 @@ prop AS (
|
|||
END
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedNazTS'->'nazTS') = 'array'
|
||||
AND to_date(property_data->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
|
@ -502,6 +505,7 @@ prop AS (
|
|||
END
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedVozTS'->'vozTS') = 'array'
|
||||
AND to_date(property_data->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
|
@ -518,14 +522,16 @@ prop AS (
|
|||
END
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedVodTS'->'vodTS') = 'array'
|
||||
AND to_date(property_data->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
),
|
||||
all_data as(
|
||||
-- Недвижимость
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля
|
||||
prop.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
property_data->>'naimVidPrav' AS kind_right,
|
||||
property_data->'adrObSob'->>'adrObSobTekst' AS address,
|
||||
property_data->>'kodVidPrav' AS vehicle_type,
|
||||
property_data->>'kodVidPrav' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -535,18 +541,18 @@ all_data as(
|
|||
to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date,
|
||||
'realty' AS type_property,
|
||||
1 AS is_possibility_reg_residence
|
||||
FROM base
|
||||
JOIN prop ON base.recruit_id = prop.recruit_id
|
||||
FROM prop
|
||||
WHERE prop.property_type = 'realty'
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Наземный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
prop.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'vidTS' AS vehicle_type,
|
||||
property_data->>'vidTS' AS property_code,
|
||||
property_data->>'godVyp' AS issue_year,
|
||||
property_data->>'markaTS' AS brand_model,
|
||||
property_data->>'gosRegZn' AS reg_plate,
|
||||
|
|
@ -556,18 +562,18 @@ all_data as(
|
|||
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
|
||||
'ground_transportation' AS type_property,
|
||||
0 AS is_possibility_reg_residence
|
||||
FROM base
|
||||
JOIN prop ON base.recruit_id = prop.recruit_id
|
||||
FROM prop
|
||||
WHERE prop.property_type = 'ground_transportation'
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Воздушный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
prop.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -577,18 +583,18 @@ all_data as(
|
|||
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
|
||||
'air_vehicles' AS type_property,
|
||||
0 AS is_possibility_reg_residence
|
||||
FROM base
|
||||
JOIN prop ON base.recruit_id = prop.recruit_id
|
||||
FROM prop
|
||||
WHERE prop.property_type = 'air_vehicles'
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- Водный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
prop.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -598,15 +604,15 @@ all_data as(
|
|||
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
|
||||
'water_vehicles' AS type_property,
|
||||
0 AS is_possibility_reg_residence
|
||||
FROM base
|
||||
JOIN prop ON base.recruit_id = prop.recruit_id
|
||||
FROM prop
|
||||
WHERE prop.property_type = 'water_vehicles'
|
||||
)
|
||||
select
|
||||
SELECT
|
||||
recruit_id,
|
||||
source_update_date,
|
||||
kind_right,
|
||||
address,
|
||||
vehicle_type,
|
||||
property_code,
|
||||
issue_year::int,
|
||||
brand_model,
|
||||
reg_plate,
|
||||
|
|
@ -619,20 +625,20 @@ select
|
|||
CASE
|
||||
WHEN type_property = 'realty' THEN 1
|
||||
ELSE 0
|
||||
END AS is_property, -- недвиж//has_property
|
||||
END AS is_property,
|
||||
CASE
|
||||
WHEN type_property = 'ground_transportation' THEN 1
|
||||
ELSE 0
|
||||
END AS is_ground_transport, -- наземный транспорт//has_ground_transport
|
||||
END AS is_ground_transport,
|
||||
CASE
|
||||
WHEN type_property = 'air_vehicles' THEN 1
|
||||
ELSE 0
|
||||
END AS is_air_transport, -- воздушный транспорт//has_air_transport
|
||||
END AS is_air_transport,
|
||||
CASE
|
||||
WHEN type_property = 'water_vehicles' THEN 1
|
||||
ELSE 0
|
||||
END AS is_water_transport -- водный транспорт//has_water_transport
|
||||
from all_data</sql>
|
||||
END AS is_water_transport
|
||||
FROM all_data</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -654,43 +660,36 @@ from all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_property</field>
|
||||
<name>has_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_ground_transport</field>
|
||||
<name>has_ground_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_air_transport</field>
|
||||
<name>has_air_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_water_transport</field>
|
||||
<name>has_water_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_possibility_reg_residence</field>
|
||||
<name>has_possibility_reg_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -363,19 +363,16 @@ DO UPDATE SET
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
|
|
@ -395,8 +392,8 @@ DO UPDATE SET
|
|||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_type</name>
|
||||
<rename>vehicle_type</rename>
|
||||
<name>property_code</name>
|
||||
<rename>property_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
|
|
@ -439,6 +436,11 @@ DO UPDATE SET
|
|||
<rename>type_property</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -460,6 +462,7 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as(
|
||||
SELECT
|
||||
|
|
@ -474,7 +477,7 @@ prop AS (
|
|||
SELECT
|
||||
base.recruit_id,
|
||||
'realty' AS property_type,
|
||||
ry.value AS property_data
|
||||
property_data.value AS property_data
|
||||
FROM base
|
||||
LEFT JOIN LATERAL jsonb_array_elements(
|
||||
CASE
|
||||
|
|
@ -482,7 +485,7 @@ prop AS (
|
|||
THEN base.info->'svedFL'->'svedON'->'on'
|
||||
ELSE '[]'::jsonb
|
||||
END
|
||||
) AS ry ON true
|
||||
) AS property_data ON true
|
||||
WHERE jsonb_typeof(base.info->'svedFL'->'svedON'->'on') = 'array'
|
||||
|
||||
UNION ALL
|
||||
|
|
@ -537,9 +540,10 @@ all_data as(
|
|||
-- Недвижимость
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
property_data->>'naimVidPrav' AS kind_right, -- Исправлено название поля
|
||||
property_data->'adrObSob'->>'adrObSobTekst' AS address,
|
||||
property_data->>'kodVidPrav' AS vehicle_type,
|
||||
property_data->>'kodVidPrav' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -558,9 +562,10 @@ all_data as(
|
|||
-- Наземный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'vidTS' AS vehicle_type,
|
||||
property_data->>'vidTS' AS property_code,
|
||||
property_data->>'godVyp' AS issue_year,
|
||||
property_data->>'markaTS' AS brand_model,
|
||||
property_data->>'gosRegZn' AS reg_plate,
|
||||
|
|
@ -579,9 +584,10 @@ all_data as(
|
|||
-- Воздушный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -600,9 +606,10 @@ all_data as(
|
|||
-- Водный транспорт
|
||||
SELECT
|
||||
base.recruit_id,
|
||||
to_date(property_data->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
NULL AS kind_right,
|
||||
NULL AS address,
|
||||
property_data->>'naimVid' AS vehicle_type,
|
||||
property_data->>'naimVid' AS property_code,
|
||||
NULL AS issue_year,
|
||||
NULL AS brand_model,
|
||||
NULL AS reg_plate,
|
||||
|
|
@ -618,9 +625,10 @@ all_data as(
|
|||
)
|
||||
select
|
||||
recruit_id,
|
||||
source_update_date,
|
||||
kind_right,
|
||||
address,
|
||||
vehicle_type,
|
||||
property_code,
|
||||
issue_year::int,
|
||||
brand_model,
|
||||
reg_plate,
|
||||
|
|
@ -635,7 +643,7 @@ select
|
|||
ELSE 0
|
||||
END AS is_property, -- недвиж//has_property
|
||||
CASE
|
||||
WHEN type_property = 'ground_transportation' THEN 1
|
||||
WHEN type_property = 'ground_transportation'THEN 1
|
||||
ELSE 0
|
||||
END AS is_ground_transport, -- наземный транспорт//has_ground_transport
|
||||
CASE
|
||||
|
|
@ -668,43 +676,36 @@ from all_data</sql>
|
|||
<commit>10000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<error_ignored>Y</error_ignored>
|
||||
<ignore_flag_field/>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_property</field>
|
||||
<name>has_property</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_ground_transport</field>
|
||||
<name>has_ground_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_air_transport</field>
|
||||
<name>has_air_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_water_transport</field>
|
||||
<name>has_water_transport</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition><></condition>
|
||||
<field>has_possibility_reg_residence</field>
|
||||
<name>has_possibility_reg_residence</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<to>property_flow_delta.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>get_max_source_update_date</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
|
|
@ -60,20 +65,52 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
<sql>WITH mud AS (
|
||||
SELECT
|
||||
recruitment_id,
|
||||
MAX(execution_datetime) AS max_upd_date
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
|
||||
GROUP BY recruitment_id
|
||||
)
|
||||
SELECT
|
||||
r.idm_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'property_job'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||
JOIN recruits_info ri
|
||||
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||
AND ri.updated_at > mud.max_upd_date;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>get_max_source_update_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT max(source_update_date) AS max_source_update_date
|
||||
FROM ervu_dashboard.property;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>144</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>property_flow_delta.hpl</name>
|
||||
<type>PipelineExecutor</type>
|
||||
|
|
@ -95,7 +132,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -146,7 +183,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -197,7 +234,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -248,7 +285,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
@ -299,7 +336,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<field>idm_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
|
|
|
|||
|
|
@ -300,6 +300,11 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -351,6 +356,11 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -372,6 +382,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as (
|
||||
SELECT
|
||||
|
|
@ -384,6 +395,7 @@ base as (
|
|||
)
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
true AS actual
|
||||
|
|
@ -394,6 +406,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
false AS actual
|
||||
|
|
@ -404,6 +417,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
null as snils,
|
||||
true as actual
|
||||
|
|
@ -414,6 +428,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
null as snils,
|
||||
false as actual
|
||||
|
|
|
|||
|
|
@ -278,13 +278,10 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>IS NOT NULL</condition>
|
||||
<field>inn</field>
|
||||
<name/>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>inn</table>
|
||||
|
|
@ -303,6 +300,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -329,13 +331,10 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>IS NOT NULL</condition>
|
||||
<field>snils</field>
|
||||
<name/>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>snils</table>
|
||||
|
|
@ -354,6 +353,11 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -375,56 +379,87 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.info
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
--AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
ri.info,
|
||||
|
||||
to_date(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS akt_snils_date,
|
||||
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS akt_snils_number,
|
||||
to_date(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS pred_snils_date,
|
||||
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS pred_snils_number,
|
||||
|
||||
to_date(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS akt_inn_date,
|
||||
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS akt_inn_number,
|
||||
to_date(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS pred_inn_date,
|
||||
REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS pred_inn_number
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
WHERE
|
||||
(to_date(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11)
|
||||
OR
|
||||
(to_date(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11)
|
||||
OR
|
||||
(to_date(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12)
|
||||
OR
|
||||
(to_date(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') > '${MAX_SOURCE_UPDATE_DATE}'::date
|
||||
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12)
|
||||
)
|
||||
-- SNILS aktSNILS (актуальные)
|
||||
SELECT
|
||||
recruit_id,
|
||||
akt_snils_date AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
akt_snils_number AS snils,
|
||||
true AS actual
|
||||
FROM base
|
||||
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
|
||||
WHERE akt_snils_date IS NOT NULL
|
||||
AND LENGTH(akt_snils_number) = 11
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- SNILS predSNILS (предыдущие)
|
||||
SELECT
|
||||
recruit_id,
|
||||
pred_snils_date AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
pred_snils_number AS snils,
|
||||
false AS actual
|
||||
FROM base
|
||||
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
|
||||
WHERE pred_snils_date IS NOT NULL
|
||||
AND LENGTH(pred_snils_number) = 11
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- INN aktINN (актуальные)
|
||||
SELECT
|
||||
recruit_id,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
recruit_id,
|
||||
akt_inn_date AS source_update_date,
|
||||
akt_inn_number AS inn,
|
||||
null as snils,
|
||||
true as actual
|
||||
FROM base
|
||||
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g')) = 12
|
||||
WHERE akt_inn_date IS NOT NULL
|
||||
AND LENGTH(akt_inn_number) = 12
|
||||
|
||||
UNION ALL
|
||||
|
||||
-- INN predINN (предыдущие)
|
||||
SELECT
|
||||
recruit_id,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
recruit_id,
|
||||
pred_inn_date AS source_update_date,
|
||||
pred_inn_number AS inn,
|
||||
null as snils,
|
||||
false as actual
|
||||
FROM base
|
||||
WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g')) = 12
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
WHERE pred_inn_date IS NOT NULL
|
||||
AND LENGTH(pred_inn_number) = 12</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
|
|||
|
|
@ -318,6 +318,11 @@ DO UPDATE SET
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -369,6 +374,11 @@ DO UPDATE SET
|
|||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>source_update_date</name>
|
||||
<rename>source_update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
|
|
@ -390,6 +400,7 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>WITH
|
||||
base as (
|
||||
SELECT
|
||||
|
|
@ -402,6 +413,7 @@ base as (
|
|||
)
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
true AS actual
|
||||
|
|
@ -412,6 +424,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
null as inn,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g') AS snils,
|
||||
false AS actual
|
||||
|
|
@ -422,6 +435,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
null as snils,
|
||||
true as actual
|
||||
|
|
@ -432,6 +446,7 @@ UNION ALL
|
|||
|
||||
SELECT
|
||||
recruit_id,
|
||||
to_date(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'dataSved', 'YYYY-MM-DD') AS source_update_date,
|
||||
REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn', '[^0-9]', '', 'g') AS inn,
|
||||
null as snils,
|
||||
false as actual
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<to>snils_inn_flow_delta.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>get_max_source_update_date</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
|
|
@ -60,14 +65,23 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
<sql>WITH mud AS (
|
||||
SELECT
|
||||
recruitment_id,
|
||||
MAX(execution_datetime) AS max_upd_date
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
|
||||
GROUP BY recruitment_id
|
||||
)
|
||||
SELECT
|
||||
r.idm_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'snils_inn_job'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||
JOIN recruits_info ri
|
||||
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||
AND ri.updated_at > mud.max_upd_date;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
|
|
@ -329,6 +343,31 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
|||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>get_max_source_update_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT GREATEST(
|
||||
(SELECT MAX(source_update_date) FROM ervu_dashboard.inn),
|
||||
(SELECT MAX(source_update_date) FROM ervu_dashboard.snils)
|
||||
) AS max_source_update_date;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>128</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
|
|
|
|||
639
mappings/info_recruits/supportive_jobs/job4_info_from_json.hwf
Normal file
639
mappings/info_recruits/supportive_jobs/job4_info_from_json.hwf
Normal file
|
|
@ -0,0 +1,639 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>job4_info_from_json</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/09/22 10:39:11.024</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/09/22 10:39:11.024</modified_date>
|
||||
<parameters>
|
||||
</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>Y</parallel>
|
||||
<xloc>880</xloc>
|
||||
<yloc>912</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>deputy_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/deputy/deputy_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>624</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success deputy_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>624</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>russian_diploma_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/education/russian_diploma/russian_diploma_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>688</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success russian_diploma_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>688</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>foreign_diploma_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/education/foreign_diploma/foreign_diploma_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>752</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>educational_institution_learning_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/education/educational_institution_learning/educational_institution_learning_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>816</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>election_candidate_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/election_candidate/election_candidate_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>880</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>vich_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/medicine/vich/vich_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>944</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>incapacity_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/medicine/incapacity/incapacity_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>1008</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>health_state_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/medicine/health_state/health_state_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>1072</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>disability_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/medicine/disability/disability_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>1136</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>sport_job.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/sport/sport_job.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>M_R_UP_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_UP_DATE}</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>M_R_CR_DATE</name>
|
||||
<stream_name/>
|
||||
<value>${M_R_CR_DATE}</value>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</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>1232</xloc>
|
||||
<yloc>1200</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success foreign_diploma_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>752</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success educational_institution_learning_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>816</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success election_candidate_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>880</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success vich_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>944</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success incapacity_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>1008</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success health_state_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>1072</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success disability_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>1136</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success sport_job.hwf</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>1200</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>deputy_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>deputy_job.hwf</from>
|
||||
<to>Success deputy_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>russian_diploma_job.hwf</from>
|
||||
<to>Success russian_diploma_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>russian_diploma_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>foreign_diploma_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>educational_institution_learning_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>election_candidate_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>vich_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>incapacity_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>health_state_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>disability_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>sport_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>foreign_diploma_job.hwf</from>
|
||||
<to>Success foreign_diploma_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>educational_institution_learning_job.hwf</from>
|
||||
<to>Success educational_institution_learning_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>election_candidate_job.hwf</from>
|
||||
<to>Success election_candidate_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>vich_job.hwf</from>
|
||||
<to>Success vich_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>incapacity_job.hwf</from>
|
||||
<to>Success incapacity_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>health_state_job.hwf</from>
|
||||
<to>Success health_state_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>disability_job.hwf</from>
|
||||
<to>Success disability_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>sport_job.hwf</from>
|
||||
<to>Success sport_job.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
Loading…
Add table
Add a link
Reference in a new issue