recruit archive + CL_fz53 refatoring

This commit is contained in:
Fusionshh 2025-11-10 14:11:49 +03:00
parent 5700985794
commit 2e28e88dae
7 changed files with 542 additions and 330 deletions

View file

@ -404,9 +404,9 @@ and recruitment_id = '${IDM_ID}';</sql>
NOT i.hidden AS has_liability_fz53, NOT i.hidden AS has_liability_fz53,
ctid ctid
FROM public.infringement i FROM public.infringement i
JOIN public.recruit r ON r.id = i.recruit_id -- Проверка на пустую строку JOIN public.recruit r ON r.id = i.recruit_id
AND (r.current_recruitment = '${IDM_ID}' or (r.current_recruitment is null and r.target_recruitment = '${IDM_ID}')) AND (r.current_recruitment = '${IDM_ID}' or (r.current_recruitment is null and r.target_recruitment = '${IDM_ID}'))
AND i.updated_at >= '${M_INFR_UP_DATE}'::timestamp AND i.updated_at > '${MAX_UPDATE_DATE}'::timestamp
WHERE type = 'ADMINISTRATIVE') WHERE type = 'ADMINISTRATIVE')
select fd.*, select fd.*,
fd.ctid = (select max(ctid) from filtered_data) as last_row fd.ctid = (select max(ctid) from filtered_data) as last_row

View file

@ -21,34 +21,59 @@
</notepads> </notepads>
<order> <order>
<hop> <hop>
<from>Table input</from> <from>failed_deferment_liberation_permission_idm_ids_on_delta</from>
<to>Append streams</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>max_update_date_from_deferment_liberation</from>
<to>failed_deferment_liberation_permission_idm_ids_on_delta</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>max_update_date_from_deferment_liberation</from>
<to>updated_idm_ids_fromrecruits_deferment</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>updated_idm_ids_fromrecruits_deferment</from>
<to>Append streams</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Append streams</from>
<to>Sort rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Sort rows</from>
<to>citizen_liability_fz53_flow_delta.hpl</to> <to>citizen_liability_fz53_flow_delta.hpl</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>citizen_liability_fz53_flow_delta.hpl 2</to> <to>citizen_liability_fz53_flow_delta.hpl 2</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>citizen_liability_fz53_flow_delta.hpl 3</to> <to>citizen_liability_fz53_flow_delta.hpl 3</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>citizen_liability_fz53_flow_delta.hpl 4</to> <to>citizen_liability_fz53_flow_delta.hpl 4</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>citizen_liability_fz53_flow_delta.hpl 5</to> <to>citizen_liability_fz53_flow_delta.hpl 5</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
</order> </order>
<transform> <transform>
<name>Table input</name> <name>Append streams</name>
<type>TableInput</type> <type>Append</type>
<description/> <description/>
<distribute>Y</distribute> <distribute>Y</distribute>
<custom_distribution/> <custom_distribution/>
@ -57,34 +82,9 @@
<method>none</method> <method>none</method>
<schema_name/> <schema_name/>
</partitioning> </partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN ervu_dashboard.recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
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>864</xloc>
<yloc>288</yloc> <yloc>288</yloc>
</GUI> </GUI>
</transform> </transform>
@ -112,6 +112,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -135,10 +140,125 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>592</xloc> <xloc>1312</xloc>
<yloc>128</yloc> <yloc>128</yloc>
</GUI> </GUI>
</transform> </transform>
<transform>
<name>failed_deferment_liberation_permission_idm_ids_on_delta</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>max_update_date_from_deferment_liberation</lookup>
<sql>select r.idm_id as recruitment_id,
? as max_update_date
from ervu_dashboard.recruitment r
join etl.job_execution je
on r.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/>
<GUI>
<xloc>656</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>max_update_date_from_deferment_liberation</name>
<type>TableInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select max(updated_at) as max_update_date
from citizen_liability_fz53;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>464</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>updated_idm_ids_fromrecruits_deferment</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>max_update_date_from_deferment_liberation</lookup>
<sql>WITH max_update_date(val) AS (SELECT CAST(? AS timestamp))
SELECT DISTINCT COALESCE(r.current_recruitment, r.target_recruitment) AS recruitment_id,
? as max_update_date
FROM recruit r
JOIN infringement i ON i.recruit_id = r.id
JOIN max_update_date mud ON TRUE
WHERE (mud.val IS NULL OR i.updated_at > mud.val);</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>656</xloc>
<yloc>192</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>100000</sort_size>
<free_memory/>
<compress>N</compress>
<compress_variable/>
<unique_rows>Y</unique_rows>
<fields>
<field>
<name>recruitment_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>1040</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform> <transform>
<name>citizen_liability_fz53_flow_delta.hpl 2</name> <name>citizen_liability_fz53_flow_delta.hpl 2</name>
<type>PipelineExecutor</type> <type>PipelineExecutor</type>
@ -163,6 +283,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -186,8 +311,8 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>608</xloc> <xloc>1312</xloc>
<yloc>224</yloc> <yloc>208</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -214,6 +339,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -237,7 +367,7 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>624</xloc> <xloc>1312</xloc>
<yloc>288</yloc> <yloc>288</yloc>
</GUI> </GUI>
</transform> </transform>
@ -265,6 +395,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -288,7 +423,7 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>640</xloc> <xloc>1312</xloc>
<yloc>368</yloc> <yloc>368</yloc>
</GUI> </GUI>
</transform> </transform>
@ -316,6 +451,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -339,7 +479,7 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>624</xloc> <xloc>1312</xloc>
<yloc>448</yloc> <yloc>448</yloc>
</GUI> </GUI>
</transform> </transform>

View file

@ -21,12 +21,12 @@
</notepads> </notepads>
<order> <order>
<hop> <hop>
<from>Table input 2</from> <from>updated_idm_ids_fromrecruits_deferment</from>
<to>Append streams</to> <to>Append streams</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input 3</from> <from>failed_deferment_liberation_permission_idm_ids_on_delta</from>
<to>Append streams</to> <to>Append streams</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
@ -36,8 +36,8 @@
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>max_update_date_from_deferment_liberation</from>
<to>Table input 2</to> <to>updated_idm_ids_fromrecruits_deferment</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
@ -46,8 +46,8 @@
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>max_update_date_from_deferment_liberation</from>
<to>Table input 3</to> <to>failed_deferment_liberation_permission_idm_ids_on_delta</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
@ -122,87 +122,6 @@
<yloc>288</yloc> <yloc>288</yloc>
</GUI> </GUI>
</transform> </transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select max(updated_at) as max_update_date
from deferment_liberation;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>192</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>Table input</lookup>
<sql>WITH max_update_date(val) AS (SELECT CAST(? AS timestamp))
SELECT DISTINCT COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
? as max_update_date
FROM recruits r
JOIN recruits_deferment rd ON rd.recruit_id = r.id
JOIN max_update_date mud ON TRUE
WHERE (mud.val IS NULL OR rd.system_update_date > mud.val);</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>384</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
<name>Table input 3</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>Table input</lookup>
<sql>select r.idm_id as recruitment_id,
? as max_update_date
from ervu_dashboard.recruitment r
join etl.job_execution je
on r.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/>
<GUI>
<xloc>384</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform> <transform>
<name>deferment_liberation_permission_flow_delta.hpl</name> <name>deferment_liberation_permission_flow_delta.hpl</name>
<type>PipelineExecutor</type> <type>PipelineExecutor</type>
@ -483,6 +402,87 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<yloc>448</yloc> <yloc>448</yloc>
</GUI> </GUI>
</transform> </transform>
<transform>
<name>failed_deferment_liberation_permission_idm_ids_on_delta</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>max_update_date_from_deferment_liberation</lookup>
<sql>select r.idm_id as recruitment_id,
? as max_update_date
from ervu_dashboard.recruitment r
join etl.job_execution je
on r.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/>
<GUI>
<xloc>384</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>max_update_date_from_deferment_liberation</name>
<type>TableInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select max(updated_at) as max_update_date
from deferment_liberation;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>192</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>updated_idm_ids_fromrecruits_deferment</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>max_update_date_from_deferment_liberation</lookup>
<sql>WITH max_update_date(val) AS (SELECT CAST(? AS timestamp))
SELECT DISTINCT COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
? as max_update_date
FROM recruits r
JOIN recruits_deferment rd ON rd.recruit_id = r.id
JOIN max_update_date mud ON TRUE
WHERE (mud.val IS NULL OR rd.system_update_date > mud.val);</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>384</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform_error_handling> <transform_error_handling>
</transform_error_handling> </transform_error_handling>
<attributes/> <attributes/>

View file

@ -50,26 +50,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 input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop> <hop>
<from>sort_by_recruit_id</from> <from>sort_by_recruit_id</from>
<to>Update</to> <to>Update</to>
@ -80,6 +60,21 @@
<to>Filter rows</to> <to>Filter rows</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop>
<from>Table input</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
</order> </order>
<transform> <transform>
<name>Abort</name> <name>Abort</name>
@ -97,7 +92,7 @@
<row_threshold>0</row_threshold> <row_threshold>0</row_threshold>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1344</xloc> <xloc>1168</xloc>
<yloc>480</yloc> <yloc>480</yloc>
</GUI> </GUI>
</transform> </transform>
@ -133,7 +128,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1136</xloc> <xloc>960</xloc>
<yloc>480</yloc> <yloc>480</yloc>
</GUI> </GUI>
</transform> </transform>
@ -165,7 +160,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1360</xloc> <xloc>960</xloc>
<yloc>176</yloc> <yloc>176</yloc>
</GUI> </GUI>
</transform> </transform>
@ -211,7 +206,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning> </partitioning>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>720</xloc> <xloc>496</xloc>
<yloc>176</yloc> <yloc>176</yloc>
</GUI> </GUI>
</transform> </transform>
@ -247,13 +242,13 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to> <send_true_to>Change job status on success</send_true_to>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1360</xloc> <xloc>960</xloc>
<yloc>320</yloc> <yloc>320</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
<name>Identify last row in a stream</name> <name>Table input</name>
<type>DetectLastRow</type> <type>TableInput</type>
<description/> <description/>
<distribute>N</distribute> <distribute>N</distribute>
<custom_distribution/> <custom_distribution/>
@ -262,27 +257,10 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<method>none</method> <method>none</method>
<schema_name/> <schema_name/>
</partitioning> </partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_archive</connection> <connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row> <execute_each_row>N</execute_each_row>
<sql>SELECT <limit/>
<sql>with filtered_data as (SELECT
id, id,
recruit_id, recruit_id,
archivation_reason_id, archivation_reason_id,
@ -290,13 +268,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
updated_at, updated_at,
hidden, hidden,
recruit_extract_enable, recruit_extract_enable,
CASE ctid
WHEN recruit_extract_enable IS true THEN true
ELSE false
END AS card_in_archive
FROM public.recruit_archive FROM public.recruit_archive
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку WHERE vk_id = '${IDM_ID}')
AND vk_id = '${IDM_ID}' select fd.*,
fd.ctid = (select max(ctid) from filtered_data) as last_row
from filtered_data fd;
</sql> </sql>
<variables_active>Y</variables_active> <variables_active>Y</variables_active>
<attributes/> <attributes/>
@ -363,7 +340,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch> <use_batch>Y</use_batch>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>912</xloc> <xloc>736</xloc>
<yloc>320</yloc> <yloc>320</yloc>
</GUI> </GUI>
</transform> </transform>
@ -398,7 +375,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch> <use_batch>Y</use_batch>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>912</xloc> <xloc>736</xloc>
<yloc>480</yloc> <yloc>480</yloc>
</GUI> </GUI>
</transform> </transform>
@ -432,7 +409,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
</fields> </fields>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>720</xloc> <xloc>496</xloc>
<yloc>480</yloc> <yloc>480</yloc>
</GUI> </GUI>
</transform> </transform>

View file

@ -45,26 +45,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 input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop> <hop>
<from>sort_by_recruit_id</from> <from>sort_by_recruit_id</from>
<to>Update</to> <to>Update</to>
@ -80,6 +60,21 @@
<to>Filter rows</to> <to>Filter rows</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop>
<from>Table input</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order> </order>
<transform> <transform>
<name>Abort</name> <name>Abort</name>
@ -97,7 +92,7 @@
<row_threshold>0</row_threshold> <row_threshold>0</row_threshold>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1392</xloc> <xloc>1136</xloc>
<yloc>496</yloc> <yloc>496</yloc>
</GUI> </GUI>
</transform> </transform>
@ -133,7 +128,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1152</xloc> <xloc>896</xloc>
<yloc>496</yloc> <yloc>496</yloc>
</GUI> </GUI>
</transform> </transform>
@ -165,7 +160,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1376</xloc> <xloc>896</xloc>
<yloc>224</yloc> <yloc>224</yloc>
</GUI> </GUI>
</transform> </transform>
@ -214,7 +209,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning> </partitioning>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>704</xloc> <xloc>544</xloc>
<yloc>224</yloc> <yloc>224</yloc>
</GUI> </GUI>
</transform> </transform>
@ -250,25 +245,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to> <send_true_to>Change job status on success</send_true_to>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1376</xloc> <xloc>896</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>
@ -332,7 +309,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<update_bypassed>N</update_bypassed> <update_bypassed>N</update_bypassed>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>944</xloc> <xloc>736</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>
@ -340,7 +317,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<name>Table input</name> <name>Table input</name>
<type>TableInput</type> <type>TableInput</type>
<description/> <description/>
<distribute>Y</distribute> <distribute>N</distribute>
<custom_distribution/> <custom_distribution/>
<copies>1</copies> <copies>1</copies>
<partitioning> <partitioning>
@ -349,7 +326,8 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning> </partitioning>
<connection>ervu_person_archive</connection> <connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row> <execute_each_row>N</execute_each_row>
<sql>SELECT <limit/>
<sql>with filtered_data as (SELECT
id, id,
recruit_id, recruit_id,
archivation_reason_id, archivation_reason_id,
@ -357,14 +335,16 @@ and recruitment_id = '${IDM_ID}';</sql>
updated_at, updated_at,
hidden, hidden,
recruit_extract_enable, recruit_extract_enable,
CASE ctid
WHEN recruit_extract_enable IS true THEN true FROM public.recruit_archive ra
ELSE false WHERE vk_id = '${IDM_ID}'
END AS card_in_archive and case when '${MAX_UPDATE_DATE}' &lt;&gt; ''
FROM public.recruit_archive then ra.updated_at > to_date('${MAX_UPDATE_DATE}', 'YYYY-MM-DD')
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку else true end)
AND vk_id = '${IDM_ID}' select fd.*,
AND updated_at >= '${M_RECARCH_UP_DATE}'::timestamp</sql> fd.ctid = (select max(ctid) from filtered_data) as last_row
from filtered_data fd;
</sql>
<variables_active>Y</variables_active> <variables_active>Y</variables_active>
<attributes/> <attributes/>
<GUI> <GUI>
@ -408,7 +388,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch> <use_batch>Y</use_batch>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>944</xloc> <xloc>736</xloc>
<yloc>496</yloc> <yloc>496</yloc>
</GUI> </GUI>
</transform> </transform>
@ -442,7 +422,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
</fields> </fields>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>704</xloc> <xloc>544</xloc>
<yloc>496</yloc> <yloc>496</yloc>
</GUI> </GUI>
</transform> </transform>

View file

@ -50,26 +50,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 input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop> <hop>
<from>sort_by_recruit_id</from> <from>sort_by_recruit_id</from>
<to>Update</to> <to>Update</to>
@ -80,6 +60,21 @@
<to>Filter rows</to> <to>Filter rows</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop>
<from>Table input</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
</order> </order>
<transform> <transform>
<name>Abort</name> <name>Abort</name>
@ -97,7 +92,7 @@
<row_threshold>0</row_threshold> <row_threshold>0</row_threshold>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1120</xloc> <xloc>912</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>
@ -133,7 +128,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>928</xloc> <xloc>720</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>
@ -165,7 +160,7 @@ and recruitment_id = '${IDM_ID}';
</sql> </sql>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1152</xloc> <xloc>720</xloc>
<yloc>80</yloc> <yloc>80</yloc>
</GUI> </GUI>
</transform> </transform>
@ -229,7 +224,7 @@ DO UPDATE SET
</partitioning> </partitioning>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>528</xloc> <xloc>320</xloc>
<yloc>80</yloc> <yloc>80</yloc>
</GUI> </GUI>
</transform> </transform>
@ -265,25 +260,7 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to> <send_true_to>Change job status on success</send_true_to>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>1152</xloc> <xloc>720</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>528</xloc>
<yloc>208</yloc> <yloc>208</yloc>
</GUI> </GUI>
</transform> </transform>
@ -305,7 +282,6 @@ DO UPDATE SET
<condition>=</condition> <condition>=</condition>
<field>id</field> <field>id</field>
<name>id</name> <name>id</name>
<name2/>
</key> </key>
<schema>ervu_dashboard</schema> <schema>ervu_dashboard</schema>
<table>recruit_archive</table> <table>recruit_archive</table>
@ -348,7 +324,7 @@ DO UPDATE SET
<update_bypassed>Y</update_bypassed> <update_bypassed>Y</update_bypassed>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>720</xloc> <xloc>528</xloc>
<yloc>208</yloc> <yloc>208</yloc>
</GUI> </GUI>
</transform> </transform>
@ -356,7 +332,7 @@ DO UPDATE SET
<name>Table input</name> <name>Table input</name>
<type>TableInput</type> <type>TableInput</type>
<description/> <description/>
<distribute>Y</distribute> <distribute>N</distribute>
<custom_distribution/> <custom_distribution/>
<copies>1</copies> <copies>1</copies>
<partitioning> <partitioning>
@ -365,7 +341,8 @@ DO UPDATE SET
</partitioning> </partitioning>
<connection>ervu_person_archive</connection> <connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row> <execute_each_row>N</execute_each_row>
<sql>SELECT <limit/>
<sql>with filtered_data as (SELECT
id, id,
recruit_id, recruit_id,
archivation_reason_id, archivation_reason_id,
@ -373,13 +350,12 @@ DO UPDATE SET
updated_at, updated_at,
hidden, hidden,
recruit_extract_enable, recruit_extract_enable,
CASE ctid
WHEN recruit_extract_enable IS true THEN true
ELSE false
END AS card_in_archive
FROM public.recruit_archive FROM public.recruit_archive
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку WHERE vk_id = '${IDM_ID}')
AND vk_id = '${IDM_ID}' select fd.*,
fd.ctid = (select max(ctid) from filtered_data) as last_row
from filtered_data fd;
</sql> </sql>
<variables_active>Y</variables_active> <variables_active>Y</variables_active>
<attributes/> <attributes/>
@ -424,7 +400,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch> <use_batch>Y</use_batch>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>720</xloc> <xloc>528</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>
@ -458,7 +434,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
</fields> </fields>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>528</xloc> <xloc>320</xloc>
<yloc>352</yloc> <yloc>352</yloc>
</GUI> </GUI>
</transform> </transform>

View file

@ -21,33 +21,109 @@
</notepads> </notepads>
<order> <order>
<hop> <hop>
<from>Table input</from> <from>Append streams</from>
<to>Sort rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>max_update_date_from_recruit_archive</from>
<to>updated_idm_ids_from_source_recruit_archive</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>max_update_date_from_recruit_archive</from>
<to>failed_recruit_archive_idm_ids_on_delta</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>updated_idm_ids_from_source_recruit_archive</from>
<to>Append streams</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>failed_recruit_archive_idm_ids_on_delta</from>
<to>Append streams</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Sort rows</from>
<to>recruit_archive_flow_delta.hpl</to> <to>recruit_archive_flow_delta.hpl</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>recruit_archive_flow_delta.hpl 2</to> <to>recruit_archive_flow_delta.hpl 2</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>recruit_archive_flow_delta.hpl 3</to> <to>recruit_archive_flow_delta.hpl 3</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>recruit_archive_flow_delta.hpl 4</to> <to>recruit_archive_flow_delta.hpl 4</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
<hop> <hop>
<from>Table input</from> <from>Sort rows</from>
<to>recruit_archive_flow_delta.hpl 5</to> <to>recruit_archive_flow_delta.hpl 5</to>
<enabled>Y</enabled> <enabled>Y</enabled>
</hop> </hop>
</order> </order>
<transform> <transform>
<name>Table input</name> <name>Append streams</name>
<type>Append</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<attributes/>
<GUI>
<xloc>336</xloc>
<yloc>304</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>100000</sort_size>
<free_memory/>
<compress>N</compress>
<compress_variable/>
<unique_rows>Y</unique_rows>
<fields>
<field>
<name>recruitment_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>496</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>failed_recruit_archive_idm_ids_on_delta</name>
<type>TableInput</type> <type>TableInput</type>
<description/> <description/>
<distribute>Y</distribute> <distribute>Y</distribute>
@ -60,32 +136,42 @@
<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>WITH mud AS (SELECT recruitment_id, <lookup>max_update_date_from_recruit_archive</lookup>
MAX(execution_datetime) AS max_upd_date <sql>select r.idm_id as recruitment_id,
FROM etl.job_execution ? as max_update_date
WHERE job_name = '${JOB_NAME}' from ervu_dashboard.recruitment r
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN ervu_dashboard.recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from ervu_dashboard.recruitment r2
join etl.job_execution je join etl.job_execution je
on r2.idm_id = je.recruitment_id on r.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING') where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
and je.job_name = '${JOB_NAME}';</sql> and je.job_name = '${JOB_NAME}';</sql>
<variables_active>Y</variables_active> <variables_active>Y</variables_active>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>352</xloc> <xloc>176</xloc>
<yloc>288</yloc> <yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>max_update_date_from_recruit_archive</name>
<type>TableInput</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select max(updated_at) as max_update_date
from recruit_archive;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>0</xloc>
<yloc>304</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -112,6 +198,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -135,8 +226,8 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>640</xloc> <xloc>752</xloc>
<yloc>128</yloc> <yloc>144</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -163,6 +254,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -186,8 +282,8 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>640</xloc> <xloc>752</xloc>
<yloc>208</yloc> <yloc>224</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -214,6 +310,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -237,8 +338,8 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>640</xloc> <xloc>752</xloc>
<yloc>288</yloc> <yloc>304</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -265,6 +366,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -288,8 +394,8 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>640</xloc> <xloc>752</xloc>
<yloc>368</yloc> <yloc>384</yloc>
</GUI> </GUI>
</transform> </transform>
<transform> <transform>
@ -316,6 +422,11 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<field>idm_id</field> <field>idm_id</field>
<input/> <input/>
</variable_mapping> </variable_mapping>
<variable_mapping>
<variable>MAX_UPDATE_DATE</variable>
<field>max_update_date</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars> <inherit_all_vars>Y</inherit_all_vars>
</parameters> </parameters>
<execution_result_target_transform/> <execution_result_target_transform/>
@ -339,8 +450,36 @@ where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
<executors_output_transform/> <executors_output_transform/>
<attributes/> <attributes/>
<GUI> <GUI>
<xloc>656</xloc> <xloc>752</xloc>
<yloc>448</yloc> <yloc>464</yloc>
</GUI>
</transform>
<transform>
<name>updated_idm_ids_from_source_recruit_archive</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<lookup>max_update_date_from_recruit_archive</lookup>
<sql>WITH max_update_date(val) AS (SELECT CAST(? AS timestamp))
SELECT DISTINCT ra.vk_id as recruitment_id,
? as max_update_date
FROM public.recruit_archive ra
JOIN max_update_date mud ON TRUE
WHERE (mud.val IS NULL OR ra.updated_at > mud.val);</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>176</xloc>
<yloc>208</yloc>
</GUI> </GUI>
</transform> </transform>
<transform_error_handling> <transform_error_handling>