This commit is contained in:
Ruslan 2025-10-17 19:01:56 +05:00
parent 2d5f59988c
commit f0cf498890
19 changed files with 287 additions and 310 deletions

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

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>
@ -106,6 +106,28 @@
<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>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>320</yloc>
<xloc>1168</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -170,7 +192,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1856</xloc>
<xloc>1392</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -216,7 +238,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
</partitioning>
<attributes/>
<GUI>
<xloc>1536</xloc>
<xloc>688</xloc>
<yloc>176</yloc>
</GUI>
</transform>
@ -252,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>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_defer_conscription_raw</aggregate>
<subject>is_defer_conscription</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>
@ -305,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>
@ -343,7 +330,6 @@ p_recruits_deferment AS (
d.system_update_date
FROM public.recruits_deferment d
JOIN public.ervu_reason_for_deferment rd ON d.ervu_reason_for_deferment_id = rd.id
WHERE '${M_R_CR_DATE}'::timestamp >= d.system_create_date
)
SELECT
d.deferment_id,
@ -356,9 +342,9 @@ SELECT
d.system_update_date AS updated_at,
'permission' AS permission_fact, -- ключ принадлежности к праву на отсрочку
CASE
WHEN d.hidden is false THEN 1
ELSE 0
END AS is_defer_conscription -- наличие права на отсрочку от призыва
WHEN d.hidden is false THEN true
ELSE false
END AS defer_conscription -- наличие права на отсрочку от призыва
FROM part_recruits r
JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<variables_active>Y</variables_active>
@ -434,7 +420,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>688</xloc>
<xloc>912</xloc>
<yloc>320</yloc>
</GUI>
</transform>
@ -469,13 +455,13 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>176</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/>
@ -484,18 +470,25 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>defer_conscription</field_name>
<formula_string>has_defer_conscription_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>496</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -506,7 +499,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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/>
@ -516,7 +509,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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

@ -41,47 +41,47 @@
<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>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Insert / update</from>
<to>Group by</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>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>Update</from>
<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>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>1248</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>352</yloc>
<xloc>1200</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform>
@ -170,7 +192,7 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1872</xloc>
<xloc>1440</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -219,7 +241,7 @@ and recruitment_id = '${IDM_ID}';</sql>
</partitioning>
<attributes/>
<GUI>
<xloc>1632</xloc>
<xloc>752</xloc>
<yloc>208</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>1632</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_defer_conscription_raw</aggregate>
<subject>is_defer_conscription</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>1440</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>944</xloc>
<yloc>208</yloc>
<xloc>752</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
@ -382,7 +369,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>
@ -433,9 +420,9 @@ SELECT
d.system_update_date AS updated_at,
'permission' AS permission_fact, -- ключ принадлежности к праву на отсрочку
CASE
WHEN d.hidden is false THEN 1
ELSE 0
END AS is_defer_conscription -- наличие права на отсрочку от призыва
WHEN d.hidden is false THEN true
ELSE false
END AS defer_conscription -- наличие права на отсрочку от призыва
FROM part_recruits r
JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<variables_active>Y</variables_active>
@ -481,13 +468,13 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1392</xloc>
<yloc>208</yloc>
<xloc>976</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/>
@ -496,18 +483,25 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>defer_conscription</field_name>
<formula_string>has_defer_conscription_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>1168</xloc>
<yloc>208</yloc>
<xloc>752</xloc>
<yloc>528</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -516,7 +510,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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/>
@ -528,7 +522,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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

@ -46,45 +46,45 @@
<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>
<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>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>
<hop>
<from>Update</from>
<to>Change job status on error</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Abort</name>
@ -102,10 +102,32 @@
<row_threshold>0</row_threshold>
<attributes/>
<GUI>
<xloc>1312</xloc>
<xloc>1488</xloc>
<yloc>400</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>1248</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Change job status on error</name>
<type>ExecSql</type>
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>208</yloc>
<xloc>1184</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -170,8 +192,8 @@ and recruitment_id = '${IDM_ID}';
</sql>
<attributes/>
<GUI>
<xloc>1776</xloc>
<yloc>64</yloc>
<xloc>1488</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
@ -234,8 +256,8 @@ DO UPDATE SET
</partitioning>
<attributes/>
<GUI>
<xloc>1568</xloc>
<yloc>64</yloc>
<xloc>704</xloc>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
@ -270,50 +292,15 @@ DO UPDATE SET
<send_true_to>Change job status on success</send_true_to>
<attributes/>
<GUI>
<xloc>1568</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_defer_conscription_raw</aggregate>
<subject>is_defer_conscription</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>672</xloc>
<yloc>64</yloc>
<xloc>1488</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>
@ -323,8 +310,8 @@ DO UPDATE SET
<resultfieldname>last_row</resultfieldname>
<attributes/>
<GUI>
<xloc>864</xloc>
<yloc>64</yloc>
<xloc>704</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
@ -397,7 +384,7 @@ DO UPDATE SET
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>672</xloc>
<xloc>912</xloc>
<yloc>208</yloc>
</GUI>
</transform>
@ -414,7 +401,6 @@ DO UPDATE SET
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit/>
<sql>WITH
part_recruits AS (
SELECT
@ -435,7 +421,6 @@ p_recruits_deferment AS (
d.system_update_date
FROM public.recruits_deferment d
JOIN public.ervu_reason_for_deferment rd ON d.ervu_reason_for_deferment_id = rd.id
WHERE '${M_R_CR_DATE}'::timestamp >= d.system_create_date
)
SELECT
d.deferment_id,
@ -448,9 +433,9 @@ SELECT
d.system_update_date AS updated_at,
'permission' AS permission_fact, -- ключ принадлежности к праву на отсрочку
CASE
WHEN d.hidden is false THEN 1
ELSE 0
END AS is_defer_conscription -- наличие права на отсрочку от призыва
WHEN d.hidden is false THEN true
ELSE false
END AS defer_conscription -- наличие права на отсрочку от призыва
FROM part_recruits r
JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<variables_active>Y</variables_active>
@ -496,13 +481,13 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1312</xloc>
<yloc>64</yloc>
<xloc>912</xloc>
<yloc>400</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/>
@ -511,18 +496,25 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</sql>
<method>none</method>
<schema_name/>
</partitioning>
<formula>
<field_name>defer_conscription</field_name>
<formula_string>has_defer_conscription_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>64</yloc>
<xloc>704</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>
@ -531,7 +523,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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/>
@ -543,7 +535,7 @@ JOIN p_recruits_deferment d ON r.id = d.recruit_id</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 = 'deferment_liberation_permission_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 ervu_dashboard.recruits_info ri
ON COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = r.idm_id
AND ri.updated_at > mud.max_upd_date
union
select r2.idm_id
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')
and je.job_name = '${JOB_NAME}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<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 = 'deferment_liberation_permission_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

@ -81,7 +81,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -81,7 +81,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -81,7 +81,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -81,7 +81,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')

View file

@ -76,7 +76,7 @@ FROM ervu_dashboard.recruitment r
union
select r2.idm_id
from recruitment r2
from ervu_dashboard.recruitment r2
join etl.job_execution je
on r2.idm_id = je.recruitment_id
where je.status in ('DELTA_ERROR', 'DELTA_PROCESSING')