Merge branch 'develop' of 10.10.31.70:/ervu-dashboard-etl into develop
This commit is contained in:
commit
ff4cd5ae2f
38 changed files with 1068 additions and 1160 deletions
|
|
@ -333,7 +333,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS child_external_id,
|
(ch->>'id')::uuid AS child_external_id,
|
||||||
|
|
@ -380,7 +379,6 @@ CROSS JOIN LATERAL (
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -575,7 +573,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -587,7 +585,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,26 @@
|
||||||
<modified_date>2025/08/11 13:22:56.048</modified_date>
|
<modified_date>2025/08/11 13:22:56.048</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>26</height>
|
||||||
|
<xloc>574</xloc>
|
||||||
|
<yloc>358</yloc>
|
||||||
|
<note>1. insert/update, update указан лишний error_code для error handling</note>
|
||||||
|
<width>384</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -429,7 +449,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS child_external_id,
|
(ch->>'id')::uuid AS child_external_id,
|
||||||
|
|
@ -476,8 +495,7 @@ CROSS JOIN LATERAL (
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp,
|
||||||
AND c.update_date >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -578,7 +596,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,26 @@
|
||||||
<modified_date>2025/08/08 13:25:52.319</modified_date>
|
<modified_date>2025/08/08 13:25:52.319</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>26</height>
|
||||||
|
<xloc>368</xloc>
|
||||||
|
<yloc>592</yloc>
|
||||||
|
<note>1.Insert/update не указан error_description для error handling</note>
|
||||||
|
<width>338</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -445,7 +465,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS child_external_id,
|
(ch->>'id')::uuid AS child_external_id,
|
||||||
|
|
@ -492,7 +511,6 @@ CROSS JOIN LATERAL (
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array';</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -591,7 +609,7 @@ WHERE
|
||||||
<target_transform>Change job status on error 2</target_transform>
|
<target_transform>Change job status on error 2</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename/>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename/>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
|
|
@ -605,7 +623,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,28 @@
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit>0</limit>
|
<limit>0</limit>
|
||||||
<sql>SELECT
|
<sql>WITH mud AS (SELECT recruitment_id,
|
||||||
r.idm_id as recruitment_id
|
MAX(execution_datetime) AS max_upd_date
|
||||||
|
FROM etl.job_execution
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'child_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,27 @@
|
||||||
<modified_date>2025/08/05 14:31:22.799</modified_date>
|
<modified_date>2025/08/05 14:31:22.799</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>42</height>
|
||||||
|
<xloc>192</xloc>
|
||||||
|
<yloc>432</yloc>
|
||||||
|
<note>1. Убрать лишнее из input (Закоментированные строки запроса, незакоменченная переменная лимит в конце)
|
||||||
|
2. Убрать error_code из output в части error handling</note>
|
||||||
|
<width>624</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,27 @@
|
||||||
<modified_date>2025/08/11 13:22:56.048</modified_date>
|
<modified_date>2025/08/11 13:22:56.048</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>41</height>
|
||||||
|
<xloc>326</xloc>
|
||||||
|
<yloc>407</yloc>
|
||||||
|
<note>1. Insert/update отсутсвует error_description
|
||||||
|
</note>
|
||||||
|
<width>246</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -439,7 +460,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu_person_registry</connection>
|
<connection>ervu_person_registry</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>/*
|
<sql>/*
|
||||||
with
|
with
|
||||||
adresses as ( -- по одному ли адресу тут должно быть??
|
adresses as ( -- по одному ли адресу тут должно быть??
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,27 @@
|
||||||
<modified_date>2025/08/08 13:25:52.319</modified_date>
|
<modified_date>2025/08/08 13:25:52.319</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>41</height>
|
||||||
|
<xloc>432</xloc>
|
||||||
|
<yloc>352</yloc>
|
||||||
|
<note>1. Insert/update отсутсвует error_description
|
||||||
|
</note>
|
||||||
|
<width>246</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -453,7 +474,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu_person_registry</connection>
|
<connection>ervu_person_registry</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>/*
|
<sql>/*
|
||||||
with
|
with
|
||||||
adresses as ( -- по одному ли адресу тут должно быть??
|
adresses as ( -- по одному ли адресу тут должно быть??
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id::uuid,
|
ri.recruit_id::uuid,
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
||||||
|
|
@ -292,7 +291,6 @@ FROM ervu_dashboard.recruits_info ri
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
|
||||||
GROUP BY ri.recruit_id;</sql>
|
GROUP BY ri.recruit_id;</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -387,7 +385,7 @@ GROUP BY ri.recruit_id;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -355,7 +355,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id::uuid,
|
ri.recruit_id::uuid,
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
||||||
|
|
@ -379,8 +378,7 @@ FROM ervu_dashboard.recruits_info ri
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
AND c.update_date >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
GROUP BY ri.recruit_id;</sql>
|
GROUP BY ri.recruit_id;</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -397,7 +395,7 @@ GROUP BY ri.recruit_id;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id::uuid,
|
ri.recruit_id::uuid,
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
||||||
|
|
@ -393,7 +392,6 @@ FROM ervu_dashboard.recruits_info ri
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
|
||||||
GROUP BY ri.recruit_id;</sql>
|
GROUP BY ri.recruit_id;</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -410,7 +408,7 @@ GROUP BY ri.recruit_id;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'citizen_address_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@
|
||||||
<create_parent_folder>N</create_parent_folder>
|
<create_parent_folder>N</create_parent_folder>
|
||||||
<exec_per_row>N</exec_per_row>
|
<exec_per_row>N</exec_per_row>
|
||||||
<filename>${PROJECT_HOME}/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl</filename>
|
<filename>${PROJECT_HOME}/info_recruits/raw_data/recruits_info/row_last_recruit_update_date.hpl</filename>
|
||||||
<logext/>
|
|
||||||
<logfile/>
|
|
||||||
<loglevel>Basic</loglevel>
|
<loglevel>Basic</loglevel>
|
||||||
<parameters>
|
<parameters>
|
||||||
<pass_all_parameters>Y</pass_all_parameters>
|
<pass_all_parameters>Y</pass_all_parameters>
|
||||||
|
|
@ -119,6 +117,26 @@
|
||||||
</hop>
|
</hop>
|
||||||
</hops>
|
</hops>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>26</height>
|
||||||
|
<xloc>581</xloc>
|
||||||
|
<yloc>546</yloc>
|
||||||
|
<note>А где испольуезтся джоба? </note>
|
||||||
|
<width>162</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
</workflow>
|
</workflow>
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,28 @@
|
||||||
<note>в таблице нет апдейт даты</note>
|
<note>в таблице нет апдейт даты</note>
|
||||||
<width>154</width>
|
<width>154</width>
|
||||||
</notepad>
|
</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>58</height>
|
||||||
|
<xloc>576</xloc>
|
||||||
|
<yloc>752</yloc>
|
||||||
|
<note>1. is_appealing_violations_fz53 case when можно заменить на not ad.hidden и без java expression передавать в апдейт
|
||||||
|
2. Убрать лишнее из input
|
||||||
|
3. Зачем группировка нужна если исходные данные не массив?</note>
|
||||||
|
<width>642</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -342,7 +364,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>postgres.decision-document-service</connection>
|
<connection>postgres.decision-document-service</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ad.recruit_id,
|
ad.recruit_id,
|
||||||
ad.create_date, -- дата создания обжалования
|
ad.create_date, -- дата создания обжалования
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,27 @@
|
||||||
<modified_date>2025/04/18 09:48:01.970</modified_date>
|
<modified_date>2025/04/18 09:48:01.970</modified_date>
|
||||||
</info>
|
</info>
|
||||||
<notepads>
|
<notepads>
|
||||||
|
<notepad>
|
||||||
|
<backgroundcolorblue>251</backgroundcolorblue>
|
||||||
|
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||||
|
<backgroundcolorred>201</backgroundcolorred>
|
||||||
|
<bordercolorblue>90</bordercolorblue>
|
||||||
|
<bordercolorgreen>58</bordercolorgreen>
|
||||||
|
<bordercolorred>14</bordercolorred>
|
||||||
|
<fontbold>N</fontbold>
|
||||||
|
<fontcolorblue>90</fontcolorblue>
|
||||||
|
<fontcolorgreen>58</fontcolorgreen>
|
||||||
|
<fontcolorred>14</fontcolorred>
|
||||||
|
<fontitalic>N</fontitalic>
|
||||||
|
<fontname>Segoe UI</fontname>
|
||||||
|
<fontsize>9</fontsize>
|
||||||
|
<height>41</height>
|
||||||
|
<xloc>235</xloc>
|
||||||
|
<yloc>489</yloc>
|
||||||
|
<note>убрать лишнее из input
|
||||||
|
</note>
|
||||||
|
<width>141</width>
|
||||||
|
</notepad>
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
|
||||||
|
|
@ -35,36 +35,16 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Table output</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>Change job status on error</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -76,13 +56,28 @@
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Change job status on success 2</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Identify last row in a stream</from>
|
||||||
<to>Change job status on success 2</to>
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Table output</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Table output</from>
|
||||||
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>544</yloc>
|
<yloc>544</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_guardian</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1104</xloc>
|
|
||||||
<yloc>0</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -244,8 +212,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1536</xloc>
|
<xloc>1280</xloc>
|
||||||
<yloc>160</yloc>
|
<yloc>688</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -284,36 +252,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<yloc>0</yloc>
|
<yloc>0</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>720</xloc>
|
|
||||||
<yloc>0</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -328,7 +266,41 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<resultfieldname>last_row</resultfieldname>
|
<resultfieldname>last_row</resultfieldname>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>912</xloc>
|
<xloc>1008</xloc>
|
||||||
|
<yloc>0</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>720</xloc>
|
||||||
<yloc>0</yloc>
|
<yloc>0</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
|
@ -345,7 +317,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS guardianship_external_id,
|
(ch->>'id')::uuid AS guardianship_external_id,
|
||||||
|
|
@ -363,15 +334,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
||||||
) AS birth_date,
|
) AS birth_date,
|
||||||
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils
|
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
||||||
|
true AS is_guardian
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array';</sql>
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -383,7 +354,7 @@ WHERE
|
||||||
<name>Table output</name>
|
<name>Table output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>N</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
<copies>1</copies>
|
<copies>1</copies>
|
||||||
<partitioning>
|
<partitioning>
|
||||||
|
|
@ -497,7 +468,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@
|
||||||
<to>Table input</to>
|
<to>Table input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>Insert / update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
|
|
@ -40,11 +35,6 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
|
|
@ -55,21 +45,6 @@
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Update</from>
|
|
||||||
<to>Detect empty stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>Change job status on success</to>
|
||||||
|
|
@ -85,6 +60,26 @@
|
||||||
<to>Change job status on success</to>
|
<to>Change job status on success</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Detect empty stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>480</yloc>
|
<yloc>480</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_guardian</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1024</xloc>
|
|
||||||
<yloc>0</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -249,8 +217,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1456</xloc>
|
<xloc>1216</xloc>
|
||||||
<yloc>224</yloc>
|
<yloc>608</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -289,36 +257,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>0</yloc>
|
<yloc>0</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>704</xloc>
|
|
||||||
<yloc>0</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -333,7 +271,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<resultfieldname>last_row</resultfieldname>
|
<resultfieldname>last_row</resultfieldname>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>864</xloc>
|
<xloc>944</xloc>
|
||||||
<yloc>0</yloc>
|
<yloc>0</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
|
@ -341,7 +279,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<name>Insert / update</name>
|
<name>Insert / update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>N</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
<copies>1</copies>
|
<copies>1</copies>
|
||||||
<partitioning>
|
<partitioning>
|
||||||
|
|
@ -416,6 +354,40 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>704</xloc>
|
||||||
|
<yloc>0</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -429,7 +401,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS guardianship_external_id,
|
(ch->>'id')::uuid AS guardianship_external_id,
|
||||||
|
|
@ -447,7 +418,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
||||||
) AS birth_date,
|
) AS birth_date,
|
||||||
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils
|
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
||||||
|
true AS is_guardian
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
||||||
|
|
@ -455,8 +427,7 @@ WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp;</sql>
|
||||||
AND c.update_date >= '${M_R_UP_DATE}'::timestamp;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -512,7 +483,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -524,7 +495,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -35,31 +35,11 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>Change job status on error</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
|
|
@ -76,13 +56,28 @@
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Change job status on success</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Identify last row in a stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>384</yloc>
|
<yloc>384</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_guardian</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1040</xloc>
|
|
||||||
<yloc>48</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -265,8 +233,8 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1488</xloc>
|
<xloc>1232</xloc>
|
||||||
<yloc>192</yloc>
|
<yloc>576</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -305,36 +273,6 @@ DO UPDATE SET
|
||||||
<yloc>48</yloc>
|
<yloc>48</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>704</xloc>
|
|
||||||
<yloc>48</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -349,7 +287,7 @@ DO UPDATE SET
|
||||||
<resultfieldname>last_row</resultfieldname>
|
<resultfieldname>last_row</resultfieldname>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>896</xloc>
|
<xloc>992</xloc>
|
||||||
<yloc>48</yloc>
|
<yloc>48</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
|
@ -357,7 +295,7 @@ DO UPDATE SET
|
||||||
<name>Insert / update</name>
|
<name>Insert / update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>N</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
<copies>1</copies>
|
<copies>1</copies>
|
||||||
<partitioning>
|
<partitioning>
|
||||||
|
|
@ -432,6 +370,40 @@ DO UPDATE SET
|
||||||
<yloc>208</yloc>
|
<yloc>208</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>704</xloc>
|
||||||
|
<yloc>48</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -445,7 +417,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(ch->>'id')::uuid AS guardianship_external_id,
|
(ch->>'id')::uuid AS guardianship_external_id,
|
||||||
|
|
@ -463,15 +434,15 @@ DO UPDATE SET
|
||||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
||||||
) AS birth_date,
|
) AS birth_date,
|
||||||
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils
|
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
||||||
|
true AS is_guardian
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array';</sql>
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -527,7 +498,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -539,7 +510,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,28 @@
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit>0</limit>
|
<limit>0</limit>
|
||||||
<sql>SELECT
|
<sql>WITH mud AS (SELECT recruitment_id,
|
||||||
r.idm_id as recruitment_id
|
MAX(execution_datetime) AS max_upd_date
|
||||||
|
FROM etl.job_execution
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'citizen_guardianship_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -55,16 +55,6 @@
|
||||||
<to>Table output</to>
|
<to>Table output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -80,6 +70,11 @@
|
||||||
<to>Identify last row in a stream</to>
|
<to>Identify last row in a stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -101,33 +96,6 @@
|
||||||
<yloc>448</yloc>
|
<yloc>448</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_wanted</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>880</xloc>
|
|
||||||
<yloc>624</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -310,7 +278,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>
|
<sql>
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id,
|
ri.recruit_id,
|
||||||
|
|
@ -319,12 +286,12 @@ SELECT
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
||||||
|
true AS is_wanted
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
WHERE'${IDM_ID}' != ''
|
WHERE'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
||||||
</sql>
|
</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
|
|
@ -444,7 +411,7 @@ WHERE'${IDM_ID}' != ''
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -456,7 +423,7 @@ WHERE'${IDM_ID}' != ''
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_decription</descriptions_valuename>
|
<descriptions_valuename>error_decription</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -55,16 +55,6 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -80,6 +70,11 @@
|
||||||
<to>Identify last row in a stream</to>
|
<to>Identify last row in a stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -101,33 +96,6 @@
|
||||||
<yloc>384</yloc>
|
<yloc>384</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_wanted</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>864</xloc>
|
|
||||||
<yloc>608</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -377,7 +345,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>
|
<sql>
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id,
|
ri.recruit_id,
|
||||||
|
|
@ -386,12 +353,12 @@ SELECT
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
||||||
|
true AS is_wanted
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
WHERE'${IDM_ID}' != ''
|
WHERE'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -450,7 +417,7 @@ WHERE'${IDM_ID}' != ''
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@
|
||||||
<to>Table input</to>
|
<to>Table input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>Change job status on error</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
|
|
@ -45,11 +40,6 @@
|
||||||
<to>Change job status on success</to>
|
<to>Change job status on success</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream 2</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
|
|
@ -80,6 +70,11 @@
|
||||||
<to>Identify last row in a stream 2</to>
|
<to>Identify last row in a stream 2</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream 2</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -101,33 +96,6 @@
|
||||||
<yloc>432</yloc>
|
<yloc>432</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>is_wanted</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>880</xloc>
|
|
||||||
<yloc>640</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -391,7 +359,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>
|
<sql>
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id,
|
ri.recruit_id,
|
||||||
|
|
@ -400,12 +367,12 @@ SELECT
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
||||||
|
true AS is_wanted // Наличие информации о розыске
|
||||||
FROM ervu_dashboard.recruits_info ri
|
FROM ervu_dashboard.recruits_info ri
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
WHERE'${IDM_ID}' != ''
|
WHERE'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
||||||
</sql>
|
</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
|
|
@ -463,7 +430,7 @@ WHERE'${IDM_ID}' != ''
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'citizen_information_search_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -60,16 +60,6 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Table output</from>
|
|
||||||
<to>Unique rows</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Unique rows</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Identify last row in a stream</from>
|
<from>Identify last row in a stream</from>
|
||||||
<to>Table output 2</to>
|
<to>Table output 2</to>
|
||||||
|
|
@ -80,6 +70,16 @@
|
||||||
<to>Table output</to>
|
<to>Table output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Table output</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -270,6 +270,40 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<yloc>288</yloc>
|
<yloc>288</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>736</xloc>
|
||||||
|
<yloc>416</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -283,7 +317,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(supr->>'id')::uuid AS spouse_external_id,
|
(supr->>'id')::uuid AS spouse_external_id,
|
||||||
|
|
@ -321,8 +354,7 @@ CROSS JOIN LATERAL (
|
||||||
) AS supr(supr)
|
) AS supr(supr)
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'));</sql>
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= r.recruit_create_date;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -466,31 +498,6 @@ WHERE
|
||||||
<yloc>192</yloc>
|
<yloc>192</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Unique rows</name>
|
|
||||||
<type>Unique</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<count_rows>N</count_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<case_insensitive>N</case_insensitive>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<reject_duplicate_row>N</reject_duplicate_row>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>736</xloc>
|
|
||||||
<yloc>400</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>Table output</source_transform>
|
||||||
|
|
@ -499,7 +506,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -511,7 +518,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,6 @@
|
||||||
<to>Change job status on success</to>
|
<to>Change job status on success</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Unique rows</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update 2</from>
|
<from>Insert / update 2</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -65,11 +60,6 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Unique rows</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Identify last row in a stream</from>
|
<from>Identify last row in a stream</from>
|
||||||
<to>Insert / update 2</to>
|
<to>Insert / update 2</to>
|
||||||
|
|
@ -80,6 +70,16 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -423,6 +423,40 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>176</yloc>
|
<yloc>176</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>768</xloc>
|
||||||
|
<yloc>384</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -436,7 +470,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(supr->>'id')::uuid AS spouse_external_id,
|
(supr->>'id')::uuid AS spouse_external_id,
|
||||||
|
|
@ -475,8 +508,7 @@ CROSS JOIN LATERAL (
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= r.recruit_create_date
|
AND ri.update_date >= '${M_R_UP_DATE}'::timestamp;
|
||||||
AND r.update_date >= '${M_R_UP_DATE}'::timestamp;
|
|
||||||
</sql>
|
</sql>
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
|
|
@ -485,31 +517,6 @@ WHERE
|
||||||
<yloc>496</yloc>
|
<yloc>496</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Unique rows</name>
|
|
||||||
<type>Unique</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<count_rows>N</count_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<case_insensitive>N</case_insensitive>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<reject_duplicate_row>N</reject_duplicate_row>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>768</xloc>
|
|
||||||
<yloc>384</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>Insert / update</source_transform>
|
||||||
|
|
@ -518,7 +525,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -530,7 +537,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -82,21 +82,11 @@ M_R_CR_DATE
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Unique rows</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update 2</from>
|
<from>Insert / update 2</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Unique rows</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Identify last row in a stream</from>
|
<from>Identify last row in a stream</from>
|
||||||
<to>Insert / update 2</to>
|
<to>Insert / update 2</to>
|
||||||
|
|
@ -107,6 +97,16 @@ M_R_CR_DATE
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -467,6 +467,40 @@ DO UPDATE SET
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>704</xloc>
|
||||||
|
<yloc>416</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -480,7 +514,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
(supr->>'id')::uuid AS spouse_external_id,
|
(supr->>'id')::uuid AS spouse_external_id,
|
||||||
|
|
@ -518,8 +551,7 @@ CROSS JOIN LATERAL (
|
||||||
) AS supr(supr)
|
) AS supr(supr)
|
||||||
WHERE
|
WHERE
|
||||||
'${IDM_ID}' != ''
|
'${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'));</sql>
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= r.recruit_create_date;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -527,31 +559,6 @@ WHERE
|
||||||
<yloc>528</yloc>
|
<yloc>528</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Unique rows</name>
|
|
||||||
<type>Unique</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<count_rows>N</count_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<case_insensitive>N</case_insensitive>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<reject_duplicate_row>N</reject_duplicate_row>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>704</xloc>
|
|
||||||
<yloc>416</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>Insert / update</source_transform>
|
||||||
|
|
@ -560,7 +567,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -572,7 +579,7 @@ WHERE
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'citizen_spouse_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,6 @@ JOIN ervu_dashboard.citizen r
|
||||||
ON r.recruit_id = ri.recruit_id
|
ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != ''
|
AND '${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= r.recruit_create_date
|
|
||||||
JOIN LATERAL (
|
JOIN LATERAL (
|
||||||
SELECT passport_data
|
SELECT passport_data
|
||||||
FROM UNNEST(ARRAY[
|
FROM UNNEST(ARRAY[
|
||||||
|
|
@ -374,7 +373,7 @@ LENGTH(REGEXP_REPLACE(p.passport_data->>'nomDok', '[^0-9]', '', 'g')) = 6</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>SELECT
|
<sql>SELECT
|
||||||
ri.recruit_id,
|
ri.recruit_id,
|
||||||
NULLIF(p.passport_data->>'nomDok', '') AS passport_number,
|
NULLIF(p.passport_data->>'nomDok', '') AS passport_number,
|
||||||
|
|
@ -386,7 +385,7 @@ LENGTH(REGEXP_REPLACE(p.passport_data->>'nomDok', '[^0-9]', '', 'g')) = 6
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,6 @@ JOIN ervu_dashboard.citizen r
|
||||||
ON r.recruit_id = ri.recruit_id
|
ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != ''
|
AND '${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= r.recruit_create_date
|
|
||||||
JOIN LATERAL (
|
JOIN LATERAL (
|
||||||
SELECT passport_data
|
SELECT passport_data
|
||||||
FROM UNNEST(ARRAY[
|
FROM UNNEST(ARRAY[
|
||||||
|
|
@ -399,7 +398,7 @@ LENGTH(REGEXP_REPLACE(p.passport_data->>'nomDok', '[^0-9]', '', 'g')) = 6
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'passport_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -55,26 +55,6 @@
|
||||||
<to>Table output</to>
|
<to>Table output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Table output</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -85,6 +65,21 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Table output</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_criminal_prosecution</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>832</xloc>
|
|
||||||
<yloc>32</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -284,36 +252,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<yloc>32</yloc>
|
<yloc>32</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>832</xloc>
|
|
||||||
<yloc>320</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -329,7 +267,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>832</xloc>
|
<xloc>832</xloc>
|
||||||
<yloc>176</yloc>
|
<yloc>32</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -355,7 +293,6 @@ ugolov_presl AS (
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -381,12 +318,13 @@ SELECT
|
||||||
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
||||||
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
||||||
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
||||||
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
||||||
CASE
|
CASE
|
||||||
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
||||||
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
||||||
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
||||||
END AS type_info
|
END AS type_info,
|
||||||
|
true AS has_criminal_prosecution
|
||||||
FROM ervu_dashboard.citizen r
|
FROM ervu_dashboard.citizen r
|
||||||
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
||||||
|
|
@ -556,6 +494,40 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<yloc>32</yloc>
|
<yloc>32</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>832</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>Table output</source_transform>
|
||||||
|
|
@ -564,7 +536,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -576,7 +548,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -50,26 +50,6 @@
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream 2</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream 2</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -85,6 +65,21 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream 2</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream 2</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>592</yloc>
|
<yloc>592</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_criminal_prosecution</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>736</xloc>
|
|
||||||
<yloc>416</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -287,36 +255,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>416</yloc>
|
<yloc>416</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>736</xloc>
|
|
||||||
<yloc>640</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream 2</name>
|
<name>Identify last row in a stream 2</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -332,7 +270,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>736</xloc>
|
<xloc>736</xloc>
|
||||||
<yloc>528</yloc>
|
<yloc>416</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -474,6 +412,40 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>768</yloc>
|
<yloc>768</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>736</xloc>
|
||||||
|
<yloc>560</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -498,7 +470,6 @@ ugolov_presl AS (
|
||||||
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||||
)
|
)
|
||||||
|
|
@ -530,7 +501,8 @@ SELECT
|
||||||
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
||||||
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
||||||
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
||||||
END AS type_info
|
END AS type_info,
|
||||||
|
true AS has_criminal_prosecution
|
||||||
FROM ervu_dashboard.citizen r
|
FROM ervu_dashboard.citizen r
|
||||||
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
||||||
|
|
@ -590,7 +562,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -602,7 +574,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -55,26 +55,6 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -85,6 +65,21 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -106,33 +101,6 @@
|
||||||
<yloc>736</yloc>
|
<yloc>736</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_criminal_prosecution</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>768</xloc>
|
|
||||||
<yloc>576</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -301,36 +269,6 @@ DO UPDATE SET
|
||||||
<yloc>576</yloc>
|
<yloc>576</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>768</xloc>
|
|
||||||
<yloc>800</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -346,7 +284,7 @@ DO UPDATE SET
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>768</xloc>
|
<xloc>768</xloc>
|
||||||
<yloc>704</yloc>
|
<yloc>576</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -488,6 +426,40 @@ DO UPDATE SET
|
||||||
<yloc>944</yloc>
|
<yloc>944</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>768</xloc>
|
||||||
|
<yloc>768</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -501,7 +473,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>WITH
|
<sql>WITH
|
||||||
ugolov_presl AS (
|
ugolov_presl AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -511,7 +482,6 @@ ugolov_presl AS (
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -537,12 +507,13 @@ SELECT
|
||||||
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
||||||
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
||||||
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
||||||
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
||||||
CASE
|
CASE
|
||||||
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
||||||
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
||||||
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
||||||
END AS type_info
|
END AS type_info,
|
||||||
|
true AS has_criminal_prosecution
|
||||||
FROM ervu_dashboard.citizen r
|
FROM ervu_dashboard.citizen r
|
||||||
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
||||||
|
|
@ -602,7 +573,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -614,7 +585,7 @@ GROUP BY r.recruit_id, up;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'prosecution_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSIN
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSIN
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSIN
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSIN
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSIN
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
|
|
@ -55,26 +55,6 @@
|
||||||
<to>Table output</to>
|
<to>Table output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Table output</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -85,6 +65,21 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Table output</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -106,41 +101,6 @@
|
||||||
<yloc>448</yloc>
|
<yloc>448</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_punishment_execution_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_sentence_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>880</xloc>
|
|
||||||
<yloc>624</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -292,36 +252,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<yloc>624</yloc>
|
<yloc>624</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>720</xloc>
|
|
||||||
<yloc>464</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -340,6 +270,40 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<yloc>624</yloc>
|
<yloc>624</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>720</xloc>
|
||||||
|
<yloc>464</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -361,7 +325,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != ''
|
AND '${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||||
)
|
)
|
||||||
SELECT recruit_id,
|
SELECT recruit_id,
|
||||||
|
|
@ -383,7 +346,7 @@ SELECT recruit_id,
|
||||||
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
||||||
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
||||||
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
||||||
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
||||||
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
||||||
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
||||||
CASE
|
CASE
|
||||||
|
|
@ -392,7 +355,9 @@ SELECT recruit_id,
|
||||||
ELSE punishment_info ->> 'kodPerekvalif'
|
ELSE punishment_info ->> 'kodPerekvalif'
|
||||||
END AS article_modification_flag, -- Признак переквалификации
|
END AS article_modification_flag, -- Признак переквалификации
|
||||||
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
||||||
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date -- Фактическая дата освобождения
|
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
||||||
|
true AS has_punishment_execution_info,
|
||||||
|
true AS has_sentence_info
|
||||||
FROM punishment_data
|
FROM punishment_data
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
||||||
GROUP BY recruit_id, punishment_info;</sql>
|
GROUP BY recruit_id, punishment_info;</sql>
|
||||||
|
|
@ -570,7 +535,7 @@ GROUP BY recruit_id, punishment_info;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
@ -582,7 +547,7 @@ GROUP BY recruit_id, punishment_info;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_decription</descriptions_valuename>
|
<descriptions_valuename>error_decription</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@
|
||||||
<fontitalic>N</fontitalic>
|
<fontitalic>N</fontitalic>
|
||||||
<fontsize>-1</fontsize>
|
<fontsize>-1</fontsize>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
<xloc>987</xloc>
|
<xloc>976</xloc>
|
||||||
<yloc>654</yloc>
|
<yloc>736</yloc>
|
||||||
<note>has_punishment_execution_info</note>
|
<note>has_punishment_execution_info</note>
|
||||||
<width>180</width>
|
<width>180</width>
|
||||||
</notepad>
|
</notepad>
|
||||||
|
|
@ -74,26 +74,6 @@
|
||||||
<to>Insert / update</to>
|
<to>Insert / update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Group by</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
|
|
@ -104,6 +84,21 @@
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Insert / update</from>
|
||||||
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream</from>
|
||||||
|
<to>Update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -125,41 +120,6 @@
|
||||||
<yloc>384</yloc>
|
<yloc>384</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_punishment_execution_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_sentence_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>864</xloc>
|
|
||||||
<yloc>608</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -314,36 +274,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>608</yloc>
|
<yloc>608</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>752</xloc>
|
|
||||||
<yloc>400</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream</name>
|
<name>Identify last row in a stream</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -491,6 +421,40 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>752</xloc>
|
||||||
|
<yloc>384</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -512,7 +476,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != ''
|
AND '${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||||
)
|
)
|
||||||
|
|
@ -544,7 +507,9 @@ SELECT recruit_id,
|
||||||
ELSE punishment_info ->> 'kodPerekvalif'
|
ELSE punishment_info ->> 'kodPerekvalif'
|
||||||
END AS article_modification_flag, -- Признак переквалификации
|
END AS article_modification_flag, -- Признак переквалификации
|
||||||
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
||||||
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date -- Фактическая дата освобождения
|
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
||||||
|
true AS has_punishment_execution_info,
|
||||||
|
true AS has_sentence_info
|
||||||
FROM punishment_data
|
FROM punishment_data
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
||||||
GROUP BY recruit_id, punishment_info;</sql>
|
GROUP BY recruit_id, punishment_info;</sql>
|
||||||
|
|
@ -612,7 +577,7 @@ GROUP BY recruit_id, punishment_info;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,6 @@
|
||||||
<to>Table input</to>
|
<to>Table input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Add constants</from>
|
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>Change job status on error</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
|
|
@ -45,16 +40,6 @@
|
||||||
<to>Change job status on success</to>
|
<to>Change job status on success</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Group by</from>
|
|
||||||
<to>Identify last row in a stream 2</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Identify last row in a stream 2</from>
|
|
||||||
<to>Add constants</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>Update</from>
|
||||||
<to>Change job status on error</to>
|
<to>Change job status on error</to>
|
||||||
|
|
@ -82,7 +67,17 @@
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>Insert / update</from>
|
||||||
<to>Group by</to>
|
<to>Sort rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Sort rows</from>
|
||||||
|
<to>Identify last row in a stream 2</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Identify last row in a stream 2</from>
|
||||||
|
<to>Update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -106,41 +101,6 @@
|
||||||
<yloc>432</yloc>
|
<yloc>432</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Add constants</name>
|
|
||||||
<type>Constant</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_punishment_execution_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
<field>
|
|
||||||
<length>-1</length>
|
|
||||||
<name>has_sentence_info</name>
|
|
||||||
<nullif>true</nullif>
|
|
||||||
<precision>-1</precision>
|
|
||||||
<set_empty_string>N</set_empty_string>
|
|
||||||
<type>Boolean</type>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>880</xloc>
|
|
||||||
<yloc>640</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>Change job status on error</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -309,36 +269,6 @@ DO UPDATE SET
|
||||||
<yloc>640</yloc>
|
<yloc>640</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Group by</name>
|
|
||||||
<type>GroupBy</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<add_linenr>N</add_linenr>
|
|
||||||
<all_rows>N</all_rows>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<fields>
|
|
||||||
</fields>
|
|
||||||
<give_back_row>N</give_back_row>
|
|
||||||
<group>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</field>
|
|
||||||
</group>
|
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
|
||||||
<prefix>grp</prefix>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>688</xloc>
|
|
||||||
<yloc>432</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Identify last row in a stream 2</name>
|
<name>Identify last row in a stream 2</name>
|
||||||
<type>DetectLastRow</type>
|
<type>DetectLastRow</type>
|
||||||
|
|
@ -486,6 +416,40 @@ DO UPDATE SET
|
||||||
<yloc>272</yloc>
|
<yloc>272</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>1000000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>688</xloc>
|
||||||
|
<yloc>448</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Table input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
|
|
@ -499,7 +463,6 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<limit/>
|
|
||||||
<sql>WITH punishment_data AS (
|
<sql>WITH punishment_data AS (
|
||||||
SELECT ri.recruit_id,
|
SELECT ri.recruit_id,
|
||||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info
|
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info
|
||||||
|
|
@ -507,7 +470,6 @@ DO UPDATE SET
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
AND '${IDM_ID}' != ''
|
AND '${IDM_ID}' != ''
|
||||||
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))
|
||||||
AND '${M_R_CR_DATE}'::timestamp >= ri.created_at
|
|
||||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||||
)
|
)
|
||||||
SELECT recruit_id,
|
SELECT recruit_id,
|
||||||
|
|
@ -538,7 +500,9 @@ SELECT recruit_id,
|
||||||
ELSE punishment_info ->> 'kodPerekvalif'
|
ELSE punishment_info ->> 'kodPerekvalif'
|
||||||
END AS article_modification_flag, -- Признак переквалификации
|
END AS article_modification_flag, -- Признак переквалификации
|
||||||
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
||||||
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date -- Фактическая дата освобождения
|
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
||||||
|
true AS has_punishment_execution_info,
|
||||||
|
true AS has_sentence_info
|
||||||
FROM punishment_data
|
FROM punishment_data
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
||||||
GROUP BY recruit_id, punishment_info;</sql>
|
GROUP BY recruit_id, punishment_info;</sql>
|
||||||
|
|
@ -606,7 +570,7 @@ GROUP BY recruit_id, punishment_info;</sql>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
<fields_valuename/>
|
<fields_valuename/>
|
||||||
<codes_valuename>error_code</codes_valuename>
|
<codes_valuename/>
|
||||||
<max_errors/>
|
<max_errors/>
|
||||||
<max_pct_errors/>
|
<max_pct_errors/>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,29 @@
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
<sql>SELECT
|
<limit/>
|
||||||
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_SUCCESS')
|
||||||
|
GROUP BY recruitment_id)
|
||||||
|
SELECT r.idm_id
|
||||||
FROM ervu_dashboard.recruitment r
|
FROM ervu_dashboard.recruitment r
|
||||||
LEFT JOIN etl.job_execution je
|
JOIN mud ON mud.recruitment_id = r.idm_id
|
||||||
ON r.idm_id = je.recruitment_id
|
JOIN ervu_dashboard.recruits_info ri
|
||||||
and job_name = 'punishment_job'
|
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
|
||||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
AND ri.updated_at > mud.max_upd_date
|
||||||
<variables_active>N</variables_active>
|
|
||||||
|
union
|
||||||
|
|
||||||
|
select r2.idm_id
|
||||||
|
from ervu_dashboard.recruitment r2
|
||||||
|
join etl.job_execution je
|
||||||
|
on r2.idm_id = je.recruitment_id
|
||||||
|
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
|
||||||
|
and je.job_name = '${JOB_NAME}';</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
|
|
@ -94,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -145,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -196,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -247,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
@ -298,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
|
||||||
<parameters>
|
<parameters>
|
||||||
<variable_mapping>
|
<variable_mapping>
|
||||||
<variable>IDM_ID</variable>
|
<variable>IDM_ID</variable>
|
||||||
<field>recruitment_id</field>
|
<field>idm_id</field>
|
||||||
<input/>
|
<input/>
|
||||||
</variable_mapping>
|
</variable_mapping>
|
||||||
<inherit_all_vars>Y</inherit_all_vars>
|
<inherit_all_vars>Y</inherit_all_vars>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue