some fixes

This commit is contained in:
Ruslan 2025-10-17 18:09:47 +05:00
parent 4abc103472
commit 2d5f59988c
52 changed files with 1429 additions and 2844 deletions

View file

@ -1,150 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>infringement_update_date_ervu_dashboard</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/06/02 14:50:31.833</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/02 14:50:31.833</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
system_create_date,
CASE
WHEN system_update_date IS NULL THEN '0001-01-01 00:00:00'::timestamp
ELSE system_update_date
END as system_update_date,
current_timestamp AS record_created,
'infringement_table' AS workflow
FROM (
SELECT
system_create_date,
system_update_date
FROM (
SELECT
created_at AS system_create_date,
updated_at AS system_update_date,
ROW_NUMBER() OVER (
ORDER BY COALESCE(updated_at, '1000-01-01'::timestamp) DESC
) as rn
FROM (
SELECT created_at, updated_at
FROM ervu_dashboard.citizen_criminal_liability_fz53
UNION ALL
SELECT created_at, updated_at
FROM ervu_dashboard.citizen_liability_fz53
) AS all_data
) AS ranked
WHERE rn = 1
-- Если нет данных, вернуть fallback строку
UNION ALL
SELECT
current_timestamp AS system_create_date,
NULL AS system_update_date
WHERE NOT EXISTS (
SELECT 1
FROM ervu_dashboard.citizen_criminal_liability_fz53
UNION ALL
SELECT 1
FROM ervu_dashboard.citizen_liability_fz53
)
) AS result
LIMIT 1;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
<field>
<column_name>system_create_date</column_name>
<stream_name>system_create_date</stream_name>
</field>
<field>
<column_name>system_update_date</column_name>
<stream_name>system_update_date</stream_name>
</field>
<field>
<column_name>workflow</column_name>
<stream_name>workflow</stream_name>
</field>
<field>
<column_name>record_created</column_name>
<stream_name>record_created</stream_name>
</field>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>public</schema>
<specify_fields>Y</specify_fields>
<table>recruit_create</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>job_last_update_date_infringement</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<created_user>-</created_user>
<created_date>2025/06/02 14:48:05.666</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/02 14:48:05.666</modified_date>
<parameters>
</parameters>
<actions>
<action>
<name>Start</name>
<description/>
<type>SPECIAL</type>
<attributes/>
<DayOfMonth>1</DayOfMonth>
<hour>12</hour>
<intervalMinutes>60</intervalMinutes>
<intervalSeconds>0</intervalSeconds>
<minutes>0</minutes>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>592</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>infringement_update_date_ervu_dashboard.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/infringement_update_date_ervu_dashboard.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>784</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>row_last_infringement_update_date.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/row_last_infringement_update_date.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1088</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>Success</name>
<description/>
<type>SUCCESS</type>
<attributes/>
<parallel>N</parallel>
<xloc>1264</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>infringement_update_date_ervu_dashboard.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>infringement_update_date_ervu_dashboard.hpl</from>
<to>row_last_infringement_update_date.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>row_last_infringement_update_date.hpl</from>
<to>Success</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>

View file

@ -76,7 +76,6 @@
</partitioning>
<fields>
<field>
<default_value/>
<field_name>max_infringement_update_date</field_name>
<variable_name>M_INFR_UP_DATE</variable_name>
<variable_type>GP_WORKFLOW</variable_type>
@ -103,13 +102,26 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
system_update_date AS MAX_INFRINGEMENT_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'infringement_table')
order by record_created desc
limit 1</sql>
<sql>with
base as (
select max(updated_at) AS max_infringement_update_date
from ervu_dashboard.citizen_criminal_liability_fz53
union all
select max(updated_at) AS max_infringement_update_date
from ervu_dashboard.citizen_liability_fz53
),
b AS (
select max(max_infringement_update_date) AS max_infringement_update_date
from base
)
select
CASE
WHEN max_infringement_update_date is null THEN '0001-01-01 00:00:00'::timestamp
ELSE max_infringement_update_date
END AS max_infringement_update_date
from b</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -401,7 +401,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base AS (
SELECT

View file

@ -276,7 +276,6 @@ base as (
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_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 '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
@ -364,7 +363,7 @@ WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn',
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -322,7 +322,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH base AS (
SELECT
ri.recruit_id,
@ -397,7 +396,7 @@ FROM inn_data;</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -337,7 +337,6 @@ DO UPDATE SET
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as (
SELECT
@ -346,7 +345,6 @@ base as (
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_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 '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
@ -380,7 +378,7 @@ WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'inn'->'predINN'->>'inn',
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -65,22 +65,27 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH mud AS (
SELECT
recruitment_id,
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
GROUP BY recruitment_id
)
SELECT
r.idm_id
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 recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date;</sql>
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>
@ -219,7 +224,7 @@ FROM ervu_dashboard.recruitment r
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>592</xloc>
<xloc>608</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -331,7 +336,7 @@ FROM ervu_dashboard.recruitment r
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>608</xloc>
<xloc>592</xloc>
<yloc>368</yloc>
</GUI>
</transform>
@ -387,7 +392,7 @@ FROM ervu_dashboard.recruitment r
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>608</xloc>
<xloc>592</xloc>
<yloc>448</yloc>
</GUI>
</transform>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'snils_inn_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -45,43 +45,43 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Block until transforms finish</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>Update</from>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -102,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>496</yloc>
<xloc>1344</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>320</yloc>
<xloc>1120</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform>
@ -170,8 +192,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1856</xloc>
<yloc>176</yloc>
<xloc>1392</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
@ -216,8 +238,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1536</xloc>
<yloc>176</yloc>
<xloc>688</xloc>
<yloc>160</yloc>
</GUI>
</transform>
<transform>
@ -252,70 +274,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1536</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_property_raw</aggregate>
<subject>is_property</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_ground_transport_raw</aggregate>
<subject>is_ground_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_air_transport_raw</aggregate>
<subject>is_air_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_water_transport_raw</aggregate>
<subject>is_water_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_possibility_reg_residence</aggregate>
<subject>is_possibility_reg_residence</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>176</yloc>
<xloc>1392</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -325,8 +292,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>880</xloc>
<yloc>176</yloc>
<xloc>688</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -342,7 +309,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as(
SELECT
@ -351,7 +317,6 @@ base as(
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_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 '${M_R_CR_DATE}'::timestamp >= ri.created_at
),
prop AS (
SELECT
@ -432,7 +397,7 @@ all_data as(
to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date,
'realty' AS type_property,
1 AS is_possibility_reg_residence
true AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'realty'
@ -454,7 +419,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'ground_transportation' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'ground_transportation'
@ -476,7 +441,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'air_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'air_vehicles'
@ -498,7 +463,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'water_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'water_vehicles'
@ -517,23 +482,23 @@ select
start_date,
close_date,
type_property,
is_possibility_reg_residence,
has_possibility_reg_residence,
CASE
WHEN type_property = 'realty' THEN 1
ELSE 0
END AS is_property, -- недвиж//has_property
WHEN type_property = 'realty' THEN true
ELSE false
END AS has_property, -- недвиж//has_property
CASE
WHEN type_property = 'ground_transportation'THEN 1
ELSE 0
END AS is_ground_transport, -- наземный транспорт//has_ground_transport
WHEN type_property = 'ground_transportation' THEN true
ELSE false
END AS has_ground_transport, -- наземный транспорт//has_ground_transport
CASE
WHEN type_property = 'air_vehicles' THEN 1
ELSE 0
END AS is_air_transport, -- воздушный транспорт//has_air_transport
WHEN type_property = 'air_vehicles' THEN true
ELSE false
END AS has_air_transport, -- воздушный транспорт//has_air_transport
CASE
WHEN type_property = 'water_vehicles' THEN 1
ELSE 0
END AS is_water_transport -- водный транспорт//has_water_transport
WHEN type_property = 'water_vehicles' THEN true
ELSE false
END AS has_water_transport -- водный транспорт//has_water_transport
from all_data</sql>
<variables_active>Y</variables_active>
<attributes/>
@ -624,7 +589,7 @@ from all_data</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>688</xloc>
<xloc>912</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -675,13 +640,13 @@ from all_data</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>176</yloc>
<xloc>912</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -690,50 +655,25 @@ from all_data</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_property</field_name>
<formula_string>has_property_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_ground_transport</field_name>
<formula_string>has_ground_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_air_transport</field_name>
<formula_string>has_air_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_water_transport</field_name>
<formula_string>has_water_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_possibility_reg_residence</field_name>
<formula_string>has_possibility_reg_residence_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>176</yloc>
<xloc>688</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -744,7 +684,7 @@ from all_data</sql>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
@ -754,7 +694,7 @@ from all_data</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -42,86 +42,46 @@
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>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>User defined Java expression</to>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Update</to>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Update 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update 5</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Change job status on error</to>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
@ -142,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>528</yloc>
<xloc>1456</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -178,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>352</yloc>
<xloc>1200</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
@ -210,7 +192,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>2128</xloc>
<xloc>1520</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -259,7 +241,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1888</xloc>
<xloc>768</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -295,70 +277,15 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1888</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_property_raw</aggregate>
<subject>is_property</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_ground_transport_raw</aggregate>
<subject>is_ground_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_air_transport_raw</aggregate>
<subject>is_air_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_water_transport_raw</aggregate>
<subject>is_water_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_possibility_reg_residence_raw</aggregate>
<subject>is_possibility_reg_residence</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>208</yloc>
<xloc>1520</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -368,8 +295,8 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>944</xloc>
<yloc>208</yloc>
<xloc>768</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -472,7 +399,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>752</xloc>
<xloc>960</xloc>
<yloc>352</yloc>
</GUI>
</transform>
@ -582,7 +509,7 @@ all_data as(
to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date,
'realty' AS type_property,
1 AS is_possibility_reg_residence
true AS has_possibility_reg_residence
FROM prop
WHERE prop.property_type = 'realty'
@ -603,7 +530,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'ground_transportation' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM prop
WHERE prop.property_type = 'ground_transportation'
@ -624,7 +551,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'air_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM prop
WHERE prop.property_type = 'air_vehicles'
@ -645,7 +572,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'water_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM prop
WHERE prop.property_type = 'water_vehicles'
)
@ -663,23 +590,23 @@ SELECT
start_date,
close_date,
type_property,
is_possibility_reg_residence,
has_possibility_reg_residence,
CASE
WHEN type_property = 'realty' THEN 1
ELSE 0
END AS is_property,
WHEN type_property = 'realty' THEN true
ELSE false
END AS has_property,
CASE
WHEN type_property = 'ground_transportation' THEN 1
ELSE 0
END AS is_ground_transport,
WHEN type_property = 'ground_transportation' THEN true
ELSE false
END AS has_ground_transport,
CASE
WHEN type_property = 'air_vehicles' THEN 1
ELSE 0
END AS is_air_transport,
WHEN type_property = 'air_vehicles' THEN true
ELSE false
END AS has_air_transport,
CASE
WHEN type_property = 'water_vehicles' THEN 1
ELSE 0
END AS is_water_transport
WHEN type_property = 'water_vehicles' THEN true
ELSE false
END AS has_water_transport
FROM all_data</sql>
<variables_active>Y</variables_active>
<attributes/>
@ -708,13 +635,24 @@ FROM all_data</sql>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_possibility_reg_residence</field>
<name>has_possibility_reg_residence</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
<value>
<name>has_possibility_reg_residence</name>
<rename>has_possibility_reg_residence</rename>
@ -724,13 +662,13 @@ FROM all_data</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1696</xloc>
<yloc>208</yloc>
<xloc>960</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Update 2</name>
<type>Update</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -739,210 +677,25 @@ FROM all_data</sql>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_water_transport</field>
<name>has_water_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1600</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 3</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_air_transport</field>
<name>has_air_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 4</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_ground_transport</field>
<name>has_ground_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1408</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Update 5</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_property</field>
<name>has_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_property</field_name>
<formula_string>has_property_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_ground_transport</field_name>
<formula_string>has_ground_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_air_transport</field_name>
<formula_string>has_air_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_water_transport</field_name>
<formula_string>has_water_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_possibility_reg_residence</field_name>
<formula_string>has_possibility_reg_residence_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>208</yloc>
<xloc>768</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -951,7 +704,7 @@ FROM all_data</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -963,55 +716,7 @@ FROM all_data</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 2</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 3</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 4</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 5</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -47,82 +47,42 @@
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Update 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update 5</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 2</from>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 3</from>
<to>Change job status on error</to>
<from>Insert / update</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 4</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update 5</from>
<to>Change job status on error</to>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
</order>
@ -142,10 +102,32 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1648</xloc>
<xloc>1744</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1472</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -178,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>496</yloc>
<xloc>1328</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform>
@ -210,7 +192,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>2112</xloc>
<xloc>1744</xloc>
<yloc>352</yloc>
</GUI>
</transform>
@ -274,7 +256,7 @@ DO UPDATE SET
</partitioning>
<attributes/>
<GUI>
<xloc>1904</xloc>
<xloc>768</xloc>
<yloc>352</yloc>
</GUI>
</transform>
@ -310,70 +292,15 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1904</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_property_raw</aggregate>
<subject>is_property</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_ground_transport_raw</aggregate>
<subject>is_ground_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_air_transport_raw</aggregate>
<subject>is_air_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_water_transport_raw</aggregate>
<subject>is_water_transport</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_possibility_reg_residence_raw</aggregate>
<subject>is_possibility_reg_residence</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>352</yloc>
<xloc>1744</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -383,8 +310,8 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>880</xloc>
<yloc>352</yloc>
<xloc>768</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -487,7 +414,7 @@ DO UPDATE SET
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>688</xloc>
<xloc>1024</xloc>
<yloc>496</yloc>
</GUI>
</transform>
@ -513,7 +440,6 @@ base as(
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_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 '${M_R_CR_DATE}'::timestamp >= ri.created_at
),
prop AS (
SELECT
@ -594,7 +520,7 @@ all_data as(
to_date(property_data->>'dataRegPrav', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPrav', 'YYYY-MM-DD') AS close_date,
'realty' AS type_property,
1 AS is_possibility_reg_residence
true AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'realty'
@ -616,7 +542,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'ground_transportation' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'ground_transportation'
@ -638,7 +564,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'air_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'air_vehicles'
@ -660,7 +586,7 @@ all_data as(
to_date(property_data->>'dataRegPr', 'YYYY-MM-DD') AS start_date,
to_date(property_data->>'dataPrekPr', 'YYYY-MM-DD') AS close_date,
'water_vehicles' AS type_property,
0 AS is_possibility_reg_residence
false AS has_possibility_reg_residence
FROM base
JOIN prop ON base.recruit_id = prop.recruit_id
WHERE prop.property_type = 'water_vehicles'
@ -679,23 +605,23 @@ select
start_date,
close_date,
type_property,
is_possibility_reg_residence,
has_possibility_reg_residence,
CASE
WHEN type_property = 'realty' THEN 1
ELSE 0
END AS is_property, -- недвиж//has_property
WHEN type_property = 'realty' THEN true
ELSE false
END AS has_property, -- недвиж//has_property
CASE
WHEN type_property = 'ground_transportation'THEN 1
ELSE 0
END AS is_ground_transport, -- наземный транспорт//has_ground_transport
WHEN type_property = 'ground_transportation' THEN true
ELSE false
END AS has_ground_transport, -- наземный транспорт//has_ground_transport
CASE
WHEN type_property = 'air_vehicles' THEN 1
ELSE 0
END AS is_air_transport, -- воздушный транспорт//has_air_transport
WHEN type_property = 'air_vehicles' THEN true
ELSE false
END AS has_air_transport, -- воздушный транспорт//has_air_transport
CASE
WHEN type_property = 'water_vehicles' THEN 1
ELSE 0
END AS is_water_transport -- водный транспорт//has_water_transport
WHEN type_property = 'water_vehicles' THEN true
ELSE false
END AS has_water_transport -- водный транспорт//has_water_transport
from all_data</sql>
<variables_active>Y</variables_active>
<attributes/>
@ -724,13 +650,24 @@ from all_data</sql>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_possibility_reg_residence</field>
<name>has_possibility_reg_residence</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
<value>
<name>has_possibility_reg_residence</name>
<rename>has_possibility_reg_residence</rename>
@ -740,13 +677,13 @@ from all_data</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>352</yloc>
<xloc>992</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform>
<name>Update 2</name>
<type>Update</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -755,210 +692,25 @@ from all_data</sql>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_water_transport</field>
<name>has_water_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_water_transport</name>
<rename>has_water_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Update 3</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_air_transport</field>
<name>has_air_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_air_transport</name>
<rename>has_air_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1456</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Update 4</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_ground_transport</field>
<name>has_ground_transport</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_ground_transport</name>
<rename>has_ground_transport</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1360</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Update 5</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>&lt;></condition>
<field>has_property</field>
<name>has_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
<value>
<name>has_property</name>
<rename>has_property</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1264</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_property</field_name>
<formula_string>has_property_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_ground_transport</field_name>
<formula_string>has_ground_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_air_transport</field_name>
<formula_string>has_air_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_water_transport</field_name>
<formula_string>has_water_transport_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_possibility_reg_residence</field_name>
<formula_string>has_possibility_reg_residence_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>352</yloc>
<xloc>768</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -967,7 +719,7 @@ from all_data</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -979,55 +731,7 @@ from all_data</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 2</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 3</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 4</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
</error>
<error>
<source_transform>Update 5</source_transform>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -65,22 +65,27 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH mud AS (
SELECT
recruitment_id,
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
GROUP BY recruitment_id
)
SELECT
r.idm_id
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 recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date;</sql>
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'property_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<workflow>
<name>job_last_update_date_recruit_archive</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<workflow_version/>
<created_user>-</created_user>
<created_date>2025/06/02 14:48:05.666</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/02 14:48:05.666</modified_date>
<parameters>
</parameters>
<actions>
<action>
<name>Start</name>
<description/>
<type>SPECIAL</type>
<attributes/>
<DayOfMonth>1</DayOfMonth>
<hour>12</hour>
<intervalMinutes>60</intervalMinutes>
<intervalSeconds>0</intervalSeconds>
<minutes>0</minutes>
<repeat>N</repeat>
<schedulerType>0</schedulerType>
<weekDay>1</weekDay>
<parallel>N</parallel>
<xloc>400</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>recruit_archive_update_date_ervu_dashboard.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/recruit_archive_update_date_ervu_dashboard.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>736</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>row_last_recruit_archive_update_date.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/row_last_recruit_archive_update_date.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1152</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
<action>
<name>Success</name>
<description/>
<type>SUCCESS</type>
<attributes/>
<parallel>N</parallel>
<xloc>1504</xloc>
<yloc>352</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
<from>Start</from>
<to>recruit_archive_update_date_ervu_dashboard.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>recruit_archive_update_date_ervu_dashboard.hpl</from>
<to>row_last_recruit_archive_update_date.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>row_last_recruit_archive_update_date.hpl</from>
<to>Success</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
</notepads>
<attributes/>
</workflow>

View file

@ -41,48 +41,48 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<from>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<from>Table output</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<from>Block until transforms finish</from>
<to>Filter rows</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>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
</order>
@ -103,7 +103,29 @@
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>464</yloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1168</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -123,11 +145,8 @@
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
@ -139,11 +158,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>320</yloc>
<xloc>1136</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
@ -160,11 +178,8 @@ and recruitment_id = '${IDM_ID}';
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
@ -175,10 +190,9 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1792</xloc>
<xloc>1360</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -224,7 +238,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1584</xloc>
<xloc>720</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -260,50 +274,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1584</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_card_in_archive_raw</aggregate>
<subject>is_card_in_archive</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>176</yloc>
<xloc>1360</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -313,8 +292,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>176</yloc>
<xloc>720</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -330,6 +309,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
id,
recruit_id,
@ -339,13 +319,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
hidden,
recruit_extract_enable,
CASE
WHEN recruit_extract_enable IS true THEN 1
ELSE 0
END AS is_card_in_archive
WHEN recruit_extract_enable IS true THEN true
ELSE false
END AS card_in_archive
FROM public.recruit_archive
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= created_at
</sql>
<variables_active>Y</variables_active>
<attributes/>
@ -412,7 +391,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>704</xloc>
<xloc>912</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -447,13 +426,13 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>176</yloc>
<xloc>912</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -462,18 +441,25 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>card_in_archive</field_name>
<formula_string>has_card_in_archive_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>176</yloc>
<xloc>720</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -482,7 +468,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -494,7 +480,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -41,38 +41,43 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<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>User defined Java expression</to>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Insert / update</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
@ -80,11 +85,6 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -102,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>480</yloc>
<xloc>1392</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>352</yloc>
<xloc>1152</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -170,7 +192,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1760</xloc>
<xloc>1376</xloc>
<yloc>224</yloc>
</GUI>
</transform>
@ -219,7 +241,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1568</xloc>
<xloc>704</xloc>
<yloc>224</yloc>
</GUI>
</transform>
@ -255,50 +277,15 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1568</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_card_in_archive_raw</aggregate>
<subject>is_card_in_archive</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>224</yloc>
<xloc>1376</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -308,8 +295,8 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>224</yloc>
<xloc>704</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -372,7 +359,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>704</xloc>
<xloc>944</xloc>
<yloc>352</yloc>
</GUI>
</transform>
@ -389,6 +376,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
id,
recruit_id,
@ -398,8 +386,8 @@ and recruitment_id = '${IDM_ID}';</sql>
hidden,
recruit_extract_enable,
CASE
WHEN recruit_extract_enable IS true THEN 1
ELSE 0
WHEN recruit_extract_enable IS true THEN true
ELSE false
END AS card_in_archive
FROM public.recruit_archive
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
@ -448,13 +436,13 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1344</xloc>
<yloc>224</yloc>
<xloc>944</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -463,18 +451,25 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>card_in_archive</field_name>
<formula_string>has_card_in_archive_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>224</yloc>
<xloc>704</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -483,7 +478,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -495,7 +490,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -41,48 +41,48 @@
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<from>Identify last row in a stream</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<from>Block until transforms finish</from>
<to>Filter rows</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>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
</order>
@ -103,7 +103,29 @@
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>336</yloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>976</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -123,11 +145,8 @@
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
@ -139,11 +158,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>208</yloc>
<xloc>928</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -160,11 +178,8 @@ and recruitment_id = '${IDM_ID}';
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
@ -175,10 +190,9 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1552</xloc>
<xloc>1152</xloc>
<yloc>80</yloc>
</GUI>
</transform>
@ -242,7 +256,7 @@ DO UPDATE SET
</partitioning>
<attributes/>
<GUI>
<xloc>1328</xloc>
<xloc>528</xloc>
<yloc>80</yloc>
</GUI>
</transform>
@ -278,50 +292,15 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_card_in_archive_raw</aggregate>
<subject>is_card_in_archive</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>480</xloc>
<yloc>80</yloc>
<xloc>1152</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -331,8 +310,8 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>80</yloc>
<xloc>528</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -395,7 +374,7 @@ DO UPDATE SET
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>480</xloc>
<xloc>720</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -412,6 +391,7 @@ DO UPDATE SET
</partitioning>
<connection>ervu_person_archive</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
id,
recruit_id,
@ -421,13 +401,12 @@ DO UPDATE SET
hidden,
recruit_extract_enable,
CASE
WHEN recruit_extract_enable IS true THEN 1
ELSE 0
WHEN recruit_extract_enable IS true THEN true
ELSE false
END AS card_in_archive
FROM public.recruit_archive
WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}'::timestamp >= created_at
</sql>
<variables_active>Y</variables_active>
<attributes/>
@ -472,13 +451,13 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1120</xloc>
<yloc>80</yloc>
<xloc>720</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -487,18 +466,25 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>card_in_archive</field_name>
<formula_string>has_card_in_archive_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>80</yloc>
<xloc>528</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -507,7 +493,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -519,7 +505,7 @@ WHERE '${IDM_ID}' != '' -- Проверка на пустую строку
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>recruit_archive_update_date_ervu_dashboard</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2025/06/02 14:50:31.833</created_date>
<modified_user>-</modified_user>
<modified_date>2025/06/02 14:50:31.833</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
COALESCE(MAX(created_at), '0001-01-01 00:00:00'::timestamp) AS system_create_date,
COALESCE(MAX(updated_at), '0001-01-01 00:00:00'::timestamp) AS system_update_date,
current_timestamp AS record_created,
'recruit_archive_table' AS workflow
FROM ervu_dashboard.recruit_archive;</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>896</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>public</schema>
<specify_fields>N</specify_fields>
<table>recruit_create</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -60,14 +60,28 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
r.idm_id as recruitment_id
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'recruit_archive_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>
<xloc>352</xloc>
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -325,7 +339,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<executors_output_transform/>
<attributes/>
<GUI>
<xloc>640</xloc>
<xloc>656</xloc>
<yloc>448</yloc>
</GUI>
</transform>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'recruit_archive_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -71,7 +71,6 @@
</partitioning>
<fields>
<field>
<default_value/>
<field_name>MAX_RECRUIT_ARCHIVE_UPDATE_DATE</field_name>
<variable_name>M_RECARCH_UP_DATE</variable_name>
<variable_type>GP_WORKFLOW</variable_type>
@ -98,13 +97,17 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
system_update_date AS MAX_RECRUIT_ARCHIVE_UPDATE_DATE--,
--record_created
FROM public.recruit_create
WHERE system_update_date = (select max(system_update_date) from public.recruit_create where workflow = 'recruit_archive_table')
order by record_created desc
limit 1</sql>
<sql>with
base as (
select max(updated_at) AS MAX_RECRUIT_ARCHIVE_UPDATE_DATE
from ervu_dashboard.recruit_archive
)
select
CASE
WHEN MAX_RECRUIT_ARCHIVE_UPDATE_DATE is null THEN '0001-01-01 00:00:00'::timestamp
ELSE MAX_RECRUIT_ARCHIVE_UPDATE_DATE
END AS MAX_RECRUIT_ARCHIVE_UPDATE_DATE
from base</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>

View file

@ -267,7 +267,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as (
SELECT
@ -364,7 +363,7 @@ WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'sn
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -324,7 +324,6 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH base AS (
SELECT
ri.recruit_id,
@ -350,7 +349,6 @@ and recruitment_id = '${IDM_ID}';</sql>
AND LENGTH(REGEXP_REPLACE(ri.info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'snils', '[^0-9]', '', 'g')) = 11
)
)
limit 10
),
snils_data AS (
SELECT
@ -401,7 +399,7 @@ FROM snils_data;</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -339,7 +339,6 @@ DO UPDATE SET
</partitioning>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
base as (
SELECT
@ -348,7 +347,6 @@ base as (
FROM ervu_dashboard.recruits_info ri
join ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_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 '${M_R_CR_DATE}'::timestamp >= ri.created_at
)
SELECT
recruit_id,
@ -382,7 +380,7 @@ WHERE LENGTH(REGEXP_REPLACE(info->'svedFL'->'svedBS'->'snils'->'predSNILS'->>'sn
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -65,22 +65,27 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH mud AS (
SELECT
recruitment_id,
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS','DELTA_ERROR','DELTA_SUCCESS','DELTA_PROCESSING')
GROUP BY recruitment_id
)
SELECT
r.idm_id
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 recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date;</sql>
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'snils_inn_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -45,43 +45,43 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>Update</from>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -102,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>496</yloc>
<xloc>1424</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1184</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -123,11 +145,8 @@
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
@ -139,11 +158,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>320</yloc>
<xloc>1200</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
@ -160,11 +178,8 @@ and recruitment_id = '${IDM_ID}';
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
@ -175,10 +190,9 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>2032</xloc>
<xloc>1408</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -224,7 +238,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1712</xloc>
<xloc>704</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -260,65 +274,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1712</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_sent_summons_raw</aggregate>
<subject>is_sent_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_served_summons_raw</aggregate>
<subject>is_served_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_appeared_to_recruitment_center_raw</aggregate>
<subject>is_appeared_to_recruitment_center</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_not_appeared_by_valid_excuse_raw</aggregate>
<subject>is_not_appeared_by_valid_excuse</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>16</yloc>
<xloc>1408</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -328,8 +292,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>880</xloc>
<yloc>16</yloc>
<xloc>704</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -345,24 +309,25 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
s.id, --id повестки
CASE
WHEN s.send_date is not null THEN 1
ELSE 0
END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки
WHEN s.send_date is not null THEN true
ELSE false
END AS has_sent_summons, --факт направления повестки///Признак наличия направленной повестки
CASE
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1
ELSE 0
END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN true
ELSE false
END AS has_served_summons, --has_served_summons//Признак наличия врученной повестки
CASE
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1
ELSE 0
END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN true
ELSE false
END AS appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
CASE
WHEN ss.code = '5.1' THEN 1
ELSE 0
END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
WHEN ss.code = '5.1' THEN true
ELSE false
END AS not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
s.recruit_id,
s.send_date, --дата направления повестки
s.series, --серия повестки
@ -389,13 +354,7 @@ WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND s.department_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= s.create_date
${LIMIT_FW}</sql>
AND s.department_id = '${IDM_ID}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -493,7 +452,7 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>688</xloc>
<xloc>912</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -540,13 +499,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>176</yloc>
<xloc>912</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -555,42 +514,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_sent_summons</field_name>
<formula_string>has_sent_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_served_summons</field_name>
<formula_string>has_served_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>appeared_to_recruitment_center</field_name>
<formula_string>has_appeared_to_recruitment_center_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>not_appeared_by_valid_excuse</field_name>
<formula_string>has_not_appeared_by_valid_excuse_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1104</xloc>
<yloc>16</yloc>
<xloc>704</xloc>
<yloc>512</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -601,7 +543,7 @@ ${LIMIT_FW}</sql>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
@ -611,7 +553,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -40,48 +40,48 @@
<to>Abort</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<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>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Detect empty stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -102,10 +102,32 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1440</xloc>
<xloc>1488</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -123,11 +145,8 @@
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
@ -139,11 +158,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1440</xloc>
<yloc>704</yloc>
<xloc>1312</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
@ -160,11 +178,8 @@ and recruitment_id = '${IDM_ID}';
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
@ -175,11 +190,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1920</xloc>
<yloc>384</yloc>
<xloc>1488</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
@ -227,8 +241,8 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>384</yloc>
<xloc>848</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
@ -263,65 +277,15 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_sent_summons_raw</aggregate>
<subject>is_sent_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_served_summons_raw</aggregate>
<subject>is_served_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_appeared_to_recruitment_center_raw</aggregate>
<subject>is_appeared_to_recruitment_center</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_not_appeared_by_valid_excuse_raw</aggregate>
<subject>is_not_appeared_by_valid_excuse</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>800</xloc>
<yloc>384</yloc>
<xloc>1488</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -331,8 +295,8 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>992</xloc>
<yloc>384</yloc>
<xloc>848</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
@ -435,7 +399,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>800</xloc>
<xloc>1056</xloc>
<yloc>704</yloc>
</GUI>
</transform>
@ -452,24 +416,25 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
s.id, --id повестки
CASE
WHEN s.send_date is not null THEN 1
ELSE 0
END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки
WHEN s.send_date is not null THEN true
ELSE false
END AS has_sent_summons, --факт направления повестки///Признак наличия направленной повестки
CASE
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1
ELSE 0
END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN true
ELSE false
END AS has_served_summons, --has_served_summons//Признак наличия врученной повестки
CASE
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1
ELSE 0
END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN true
ELSE false
END AS appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
CASE
WHEN ss.code = '5.1' THEN 1
ELSE 0
END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
WHEN ss.code = '5.1' THEN true
ELSE false
END AS not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
s.recruit_id,
s.send_date, --дата направления повестки
s.series, --серия повестки
@ -494,9 +459,7 @@ join public.subpoena_reason sr on sr.id = s.reason_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND s.department_id = '${IDM_ID}'
AND s.status_change_date >= '${M_S_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
AND s.status_change_date >= '${M_S_UP_DATE}'::timestamp</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -547,13 +510,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1440</xloc>
<yloc>384</yloc>
<xloc>1056</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -562,42 +525,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_sent_summons</field_name>
<formula_string>has_sent_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_served_summons</field_name>
<formula_string>has_served_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>appeared_to_recruitment_center</field_name>
<formula_string>has_appeared_to_recruitment_center_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>not_appeared_by_valid_excuse</field_name>
<formula_string>has_not_appeared_by_valid_excuse_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1216</xloc>
<yloc>384</yloc>
<xloc>848</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -606,7 +552,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -618,7 +564,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -45,43 +45,43 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>Update</from>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -106,6 +106,28 @@
<yloc>752</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1296</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -123,11 +145,8 @@
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
@ -139,11 +158,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1472</xloc>
<yloc>560</yloc>
<xloc>1280</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
@ -160,11 +178,8 @@ and recruitment_id = '${IDM_ID}';
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
@ -175,11 +190,10 @@ WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';
</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>1936</xloc>
<yloc>352</yloc>
<xloc>1472</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -242,8 +256,8 @@ DO UPDATE SET
</partitioning>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>352</yloc>
<xloc>848</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -278,65 +292,15 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_sent_summons_raw</aggregate>
<subject>is_sent_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_served_summons_raw</aggregate>
<subject>is_served_summons</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_appeared_to_recruitment_center_raw</aggregate>
<subject>is_appeared_to_recruitment_center</subject>
<type>MAX</type>
</field>
<field>
<aggregate>has_not_appeared_by_valid_excuse_raw</aggregate>
<subject>is_not_appeared_by_valid_excuse</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>352</yloc>
<xloc>1472</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -346,8 +310,8 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>1024</xloc>
<yloc>352</yloc>
<xloc>848</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
@ -450,7 +414,7 @@ DO UPDATE SET
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>832</xloc>
<xloc>1056</xloc>
<yloc>560</yloc>
</GUI>
</transform>
@ -467,24 +431,25 @@ DO UPDATE SET
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>SELECT
s.id, --id повестки
CASE
WHEN s.send_date is not null THEN 1
ELSE 0
END AS is_sent_summons, --факт направления повестки///Признак наличия направленной повестки
WHEN s.send_date is not null THEN true
ELSE false
END AS has_sent_summons, --факт направления повестки///Признак наличия направленной повестки
CASE
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN 1
ELSE 0
END AS is_served_summons, --has_served_summons//Признак наличия врученной повестки
WHEN s.system_stages->'subpoenaAwarded' != 'true' THEN true
ELSE false
END AS has_served_summons, --has_served_summons//Признак наличия врученной повестки
CASE
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN 1
ELSE 0
END AS is_appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
WHEN s.system_stages->'recruitAttendanceConfirm' != 'true' THEN true
ELSE false
END AS appeared_to_recruitment_center, -- appeared_to_recruitment_center//Признак явки в военный комиссариат
CASE
WHEN ss.code = '5.1' THEN 1
ELSE 0
END AS is_not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
WHEN ss.code = '5.1' THEN true
ELSE false
END AS not_appeared_by_valid_excuse, -- not_appeared_by_valid_excuse//Признак неявки в военкомат по уважительной причине
s.recruit_id,
s.send_date, --дата направления повестки
s.series, --серия повестки
@ -509,9 +474,7 @@ join public.subpoena_reason sr on sr.id = s.reason_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND s.department_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= s.create_date
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -562,13 +525,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1472</xloc>
<yloc>352</yloc>
<xloc>1056</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -577,42 +540,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_sent_summons</field_name>
<formula_string>has_sent_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>has_served_summons</field_name>
<formula_string>has_served_summons_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>appeared_to_recruitment_center</field_name>
<formula_string>has_appeared_to_recruitment_center_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<formula>
<field_name>not_appeared_by_valid_excuse</field_name>
<formula_string>has_not_appeared_by_valid_excuse_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1248</xloc>
<yloc>352</yloc>
<xloc>848</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -621,7 +567,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -633,7 +579,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -60,14 +60,28 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
r.idm_id as recruitment_id
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'subpoena_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>
<xloc>352</xloc>
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'subpoena_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -440,30 +440,6 @@
<yloc>912</yloc>
<attributes_hac/>
</action>
<action>
<name>job_last_update_date_infringement.hwf</name>
<description/>
<type>WORKFLOW</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/job_last_update_date_infringement.hwf</filename>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>Y</parallel>
<xloc>944</xloc>
<yloc>976</yloc>
<attributes_hac/>
</action>
<action>
<name>job_last_update_date_deferment_decision.hwf</name>
<description/>
@ -488,30 +464,6 @@
<yloc>1104</yloc>
<attributes_hac/>
</action>
<action>
<name>job_last_update_date_recruit_archive.hwf</name>
<description/>
<type>WORKFLOW</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/job_last_update_date_recruit_archive.hwf</filename>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>Y</parallel>
<xloc>944</xloc>
<yloc>1232</yloc>
<attributes_hac/>
</action>
<action>
<name>job_last_update_date_restriction_document.hwf</name>
<description/>
@ -584,6 +536,58 @@
<yloc>1424</yloc>
<attributes_hac/>
</action>
<action>
<name>row_last_infringement_update_date.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_liability_fz53/row_last_infringement_update_date.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>Y</parallel>
<xloc>944</xloc>
<yloc>976</yloc>
<attributes_hac/>
</action>
<action>
<name>row_last_recruit_archive_update_date.hpl</name>
<description/>
<type>PIPELINE</type>
<attributes/>
<add_date>N</add_date>
<add_time>N</add_time>
<clear_files>N</clear_files>
<clear_rows>N</clear_rows>
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/recruit_archive/row_last_recruit_archive_update_date.hpl</filename>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
<params_from_previous>N</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>944</xloc>
<yloc>1232</yloc>
<attributes_hac/>
</action>
</actions>
<hops>
<hop>
@ -698,27 +702,6 @@
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Start</from>
<to>job_last_update_date_infringement.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_last_update_date_infringement.hwf</from>
<to>citizen_criminal_liability_fz53_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_last_update_date_infringement.hwf</from>
<to>citizen_liability_fz53_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_last_update_date_deferment_decision.hwf</from>
<to>deferment_liberation_job.hwf</to>
@ -733,20 +716,6 @@
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>job_last_update_date_recruit_archive.hwf</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_last_update_date_recruit_archive.hwf</from>
<to>recruit_archive_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Start</from>
<to>job_last_update_date_restriction_document.hwf</to>
@ -799,10 +768,45 @@
<hop>
<from>Start</from>
<to>citizen_appealing_violations_fz53_job.hwf</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>Start</from>
<to>row_last_infringement_update_date.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>row_last_infringement_update_date.hpl</from>
<to>citizen_criminal_liability_fz53_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>row_last_infringement_update_date.hpl</from>
<to>citizen_liability_fz53_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>Start</from>
<to>row_last_recruit_archive_update_date.hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>row_last_recruit_archive_update_date.hpl</from>
<to>recruit_archive_job.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
<notepad>

View file

@ -271,8 +271,7 @@ FROM public.restriction_document
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= created_at
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -355,14 +354,11 @@ ${LIMIT_FW}</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>Y</specify_fields>
<table>restriction_document</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
@ -381,7 +377,7 @@ ${LIMIT_FW}</sql>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>

View file

@ -380,8 +380,7 @@ WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND updated_at >= '${M_RESTRDOC_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -395,7 +394,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -288,13 +288,11 @@ DO UPDATE SET
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>restriction_document</table>
@ -395,8 +393,7 @@ FROM public.restriction_document
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= created_at
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -410,7 +407,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -60,14 +60,28 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
r.idm_id as recruitment_id
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'restriction_document_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>
<xloc>352</xloc>
@ -95,7 +109,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -146,7 +160,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -197,7 +211,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -248,7 +262,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>
@ -299,7 +313,7 @@ where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING
<parameters>
<variable_mapping>
<variable>IDM_ID</variable>
<field>recruitment_id</field>
<field>idm_id</field>
<input/>
</variable_mapping>
<inherit_all_vars>Y</inherit_all_vars>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'restriction_document_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -45,43 +45,43 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>Update</from>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table output</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -102,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>464</yloc>
<xloc>1360</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -137,8 +159,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>320</yloc>
<xloc>1168</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -168,8 +190,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1808</xloc>
<yloc>192</yloc>
<xloc>1344</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -214,8 +236,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>192</yloc>
<xloc>704</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
@ -250,52 +272,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1552</xloc>
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_active_temporary_measure_raw</aggregate>
<subject>is_active_temporary_measure</subject>
<type>MAX</type>
<valuefield/>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<linenr_fieldname/>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>192</yloc>
<xloc>1344</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -305,8 +290,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>192</yloc>
<xloc>704</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -322,12 +307,13 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select
s.recruit_id,
CASE
WHEN rdi.applied_fact is true THEN 1
ELSE 0
END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
WHEN rdi.applied_fact is true THEN true
ELSE false
END AS has_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
rdi.*
from public.restriction_document_item rdi
join public.restriction_document rd on
@ -337,9 +323,7 @@ s.id = rd.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND rd.vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= rdi.created_at
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -437,7 +421,7 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>672</xloc>
<xloc>928</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -472,13 +456,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>192</yloc>
<xloc>928</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -487,18 +471,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_active_temporary_measure</field_name>
<formula_string>has_active_temporary_measure_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1088</xloc>
<yloc>192</yloc>
<xloc>704</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -509,7 +500,7 @@ ${LIMIT_FW}</sql>
<nr_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename>error_code</codes_valuename>
<codes_valuename/>
<max_errors/>
<max_pct_errors/>
<min_pct_rows/>
@ -519,7 +510,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -45,46 +45,46 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>Update</from>
<from>Insert / update</from>
<to>Block until transforms finish</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>sort_by_recruit_id</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>sort_by_recruit_id</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -102,10 +102,32 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1376</xloc>
<xloc>1408</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1264</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -137,8 +159,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>224</yloc>
<xloc>1232</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
@ -168,8 +190,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1920</xloc>
<yloc>96</yloc>
<xloc>1472</xloc>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
@ -217,8 +239,8 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>96</yloc>
<xloc>768</xloc>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
@ -253,50 +275,15 @@ and recruitment_id = '${IDM_ID}';</sql>
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1648</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_active_temporary_measure</aggregate>
<subject>is_active_temporary_measure</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>736</xloc>
<yloc>96</yloc>
<xloc>1472</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -306,8 +293,8 @@ and recruitment_id = '${IDM_ID}';</sql>
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>928</xloc>
<yloc>96</yloc>
<xloc>768</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
@ -415,7 +402,7 @@ and recruitment_id = '${IDM_ID}';</sql>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>736</xloc>
<xloc>992</xloc>
<yloc>224</yloc>
</GUI>
</transform>
@ -432,13 +419,12 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select
s.recruit_id,
CASE
WHEN rdi.applied_fact is true THEN 1
ELSE 0
END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
WHEN rdi.applied_fact is true THEN true
ELSE false
END AS has_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
rdi.*
from public.restriction_document_item rdi
join public.restriction_document rd on
@ -448,9 +434,7 @@ s.id = rd.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND rd.vk_id = '${IDM_ID}'
AND rdi.updated_at >= '${M_RDI_UP_DATE}'::timestamp
${LIMIT_FW}</sql>
AND rdi.updated_at >= '${M_RDI_UP_DATE}'::timestamp</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -494,13 +478,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1376</xloc>
<yloc>96</yloc>
<xloc>992</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -509,18 +493,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_active_temporary_measure</field_name>
<formula_string>has_active_temporary_measure_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>96</yloc>
<xloc>768</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -529,7 +520,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -541,7 +532,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -45,43 +45,43 @@
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Group by</from>
<to>Identify last row in a stream</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Identify last row in a stream</from>
<to>User defined Java expression</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>User defined Java expression</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Update</from>
<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>Insert / update</from>
<to>Block until transforms finish</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>
<from>sort_by_recruit_id</from>
<to>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>Update</from>
<from>Block until transforms finish</from>
<to>Filter rows</to>
<enabled>Y</enabled>
</hop>
@ -102,8 +102,30 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1280</xloc>
<yloc>400</yloc>
<xloc>1312</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>Block until transforms finish</name>
<type>BlockUntilTransformsFinish</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<transforms>
<transform>
<name>Update</name>
</transform>
</transforms>
<attributes/>
<GUI>
<xloc>1184</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -137,8 +159,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1280</xloc>
<yloc>208</yloc>
<xloc>1136</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
@ -168,8 +190,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1744</xloc>
<yloc>80</yloc>
<xloc>1440</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -232,8 +254,8 @@ DO UPDATE SET
</partitioning>
<attributes/>
<GUI>
<xloc>1488</xloc>
<yloc>80</yloc>
<xloc>672</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -268,50 +290,15 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
<name>Group by</name>
<type>GroupBy</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<add_linenr>N</add_linenr>
<all_rows>N</all_rows>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<aggregate>has_active_temporary_measure</aggregate>
<subject>is_active_temporary_measure</subject>
<type>MAX</type>
</field>
</fields>
<give_back_row>N</give_back_row>
<group>
<field>
<name>recruit_id</name>
</field>
</group>
<ignore_aggregate>N</ignore_aggregate>
<prefix>grp</prefix>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>80</yloc>
<xloc>1440</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Identify last row in a stream</name>
<type>DetectLastRow</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -321,8 +308,8 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>832</xloc>
<yloc>80</yloc>
<xloc>672</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -343,13 +330,11 @@ DO UPDATE SET
<condition>=</condition>
<field>id</field>
<name>id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>created_at</field>
<name>created_at</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>restriction_document_item</table>
@ -432,7 +417,7 @@ DO UPDATE SET
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>640</xloc>
<xloc>912</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -449,12 +434,13 @@ DO UPDATE SET
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>select
s.recruit_id,
CASE
WHEN rdi.applied_fact is true THEN 1
ELSE 0
END AS is_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
WHEN rdi.applied_fact is true THEN true
ELSE false
END AS has_active_temporary_measure, -- has_active_temporary_measure//Признак наличия примененных временных мер
rdi.*
from public.restriction_document_item rdi
join public.restriction_document rd on
@ -464,9 +450,7 @@ s.id = rd.subpoena_id
WHERE
'${IDM_ID}' != '' -- Проверка на пустую строку
AND rd.vk_id = '${IDM_ID}'
AND '${M_R_CR_DATE}' >= rdi.created_at
${LIMIT_FW}</sql>
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -488,19 +472,16 @@ ${LIMIT_FW}</sql>
<commit>10000</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>&lt;></condition>
<field>has_active_temporary_measure</field>
<name>has_active_temporary_measure</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen</table>
@ -513,13 +494,13 @@ ${LIMIT_FW}</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1280</xloc>
<yloc>80</yloc>
<xloc>912</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>User defined Java expression</name>
<type>Janino</type>
<name>sort_by_recruit_id</name>
<type>SortRows</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -528,18 +509,25 @@ ${LIMIT_FW}</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>has_active_temporary_measure</field_name>
<formula_string>has_active_temporary_measure_raw == 1</formula_string>
<value_type>Boolean</value_type>
<value_length>-1</value_length>
<value_precision>-1</value_precision>
<replace_field/>
</formula>
<compress>N</compress>
<directory>${java.io.tmpdir}</directory>
<fields>
<field>
<ascending>Y</ascending>
<case_sensitive>N</case_sensitive>
<collator_enabled>N</collator_enabled>
<collator_strength>0</collator_strength>
<name>recruit_id</name>
<presorted>N</presorted>
</field>
</fields>
<sort_prefix>srt</sort_prefix>
<sort_size>1000000</sort_size>
<unique_rows>Y</unique_rows>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>80</yloc>
<xloc>672</xloc>
<yloc>368</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -548,7 +536,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>
@ -560,7 +548,7 @@ ${LIMIT_FW}</sql>
<target_transform>Change job status on error</target_transform>
<is_enabled>Y</is_enabled>
<nr_valuename/>
<descriptions_valuename/>
<descriptions_valuename>error_description</descriptions_valuename>
<fields_valuename/>
<codes_valuename/>
<max_errors/>

View file

@ -60,14 +60,28 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
r.idm_id as recruitment_id
<sql>WITH mud AS (SELECT recruitment_id,
MAX(execution_datetime) AS max_upd_date
FROM etl.job_execution
WHERE job_name = '${JOB_NAME}'
AND status IN ('SUCCESS', 'DELTA_SUCCESS')
GROUP BY recruitment_id)
SELECT r.idm_id
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'restriction_document_item_job'
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
<variables_active>N</variables_active>
JOIN mud ON mud.recruitment_id = r.idm_id
JOIN recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from 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/>
<GUI>
<xloc>352</xloc>

View file

@ -65,9 +65,9 @@
FROM ervu_dashboard.recruitment r
LEFT JOIN etl.job_execution je
ON r.idm_id = je.recruitment_id
and job_name = 'restriction_document_item_job'
and job_name = '${JOB_NAME}'
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>272</xloc>

View file

@ -63,24 +63,8 @@
<sql>SELECT
idm_id AS recruitment
FROM ervu_dashboard.recruitment
${COMMENT}/*
where idm_id in ('110686b2-4a01-4976-885b-d26a2980f53a',
'cff66da8-2be0-4839-bd8e-332b1a150031',
'34c8685e-f08a-4877-afb1-a0589800a21c',
'0e10678c-f272-41c3-94dd-c15830321f9a',
'9703f108-761a-467a-aad3-89617e5539ed',
'55eae374-9bb5-4295-9e3a-5fbcdaba870d',
'dad6c101-34be-45c3-8173-57190cb69dfb',
'fc10523f-af31-4f6b-b0e2-00799758f634',
'61807cc2-9913-4060-8802-0672877c28c8',
'eba7fd7d-e3da-49a7-8e65-8fc85e47190e',
'f59afe6d-c166-4196-a489-6d17f02fc05e',
'22c64b79-f8e4-41e7-a2f3-1aa9df424fd9',
'0fe2bdf0-afbb-402d-93da-67e511799afa',
'6139de3b-2378-496f-9fca-7df7dab90832',
'50ba73dd-1726-48f1-8b7c-7a77ff965299')
${COMMENT}*/</sql>
<variables_active>Y</variables_active>
</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>

View file

@ -376,7 +376,7 @@
<hop>
<from>row_last_recruit_update_date.hpl</from>
<to>drivers_licence_job.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -390,7 +390,7 @@
<hop>
<from>row_last_recruit_update_date.hpl</from>
<to>property_job.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>

View file

@ -411,7 +411,7 @@
<hop>
<from>row_last_recruit_update_date.hpl</from>
<to>snils_job.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -453,7 +453,7 @@
<hop>
<from>row_last_recruit_update_date.hpl</from>
<to>inn_job.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>