fix appealing fz53
This commit is contained in:
parent
b1a38efbea
commit
0336a39cb3
14 changed files with 306 additions and 330 deletions
|
|
@ -156,7 +156,8 @@
|
|||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<CopyNr/>
|
||||
<name>Table output</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
|
|
@ -356,7 +357,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
WHEN elem->>'dataVozvrashh' ~ '^\d{4}-\d{2}-\d{2}$' THEN (elem->>'dataVozvrashh')::date
|
||||
ELSE NULL
|
||||
END as return_date,
|
||||
true as is_border_crossed
|
||||
true as border_crossed
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@
|
|||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<CopyNr/>
|
||||
<name>Insert / update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
|
|
@ -402,7 +403,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
WHEN elem->>'dataVozvrashh' ~ '^\d{4}-\d{2}-\d{2}$' THEN (elem->>'dataVozvrashh')::date
|
||||
ELSE NULL
|
||||
END as return_date,
|
||||
true as is_border_crossed
|
||||
true as border_crossed
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
|
|
|
|||
|
|
@ -142,7 +142,8 @@
|
|||
</partitioning>
|
||||
<transforms>
|
||||
<transform>
|
||||
<name>Update</name>
|
||||
<CopyNr/>
|
||||
<name>Insert / update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
|
|
@ -414,7 +415,7 @@ DO UPDATE SET
|
|||
WHEN elem->>'dataVozvrashh' ~ '^\d{4}-\d{2}-\d{2}$' THEN (elem->>'dataVozvrashh')::date
|
||||
ELSE NULL
|
||||
END as return_date,
|
||||
true as is_border_crossed
|
||||
true as border_crossed
|
||||
FROM ervu_dashboard.recruits_info ri
|
||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||
AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
|
|
|
|||
|
|
@ -288,7 +288,6 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
r.system_pgs_status,
|
||||
r.full_name,
|
||||
|
|
@ -522,7 +521,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/>
|
||||
|
|
|
|||
|
|
@ -575,7 +575,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/>
|
||||
|
|
|
|||
|
|
@ -588,7 +588,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/>
|
||||
|
|
|
|||
|
|
@ -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 = 'citizen_job'
|
||||
and job_name = '${JOB_NAME}'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
|
|
|
|||
|
|
@ -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 = 'citizen_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>
|
||||
|
|
|
|||
|
|
@ -52,12 +52,18 @@
|
|||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>58</height>
|
||||
<xloc>576</xloc>
|
||||
<yloc>752</yloc>
|
||||
<note>1. is_appealing_violations_fz53 case when можно заменить на not ad.hidden и без java expression передавать в апдейт
|
||||
<height>150</height>
|
||||
<xloc>544</xloc>
|
||||
<yloc>960</yloc>
|
||||
<note>+ - 3.в этой таблице может быть несколько одинаковых recruit_id
|
||||
1. тут false нужно в true и заливать в citizen
|
||||
|
||||
|
||||
|
||||
|
||||
1. is_appealing_violations_fz53 case when можно заменить на not ad.hidden и без java expression передавать в апдейт
|
||||
2. Убрать лишнее из input
|
||||
3. Зачем группировка нужна если исходные данные не массив?</note>
|
||||
3. Зачем группировка нужна если исходные данные не массив? </note>
|
||||
<width>642</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
|
|
@ -83,47 +89,47 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<from>Update</from>
|
||||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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>Table output</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>Table output</from>
|
||||
<to>Change job status on error</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>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>
|
||||
|
|
@ -144,10 +150,32 @@
|
|||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<xloc>1648</xloc>
|
||||
<yloc>832</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>Table output</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1296</xloc>
|
||||
<yloc>656</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Change job status on error</name>
|
||||
<type>ExecSql</type>
|
||||
|
|
@ -180,8 +208,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>656</yloc>
|
||||
<xloc>1280</xloc>
|
||||
<yloc>832</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -212,8 +240,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1952</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -258,8 +286,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1696</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>800</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -294,50 +322,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1696</xloc>
|
||||
<yloc>608</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_appealing_violations_fz53_raw</aggregate>
|
||||
<subject>is_appealing_violations_fz53</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>512</yloc>
|
||||
<xloc>1600</xloc>
|
||||
<yloc>656</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>
|
||||
|
|
@ -347,8 +340,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
<resultfieldname>last_row</resultfieldname>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>800</xloc>
|
||||
<yloc>656</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -383,15 +376,12 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
|||
CASE
|
||||
WHEN ad.hidden is false THEN 1
|
||||
ELSE 0
|
||||
END AS is_appealing_violations_fz53
|
||||
END AS has_appealing_violations_fz53
|
||||
FROM public.appeal_document_dto ad
|
||||
JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND (r.current_recruitment = '${IDM_ID}' or (r.current_recruitment is null and r.target_recruitment = '${IDM_ID}'))
|
||||
AND '${M_R_CR_DATE}' >= ad.create_date
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
|
||||
--WHERE hidden IS FALSE
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -469,7 +459,7 @@ ${LIMIT_FW}</sql>
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<xloc>1040</xloc>
|
||||
<yloc>656</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -504,13 +494,13 @@ ${LIMIT_FW}</sql>
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>1040</xloc>
|
||||
<yloc>832</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/>
|
||||
|
|
@ -519,18 +509,25 @@ ${LIMIT_FW}</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<formula>
|
||||
<field_name>has_appealing_violations_fz53</field_name>
|
||||
<formula_string>has_appealing_violations_fz53_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>512</yloc>
|
||||
<xloc>800</xloc>
|
||||
<yloc>832</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
@ -541,7 +538,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/>
|
||||
|
|
@ -551,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/>
|
||||
|
|
|
|||
|
|
@ -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>sort_by_recruit_id</from>
|
||||
<to>Update</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>Insert / update</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>Insert / update</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>1360</xloc>
|
||||
<yloc>384</yloc>
|
||||
<xloc>1472</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>Insert / update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1248</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -138,8 +160,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>224</yloc>
|
||||
<xloc>1200</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -170,8 +192,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1728</xloc>
|
||||
<yloc>144</yloc>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>80</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -219,8 +241,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1552</xloc>
|
||||
<yloc>64</yloc>
|
||||
<xloc>736</xloc>
|
||||
<yloc>80</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -256,49 +278,14 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>144</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_appealing_violations_fz53_raw</aggregate>
|
||||
<subject>is_appealing_violations_fz53</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>720</xloc>
|
||||
<yloc>64</yloc>
|
||||
<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>
|
||||
|
|
@ -308,8 +295,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<resultfieldname>last_row</resultfieldname>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>912</xloc>
|
||||
<yloc>64</yloc>
|
||||
<xloc>736</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -392,7 +379,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<xloc>928</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -409,7 +396,6 @@ and recruitment_id = '${IDM_ID}';</sql>
|
|||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
ad.recruit_id,
|
||||
ad.create_date, -- дата создания обжалования
|
||||
|
|
@ -434,10 +420,7 @@ FROM public.appeal_document_dto ad
|
|||
JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND (r.current_recruitment = '${IDM_ID}' or (r.current_recruitment is null and r.target_recruitment = '${IDM_ID}'))
|
||||
AND ad.create_date >= '${M_R_CR_DATE}'::timestamp
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
|
||||
--WHERE hidden IS FALSE
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -481,13 +464,13 @@ ${LIMIT_FW}</sql>
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>64</yloc>
|
||||
<xloc>928</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/>
|
||||
|
|
@ -496,18 +479,25 @@ ${LIMIT_FW}</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<formula>
|
||||
<field_name>has_appealing_violations_fz53</field_name>
|
||||
<formula_string>has_appealing_violations_fz53_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>1136</xloc>
|
||||
<yloc>64</yloc>
|
||||
<xloc>736</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
@ -516,7 +506,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/>
|
||||
|
|
@ -528,7 +518,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/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
<to>Filter rows</to>
|
||||
<from>Table input</from>
|
||||
<to>Identify last row in a 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>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>Insert / update</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>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Abort</name>
|
||||
|
|
@ -102,10 +102,32 @@
|
|||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<xloc>1488</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>Insert / update</name>
|
||||
</transform>
|
||||
</transforms>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1232</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>1328</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>1232</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -170,8 +192,8 @@ and recruitment_id = '${IDM_ID}';
|
|||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1792</xloc>
|
||||
<yloc>80</yloc>
|
||||
<xloc>1488</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -234,8 +256,8 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1520</xloc>
|
||||
<yloc>80</yloc>
|
||||
<xloc>656</xloc>
|
||||
<yloc>64</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>1536</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_appealing_violations_fz53_raw</aggregate>
|
||||
<subject>is_appealing_violations_fz53</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>80</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>880</xloc>
|
||||
<yloc>80</yloc>
|
||||
<xloc>656</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -407,7 +394,7 @@ DO UPDATE SET
|
|||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<xloc>928</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -424,7 +411,6 @@ DO UPDATE SET
|
|||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
ad.recruit_id,
|
||||
ad.create_date, -- дата создания обжалования
|
||||
|
|
@ -444,15 +430,11 @@ DO UPDATE SET
|
|||
CASE
|
||||
WHEN ad.hidden is false THEN 1
|
||||
ELSE 0
|
||||
END AS is_appealing_violations_fz53
|
||||
END AS has_appealing_violations_fz53
|
||||
FROM public.appeal_document_dto ad
|
||||
JOIN public.recruit r ON r.id = ad.recruit_id AND '${IDM_ID}' != '' -- Проверка на пустую строку
|
||||
AND (r.current_recruitment = '${IDM_ID}' or (r.current_recruitment is null and r.target_recruitment = '${IDM_ID}'))
|
||||
AND '${M_R_CR_DATE}' >= ad.create_date
|
||||
--AND '${INFRINGEMENT_DATE}'::timestamp <= coalesce(ad.updated_at, ad.created_at) -- для дельты
|
||||
--WHERE hidden IS FALSE
|
||||
|
||||
${LIMIT_FW}</sql>
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
|
|
@ -496,13 +478,13 @@ ${LIMIT_FW}</sql>
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>80</yloc>
|
||||
<xloc>928</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/>
|
||||
|
|
@ -511,18 +493,25 @@ ${LIMIT_FW}</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<formula>
|
||||
<field_name>has_appealing_violations_fz53</field_name>
|
||||
<formula_string>has_appealing_violations_fz53 == 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>80</yloc>
|
||||
<xloc>656</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
@ -531,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/>
|
||||
|
|
@ -543,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/>
|
||||
|
|
|
|||
|
|
@ -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 = 'citizen_appealing_violations_fz53_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>
|
||||
|
|
|
|||
|
|
@ -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 = 'citizen_appealing_violations_fz53_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>
|
||||
|
|
|
|||
|
|
@ -84,24 +84,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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue