Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
f9ac1dcc85
24 changed files with 3286 additions and 2504 deletions
|
|
@ -22,64 +22,69 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record </from>
|
<from>Create job execution record </from>
|
||||||
<to>Table input </to>
|
<to>child_input </to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>User defined Java expression 2</from>
|
<from>User defined Java expression 2</from>
|
||||||
<to>Update 2</to>
|
<to>child_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update 2</from>
|
<from>child_update_flags</from>
|
||||||
<to>Change job status on error </to>
|
<to>child_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error </from>
|
<from>child_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success </to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success </to>
|
<to>child_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input </from>
|
<from>child_input </from>
|
||||||
<to>Table output</to>
|
<to>child_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>child_output</from>
|
||||||
<to>Change job status on error </to>
|
<to>child_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input </from>
|
<from>child_input </from>
|
||||||
<to>Group by 2</to>
|
<to>child_group_by</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Group by 2</from>
|
<from>child_group_by</from>
|
||||||
<to>User defined Java expression 2</to>
|
<to>User defined Java expression 2</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>child_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input </from>
|
<from>child_input </from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>child_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -102,7 +107,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error </name>
|
<name>child_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -118,8 +123,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -131,6 +139,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1216</xloc>
|
<xloc>1216</xloc>
|
||||||
|
|
@ -138,7 +147,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success </name>
|
<name>child_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -151,8 +160,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -164,6 +176,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>576</xloc>
|
<xloc>576</xloc>
|
||||||
|
|
@ -245,7 +258,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success </send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>896</xloc>
|
<xloc>896</xloc>
|
||||||
|
|
@ -253,7 +266,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Group by 2</name>
|
<name>child_group_by</name>
|
||||||
<type>GroupBy</type>
|
<type>GroupBy</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -271,16 +284,19 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<aggregate>minors_count_raw</aggregate>
|
<aggregate>minors_count_raw</aggregate>
|
||||||
<subject>is_minor</subject>
|
<subject>is_minor</subject>
|
||||||
<type>SUM</type>
|
<type>SUM</type>
|
||||||
|
<valuefield/>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
<field>
|
||||||
<aggregate>has_minor_child_raw</aggregate>
|
<aggregate>has_minor_child_raw</aggregate>
|
||||||
<subject>is_minor</subject>
|
<subject>is_minor</subject>
|
||||||
<type>MAX</type>
|
<type>MAX</type>
|
||||||
|
<valuefield/>
|
||||||
</field>
|
</field>
|
||||||
<field>
|
<field>
|
||||||
<aggregate>has_dead_child_raw</aggregate>
|
<aggregate>has_dead_child_raw</aggregate>
|
||||||
<subject>is_dead</subject>
|
<subject>is_dead</subject>
|
||||||
<type>MAX</type>
|
<type>MAX</type>
|
||||||
|
<valuefield/>
|
||||||
</field>
|
</field>
|
||||||
</fields>
|
</fields>
|
||||||
<give_back_row>N</give_back_row>
|
<give_back_row>N</give_back_row>
|
||||||
|
|
@ -290,6 +306,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
<ignore_aggregate>N</ignore_aggregate>
|
<ignore_aggregate>N</ignore_aggregate>
|
||||||
|
<linenr_fieldname/>
|
||||||
<prefix>grp</prefix>
|
<prefix>grp</prefix>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
|
|
@ -298,7 +315,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input </name>
|
<name>child_input </name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -310,6 +327,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<limit/>
|
||||||
<sql>WITH children_data AS (
|
<sql>WITH children_data AS (
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
|
|
@ -372,7 +390,7 @@ FROM children_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>child_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -438,11 +456,14 @@ FROM children_data;</sql>
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>citizen_child</table>
|
<table>citizen_child</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
|
|
@ -454,7 +475,7 @@ FROM children_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update 2</name>
|
<name>child_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -539,10 +560,35 @@ FROM children_data;</sql>
|
||||||
<yloc>480</yloc>
|
<yloc>480</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>736</xloc>
|
||||||
|
<yloc>1040</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Create job execution record </source_transform>
|
<source_transform>Create job execution record </source_transform>
|
||||||
<target_transform>Change job status on error </target_transform>
|
<target_transform>child_error_job_status</target_transform>
|
||||||
<is_enabled>N</is_enabled>
|
<is_enabled>N</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename/>
|
<descriptions_valuename/>
|
||||||
|
|
@ -553,8 +599,8 @@ FROM children_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>child_output</source_transform>
|
||||||
<target_transform>Change job status on error </target_transform>
|
<target_transform>child_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -565,8 +611,8 @@ FROM children_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update 2</source_transform>
|
<source_transform>child_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error </target_transform>
|
<target_transform>child_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -21,33 +21,28 @@
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>child_insert_or_update</from>
|
||||||
<to>Change job status on error </to>
|
<to>Change job status on error </to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update </from>
|
<from>child_update_flags</from>
|
||||||
<to>Change job status on error </to>
|
<to>Change job status on error </to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>User defined Java expression</from>
|
<from>User defined Java expression</from>
|
||||||
<to>Update </to>
|
<to>child_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input 2</to>
|
<to>child_input</to>
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success </to>
|
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success </to>
|
<to>child_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -56,28 +51,38 @@
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Insert / update</to>
|
<to>child_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Group by</from>
|
<from>child_group_by</from>
|
||||||
<to>User defined Java expression</to>
|
<to>User defined Java expression</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>child_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Group by</to>
|
<to>child_group_by</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>child_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -138,7 +143,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success </name>
|
<name>child_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -151,8 +156,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -164,6 +172,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}'
|
and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'DELTA_PROCESSING';
|
and status = 'DELTA_PROCESSING';
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>784</xloc>
|
<xloc>784</xloc>
|
||||||
|
|
@ -247,7 +256,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success </send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1072</xloc>
|
<xloc>1072</xloc>
|
||||||
|
|
@ -255,7 +264,73 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Group by</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>960</xloc>
|
||||||
|
<yloc>496</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>minors_count</field_name>
|
||||||
|
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
|
||||||
|
<value_type>String</value_type>
|
||||||
|
<value_length>10</value_length>
|
||||||
|
<value_precision>-1</value_precision>
|
||||||
|
<replace_field/>
|
||||||
|
</formula>
|
||||||
|
<formula>
|
||||||
|
<field_name>has_minor_child</field_name>
|
||||||
|
<formula_string>has_minor_child_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_dead_child</field_name>
|
||||||
|
<formula_string>has_dead_child_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>784</xloc>
|
||||||
|
<yloc>0</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>child_group_by</name>
|
||||||
<type>GroupBy</type>
|
<type>GroupBy</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -300,7 +375,82 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>child_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH children_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(ch->>'id')::uuid AS child_external_id,
|
||||||
|
NULLIF(ch->>'idERN', '') AS child_id_ern,
|
||||||
|
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
|
||||||
|
WHEN 1 THEN 3
|
||||||
|
WHEN 2 THEN 4
|
||||||
|
END AS kinship_type,
|
||||||
|
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
||||||
|
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
|
||||||
|
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
ch->'svedFLBS'->'fio'->>'familiya',
|
||||||
|
ch->'svedFLBS'->'fio'->>'imya',
|
||||||
|
ch->'svedFLBS'->'fio'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
dates.birth_date,
|
||||||
|
dates.death_date,
|
||||||
|
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||||
|
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
|
||||||
|
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
|
||||||
|
CASE
|
||||||
|
WHEN dates.death_date IS NOT NULL THEN 0
|
||||||
|
WHEN dates.birth_date IS NULL THEN 0
|
||||||
|
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END AS is_minor,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
|
||||||
|
CROSS JOIN LATERAL (
|
||||||
|
SELECT
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
|
||||||
|
) AS death_date
|
||||||
|
) AS dates
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM children_data) as last_row
|
||||||
|
FROM children_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>496</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>child_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -394,82 +544,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input 2</name>
|
<name>child_update_flags</name>
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<sql>WITH children_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id AS recruit_id,
|
|
||||||
(ch->>'id')::uuid AS child_external_id,
|
|
||||||
NULLIF(ch->>'idERN', '') AS child_id_ern,
|
|
||||||
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
|
|
||||||
WHEN 1 THEN 3
|
|
||||||
WHEN 2 THEN 4
|
|
||||||
END AS kinship_type,
|
|
||||||
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
|
||||||
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
|
|
||||||
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
|
||||||
CONCAT_WS(' ',
|
|
||||||
ch->'svedFLBS'->'fio'->>'familiya',
|
|
||||||
ch->'svedFLBS'->'fio'->>'imya',
|
|
||||||
ch->'svedFLBS'->'fio'->>'otchestvo'
|
|
||||||
) AS full_name,
|
|
||||||
dates.birth_date,
|
|
||||||
dates.death_date,
|
|
||||||
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
|
|
||||||
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
|
|
||||||
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
|
|
||||||
CASE
|
|
||||||
WHEN dates.death_date IS NOT NULL THEN 0
|
|
||||||
WHEN dates.birth_date IS NULL THEN 0
|
|
||||||
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
|
|
||||||
ELSE 0
|
|
||||||
END AS is_minor,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
|
|
||||||
CROSS JOIN LATERAL (
|
|
||||||
SELECT
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
|
|
||||||
) AS death_date
|
|
||||||
) AS dates
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM children_data) as last_row
|
|
||||||
FROM children_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>496</xloc>
|
|
||||||
<yloc>224</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Update </name>
|
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -482,13 +557,11 @@ FROM children_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -513,50 +586,9 @@ FROM children_data;</sql>
|
||||||
<yloc>0</yloc>
|
<yloc>0</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</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>minors_count</field_name>
|
|
||||||
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
|
|
||||||
<value_type>String</value_type>
|
|
||||||
<value_length>10</value_length>
|
|
||||||
<value_precision>-1</value_precision>
|
|
||||||
<replace_field/>
|
|
||||||
</formula>
|
|
||||||
<formula>
|
|
||||||
<field_name>has_minor_child</field_name>
|
|
||||||
<formula_string>has_minor_child_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_dead_child</field_name>
|
|
||||||
<formula_string>has_dead_child_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>784</xloc>
|
|
||||||
<yloc>0</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>child_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error </target_transform>
|
<target_transform>Change job status on error </target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
|
|
@ -568,7 +600,7 @@ FROM children_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update </source_transform>
|
<source_transform>child_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error </target_transform>
|
<target_transform>Change job status on error </target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
|
|
|
||||||
|
|
@ -22,62 +22,67 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>User defined Java expression</from>
|
<from>User defined Java expression</from>
|
||||||
<to>Update</to>
|
<to>child_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record 2</from>
|
<from>Create job execution record 2</from>
|
||||||
<to>Table input 2</to>
|
<to>child_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>child_update_flags</from>
|
||||||
<to>Change job status on error 2</to>
|
<to>child_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>child_insert_or_update</from>
|
||||||
<to>Change job status on error 2</to>
|
<to>child_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>child_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>child_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error 2</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Insert / update</to>
|
<to>child_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Group by</from>
|
<from>child_group_by</from>
|
||||||
<to>User defined Java expression</to>
|
<to>User defined Java expression</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>child_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input 2</from>
|
<from>child_input</from>
|
||||||
<to>Group by</to>
|
<to>child_group_by</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>child_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -102,7 +107,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error 2</name>
|
<name>child_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -118,8 +123,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -131,46 +139,13 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>976</xloc>
|
<xloc>976</xloc>
|
||||||
<yloc>432</yloc>
|
<yloc>432</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
error_description = null,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>416</xloc>
|
|
||||||
<yloc>608</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record 2</name>
|
<name>Create job execution record 2</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -263,7 +238,32 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>752</xloc>
|
||||||
|
<yloc>608</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>608</xloc>
|
<xloc>608</xloc>
|
||||||
|
|
@ -271,7 +271,48 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Group by</name>
|
<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>minors_count</field_name>
|
||||||
|
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
|
||||||
|
<value_type>String</value_type>
|
||||||
|
<value_length>10</value_length>
|
||||||
|
<value_precision>-1</value_precision>
|
||||||
|
<replace_field/>
|
||||||
|
</formula>
|
||||||
|
<formula>
|
||||||
|
<field_name>has_minor_child</field_name>
|
||||||
|
<formula_string>has_minor_child_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_dead_child</field_name>
|
||||||
|
<formula_string>has_dead_child_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>608</xloc>
|
||||||
|
<yloc>176</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>child_group_by</name>
|
||||||
<type>GroupBy</type>
|
<type>GroupBy</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -316,7 +357,81 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>child_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH children_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(ch->>'id')::uuid AS child_external_id,
|
||||||
|
NULLIF(ch->>'idERN', '') AS child_id_ern,
|
||||||
|
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
|
||||||
|
WHEN 1 THEN 3
|
||||||
|
WHEN 2 THEN 4
|
||||||
|
END AS kinship_type,
|
||||||
|
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
||||||
|
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
|
||||||
|
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
ch->'svedFLBS'->'fio'->>'familiya',
|
||||||
|
ch->'svedFLBS'->'fio'->>'imya',
|
||||||
|
ch->'svedFLBS'->'fio'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
dates.birth_date,
|
||||||
|
dates.death_date,
|
||||||
|
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||||
|
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
|
||||||
|
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
|
||||||
|
CASE
|
||||||
|
WHEN dates.death_date IS NOT NULL THEN 0
|
||||||
|
WHEN dates.birth_date IS NULL THEN 0
|
||||||
|
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
|
||||||
|
ELSE 0
|
||||||
|
END AS is_minor,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
|
||||||
|
CROSS JOIN LATERAL (
|
||||||
|
SELECT
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
|
||||||
|
) AS death_date
|
||||||
|
) AS dates
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM children_data) as last_row
|
||||||
|
FROM children_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>224</xloc>
|
||||||
|
<yloc>432</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>child_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -405,86 +520,46 @@ DO UPDATE SET
|
||||||
<update_bypassed>N</update_bypassed>
|
<update_bypassed>N</update_bypassed>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>608</xloc>
|
<xloc>752</xloc>
|
||||||
<yloc>432</yloc>
|
<yloc>432</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input 2</name>
|
<name>child_success_job_status</name>
|
||||||
<type>TableInput</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
<copies>1</copies>
|
<copies>1</copies>
|
||||||
<partitioning>
|
<partitioning>
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH children_data AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
ri.recruit_id AS recruit_id,
|
<set_params>N</set_params>
|
||||||
(ch->>'id')::uuid AS child_external_id,
|
<single_statement>N</single_statement>
|
||||||
NULLIF(ch->>'idERN', '') AS child_id_ern,
|
<sql>UPDATE etl.job_execution
|
||||||
CASE NULLIF(ch->>'rodstvSvyazReb', '')::int
|
SET status = 'SUCCESS',
|
||||||
WHEN 1 THEN 3
|
error_description = null,
|
||||||
WHEN 2 THEN 4
|
execution_end_datetime = current_timestamp
|
||||||
END AS kinship_type,
|
WHERE job_name = '${JOB_NAME}'
|
||||||
ch->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
and recruitment_id = '${IDM_ID}'
|
||||||
ch->'svedFLBS'->'fio'->>'imya' AS first_name,
|
and status = 'PROCESSING';
|
||||||
ch->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
|
||||||
CONCAT_WS(' ',
|
</sql>
|
||||||
ch->'svedFLBS'->'fio'->>'familiya',
|
|
||||||
ch->'svedFLBS'->'fio'->>'imya',
|
|
||||||
ch->'svedFLBS'->'fio'->>'otchestvo'
|
|
||||||
) AS full_name,
|
|
||||||
dates.birth_date,
|
|
||||||
dates.death_date,
|
|
||||||
ch->'svedSmert'->>'nomerZapis' AS death_az_number,
|
|
||||||
ch->'svedAZRozhd'->>'nomerZapis' AS birth_az_number,
|
|
||||||
CASE WHEN dates.death_date IS NOT NULL THEN 1 ELSE 0 END AS is_dead,
|
|
||||||
CASE
|
|
||||||
WHEN dates.death_date IS NOT NULL THEN 0
|
|
||||||
WHEN dates.birth_date IS NULL THEN 0
|
|
||||||
WHEN dates.birth_date > CURRENT_DATE - INTERVAL '18 years' THEN 1
|
|
||||||
ELSE 0
|
|
||||||
END AS is_minor,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS ch
|
|
||||||
CROSS JOIN LATERAL (
|
|
||||||
SELECT
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'den', '')::int
|
|
||||||
) AS death_date
|
|
||||||
) AS dates
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM children_data) as last_row
|
|
||||||
FROM children_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>224</xloc>
|
<xloc>448</xloc>
|
||||||
<yloc>432</yloc>
|
<yloc>608</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>child_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -497,13 +572,11 @@ FROM children_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -528,51 +601,10 @@ FROM children_data;</sql>
|
||||||
<yloc>176</yloc>
|
<yloc>176</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</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>minors_count</field_name>
|
|
||||||
<formula_string>minors_count_raw == 1 ? "1" : minors_count_raw == 2 ? "2" : minors_count_raw >= 3 ? "3 и более" : "0"</formula_string>
|
|
||||||
<value_type>String</value_type>
|
|
||||||
<value_length>10</value_length>
|
|
||||||
<value_precision>-1</value_precision>
|
|
||||||
<replace_field/>
|
|
||||||
</formula>
|
|
||||||
<formula>
|
|
||||||
<field_name>has_minor_child</field_name>
|
|
||||||
<formula_string>has_minor_child_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_dead_child</field_name>
|
|
||||||
<formula_string>has_dead_child_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>608</xloc>
|
|
||||||
<yloc>176</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>child_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error 2</target_transform>
|
<target_transform>child_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -583,8 +615,8 @@ FROM children_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>child_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error 2</target_transform>
|
<target_transform>child_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,44 +22,49 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_address_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_address_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_address_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_address_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_address_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>citizen_address_output</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Table output</from>
|
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Table output</to>
|
<to>citizen_address_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_address_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_address_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>928</xloc>
|
<xloc>928</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_address_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,6 +156,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1328</xloc>
|
<xloc>1328</xloc>
|
||||||
|
|
@ -225,7 +238,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1328</xloc>
|
<xloc>1328</xloc>
|
||||||
|
|
@ -233,7 +246,32 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1328</xloc>
|
||||||
|
<yloc>208</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_address_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -245,6 +283,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<limit/>
|
||||||
<sql>WITH address_data AS (
|
<sql>WITH address_data AS (
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id::uuid,
|
ri.recruit_id::uuid,
|
||||||
|
|
@ -283,7 +322,7 @@ FROM address_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>citizen_address_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -345,11 +384,14 @@ FROM address_data;</sql>
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>citizen_address</table>
|
<table>citizen_address</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
|
|
@ -362,8 +404,8 @@ FROM address_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>citizen_address_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_address_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,44 +22,49 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_address_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_address_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_address_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_address_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>citizen_address_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Insert / update</to>
|
<to>citizen_address_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_address_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_address_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_address_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>752</xloc>
|
<xloc>752</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_address_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,6 +156,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'DELTA_PROCESSING';
|
and status = 'DELTA_PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
|
|
@ -228,7 +241,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
|
|
@ -236,7 +249,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>citizen_address_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -253,6 +266,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
|
<name2/>
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen_address</table>
|
<table>citizen_address</table>
|
||||||
|
|
@ -320,7 +334,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>citizen_address_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -371,10 +385,35 @@ FROM address_data;</sql>
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1120</xloc>
|
||||||
|
<yloc>112</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_address_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_address_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,44 +22,49 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_address_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_address_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_address_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_address_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>citizen_address_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Insert / update</to>
|
<to>citizen_address_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_address_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_address_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_address_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_address_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>768</xloc>
|
<xloc>768</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_address_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,6 +156,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
|
|
@ -242,7 +255,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
|
|
@ -250,7 +263,82 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1120</xloc>
|
||||||
|
<yloc>144</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_address_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH address_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id::uuid,
|
||||||
|
ri.ctid as source_ctid,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateStart')::date END) AS residence_registration_date,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateEnd')::date END) AS residence_deregistration_date,
|
||||||
|
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS place_stay_address,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateStart')::date END) AS place_stay_registration_date,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateEnd')::date END) AS place_stay_deregistration_date,
|
||||||
|
CASE
|
||||||
|
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '1' THEN 'В жилом помещении, не являющимся местом жительства физического лица'
|
||||||
|
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '2' THEN 'В учреждении уголовно-исполнительной системы'
|
||||||
|
END AS place_stay_registration_type,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN addr->>'reg' END) AS factual_address,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateStart')::date END) AS factual_info_received_date,
|
||||||
|
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateEnd')::date END) AS factual_info_expiry_date
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL jsonb_array_elements(ri.addresses) AS addr
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
GROUP BY ri.recruit_id, ri.ctid
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM address_data) as last_row
|
||||||
|
FROM address_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>480</xloc>
|
||||||
|
<yloc>272</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_address_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -333,60 +421,10 @@ DO UPDATE SET
|
||||||
<yloc>272</yloc>
|
<yloc>272</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<sql>WITH address_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id::uuid,
|
|
||||||
ri.ctid as source_ctid,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateStart')::date END) AS residence_registration_date,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN (addr->>'regDateEnd')::date END) AS residence_deregistration_date,
|
|
||||||
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS place_stay_address,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateStart')::date END) AS place_stay_registration_date,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN (addr->>'regDateEnd')::date END) AS place_stay_deregistration_date,
|
|
||||||
CASE
|
|
||||||
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '1' THEN 'В жилом помещении, не являющимся местом жительства физического лица'
|
|
||||||
WHEN MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) = '2' THEN 'В учреждении уголовно-исполнительной системы'
|
|
||||||
END AS place_stay_registration_type,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN addr->>'reg' END) AS factual_address,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateStart')::date END) AS factual_info_received_date,
|
|
||||||
MAX(CASE WHEN addr->>'type' = 'residentialAddress' THEN (addr->>'regDateEnd')::date END) AS factual_info_expiry_date
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.addresses) AS addr
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
GROUP BY ri.recruit_id, ri.ctid
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM address_data) as last_row
|
|
||||||
FROM address_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>480</xloc>
|
|
||||||
<yloc>272</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_address_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_address_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -21,60 +21,65 @@
|
||||||
</notepads>
|
</notepads>
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Table output</to>
|
<to>citizen_guardianship_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_guardianship_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_guardianship_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>update_guardianship_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_guardianship_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success 2</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success 2</to>
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Sort rows</to>
|
<to>citizen_guardianship_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>citizen_guardianship_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>update_guardianship_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_guardianship_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,75 +101,6 @@
|
||||||
<yloc>544</yloc>
|
<yloc>544</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1280</xloc>
|
|
||||||
<yloc>320</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success 2</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>816</xloc>
|
|
||||||
<yloc>720</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -240,7 +176,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success 2</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>816</xloc>
|
<xloc>816</xloc>
|
||||||
|
|
@ -248,8 +184,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>Unique rows</name>
|
||||||
<type>SortRows</type>
|
<type>Unique</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -258,31 +194,62 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<count_rows>N</count_rows>
|
||||||
<prefix>out</prefix>
|
|
||||||
<sort_size>100000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
<fields>
|
||||||
<field>
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
</field>
|
||||||
</fields>
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>496</xloc>
|
<xloc>816</xloc>
|
||||||
<yloc>0</yloc>
|
<yloc>576</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>citizen_guardianship_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</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>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<update_field/>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1280</xloc>
|
||||||
|
<yloc>320</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -335,7 +302,7 @@ FROM guardianship_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>citizen_guardianship_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -405,7 +372,74 @@ FROM guardianship_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>citizen_guardianship_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>496</xloc>
|
||||||
|
<yloc>0</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'SUCCESS',
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>816</xloc>
|
||||||
|
<yloc>720</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>update_guardianship_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -418,19 +452,16 @@ FROM guardianship_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_guardian</field>
|
<field>is_guardian</field>
|
||||||
<name>is_guardian</name>
|
<name>is_guardian</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -449,8 +480,8 @@ FROM guardianship_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>citizen_guardianship_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -461,8 +492,8 @@ FROM guardianship_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_guardianship_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_guardianship_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_guardianship_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Insert / update</to>
|
<to>citizen_guardianship_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>update_guardianship_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_guardianship_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Table input</from>
|
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Sort rows</to>
|
<to>citizen_guardianship_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>citizen_guardianship_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>update_guardianship_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_guardianship_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,78 +101,6 @@
|
||||||
<yloc>480</yloc>
|
<yloc>480</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
<argument>
|
|
||||||
<name>error_code</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1200</xloc>
|
|
||||||
<yloc>224</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_SUCCESS',
|
|
||||||
error_description = null,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'DELTA_PROCESSING';
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>880</xloc>
|
|
||||||
<yloc>624</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -245,7 +178,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>880</xloc>
|
<xloc>880</xloc>
|
||||||
|
|
@ -253,7 +186,125 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>880</xloc>
|
||||||
|
<yloc>496</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
<argument>
|
||||||
|
<name>error_code</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'DELTA_ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1200</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH guardianship_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(ch->>'id')::uuid AS guardianship_external_id,
|
||||||
|
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
|
||||||
|
ch->'fioOpek'->>'familiya' AS last_name,
|
||||||
|
ch->'fioOpek'->>'imya' AS first_name,
|
||||||
|
ch->'fioOpek'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
ch->'fioOpek'->>'familiya',
|
||||||
|
ch->'fioOpek'->>'imya',
|
||||||
|
ch->'fioOpek'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
||||||
|
true AS is_guardian,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
||||||
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM guardianship_data) as last_row
|
||||||
|
FROM guardianship_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>544</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -332,7 +383,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>citizen_guardianship_sort_rows</name>
|
||||||
<type>SortRows</type>
|
<type>SortRows</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -366,61 +417,40 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>citizen_guardianship_success_job_status</name>
|
||||||
<type>TableInput</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
<copies>1</copies>
|
<copies>1</copies>
|
||||||
<partitioning>
|
<partitioning>
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH guardianship_data AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
ri.recruit_id AS recruit_id,
|
<set_params>N</set_params>
|
||||||
(ch->>'id')::uuid AS guardianship_external_id,
|
<single_statement>N</single_statement>
|
||||||
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
|
<sql>UPDATE etl.job_execution
|
||||||
ch->'fioOpek'->>'familiya' AS last_name,
|
SET status = 'DELTA_SUCCESS',
|
||||||
ch->'fioOpek'->>'imya' AS first_name,
|
error_description = null,
|
||||||
ch->'fioOpek'->>'otchestvo' AS middle_name,
|
execution_end_datetime = current_timestamp
|
||||||
CONCAT_WS(' ',
|
WHERE job_name = '${JOB_NAME}'
|
||||||
ch->'fioOpek'->>'familiya',
|
and recruitment_id = '${IDM_ID}'
|
||||||
ch->'fioOpek'->>'imya',
|
and status = 'DELTA_PROCESSING';
|
||||||
ch->'fioOpek'->>'otchestvo'
|
</sql>
|
||||||
) AS full_name,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
|
||||||
true AS is_guardian,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM guardianship_data) as last_row
|
|
||||||
FROM guardianship_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>544</xloc>
|
<xloc>880</xloc>
|
||||||
<yloc>224</yloc>
|
<yloc>624</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>update_guardianship_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -433,19 +463,16 @@ FROM guardianship_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_guardian</field>
|
<field>is_guardian</field>
|
||||||
<name>is_guardian</name>
|
<name>is_guardian</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -464,8 +491,8 @@ FROM guardianship_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_guardianship_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -476,8 +503,8 @@ FROM guardianship_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_guardianship_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_guardianship_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Insert / update</to>
|
<to>citizen_guardianship_insert_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_guardianship_insert_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>update_guardianship_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_guardianship_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_guardianship_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>citizen_guardianship_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>update_guardianship_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Sort rows</to>
|
<to>citizen_guardianship_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_guardianship_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_guardianship_insert_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_guardianship_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,79 +101,6 @@
|
||||||
<yloc>384</yloc>
|
<yloc>384</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
<argument>
|
|
||||||
<name>error_code</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1232</xloc>
|
|
||||||
<yloc>208</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>704</xloc>
|
|
||||||
<yloc>624</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -261,7 +193,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>704</xloc>
|
<xloc>704</xloc>
|
||||||
|
|
@ -269,7 +201,159 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>citizen_guardianship_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>416</xloc>
|
||||||
|
<yloc>48</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>704</xloc>
|
||||||
|
<yloc>496</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
<argument>
|
||||||
|
<name>error_code</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1232</xloc>
|
||||||
|
<yloc>208</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH guardianship_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(ch->>'id')::uuid AS guardianship_external_id,
|
||||||
|
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
|
||||||
|
ch->'fioOpek'->>'familiya' AS last_name,
|
||||||
|
ch->'fioOpek'->>'imya' AS first_name,
|
||||||
|
ch->'fioOpek'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
ch->'fioOpek'->>'familiya',
|
||||||
|
ch->'fioOpek'->>'imya',
|
||||||
|
ch->'fioOpek'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
||||||
|
true AS is_guardian,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM guardianship_data) as last_row
|
||||||
|
FROM guardianship_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>416</xloc>
|
||||||
|
<yloc>208</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_guardianship_insert_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -348,8 +432,8 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>citizen_guardianship_success_job_status</name>
|
||||||
<type>SortRows</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -358,84 +442,30 @@ DO UPDATE SET
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<arguments>
|
||||||
<prefix>out</prefix>
|
</arguments>
|
||||||
<sort_size>100000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>416</xloc>
|
|
||||||
<yloc>48</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH guardianship_data AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
ri.recruit_id AS recruit_id,
|
<set_params>N</set_params>
|
||||||
(ch->>'id')::uuid AS guardianship_external_id,
|
<single_statement>N</single_statement>
|
||||||
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
|
<sql>UPDATE etl.job_execution
|
||||||
ch->'fioOpek'->>'familiya' AS last_name,
|
SET status = 'SUCCESS',
|
||||||
ch->'fioOpek'->>'imya' AS first_name,
|
execution_end_datetime = current_timestamp
|
||||||
ch->'fioOpek'->>'otchestvo' AS middle_name,
|
WHERE job_name = '${JOB_NAME}'
|
||||||
CONCAT_WS(' ',
|
and recruitment_id = '${IDM_ID}'
|
||||||
ch->'fioOpek'->>'familiya',
|
and status = 'PROCESSING';
|
||||||
ch->'fioOpek'->>'imya',
|
|
||||||
ch->'fioOpek'->>'otchestvo'
|
</sql>
|
||||||
) AS full_name,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(ch->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
REGEXP_REPLACE(ch->>'snils', '[-\s]', '', 'g') AS snils,
|
|
||||||
true AS is_guardian,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen c ON c.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') AS ch
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM guardianship_data) as last_row
|
|
||||||
FROM guardianship_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>416</xloc>
|
<xloc>704</xloc>
|
||||||
<yloc>208</yloc>
|
<yloc>624</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>update_guardianship_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -448,19 +478,16 @@ FROM guardianship_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_guardian</field>
|
<field>is_guardian</field>
|
||||||
<name>is_guardian</name>
|
<name>is_guardian</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -479,8 +506,8 @@ FROM guardianship_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_guardianship_insert_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -491,8 +518,8 @@ FROM guardianship_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_guardianship_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_guardianship_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,54 +22,59 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_information_search_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_information_search_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_information_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_information_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Table output</to>
|
<to>citizen_information_search_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>update_citizen_information_search_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Update</to>
|
<to>update_citizen_information_search_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_information_search_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_information_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -92,7 +97,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_information_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -108,8 +113,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -121,6 +129,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>720</xloc>
|
<xloc>720</xloc>
|
||||||
|
|
@ -128,7 +137,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_information_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -141,8 +150,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -154,6 +166,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1104</xloc>
|
<xloc>1104</xloc>
|
||||||
|
|
@ -235,7 +248,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1104</xloc>
|
<xloc>1104</xloc>
|
||||||
|
|
@ -243,7 +256,32 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1104</xloc>
|
||||||
|
<yloc>240</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_information_search_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -284,7 +322,7 @@ FROM wanted_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>citizen_information_search_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -330,11 +368,14 @@ FROM wanted_data;</sql>
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>citizen_information_search</table>
|
<table>citizen_information_search</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
|
|
@ -346,7 +387,7 @@ FROM wanted_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>update_citizen_information_search_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -359,19 +400,16 @@ FROM wanted_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_wanted</field>
|
<field>is_wanted</field>
|
||||||
<name>is_wanted</name>
|
<name>is_wanted</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -390,8 +428,8 @@ FROM wanted_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>citizen_information_search_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -402,8 +440,8 @@ FROM wanted_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_citizen_information_search_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_decription</descriptions_valuename>
|
<descriptions_valuename>error_decription</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,52 +22,57 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_information_search_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_information_search_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_information_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>citizen_information_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Insert / update</to>
|
<to>citizen_information_search_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>update_citizen_information_search_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_information_search_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Update</to>
|
<to>update_citizen_information_search_flags</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_information_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -92,7 +97,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_information_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -108,8 +113,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -121,6 +129,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>752</xloc>
|
<xloc>752</xloc>
|
||||||
|
|
@ -128,7 +137,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_information_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -141,8 +150,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -154,6 +166,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'DELTA_PROCESSING';
|
and status = 'DELTA_PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1008</xloc>
|
<xloc>1008</xloc>
|
||||||
|
|
@ -238,7 +251,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1008</xloc>
|
<xloc>1008</xloc>
|
||||||
|
|
@ -246,7 +259,74 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1008</xloc>
|
||||||
|
<yloc>112</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_information_search_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH wanted_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrg' AS name_organ_start_search,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'ugolovZakon' AS article_criminal_code,
|
||||||
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
||||||
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
||||||
|
true AS is_wanted,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
WHERE '${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM wanted_data) as last_row
|
||||||
|
FROM wanted_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>400</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_information_search_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -310,49 +390,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>update_citizen_information_search_flags</name>
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<sql>WITH wanted_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrg' AS name_organ_start_search,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'ugolovZakon' AS article_criminal_code,
|
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
|
||||||
true AS is_wanted,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
|
||||||
WHERE '${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM wanted_data) as last_row
|
|
||||||
FROM wanted_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>400</xloc>
|
|
||||||
<yloc>224</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Update</name>
|
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -365,19 +403,16 @@ FROM wanted_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_wanted</field>
|
<field>is_wanted</field>
|
||||||
<name>is_wanted</name>
|
<name>is_wanted</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -396,8 +431,8 @@ FROM wanted_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_information_search_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -408,8 +443,8 @@ FROM wanted_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_citizen_information_search_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,54 +22,59 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>citizen_information_search_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>citizen_information_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_information_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>update_citizen_information_search_flags</from>
|
||||||
<to>Change job status on success</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>citizen_information_search_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Change job status on error</to>
|
<to>citizen_information_search_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_insert_or_update</from>
|
||||||
<to>Insert / update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Insert / update</from>
|
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Update</to>
|
<to>update_citizen_information_search_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>citizen_information_search_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>citizen_information_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -92,7 +97,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>citizen_information_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -108,8 +113,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -121,6 +129,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>688</xloc>
|
<xloc>688</xloc>
|
||||||
|
|
@ -128,7 +137,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>citizen_information_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -141,8 +150,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -154,6 +166,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1024</xloc>
|
<xloc>1024</xloc>
|
||||||
|
|
@ -252,7 +265,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1024</xloc>
|
<xloc>1024</xloc>
|
||||||
|
|
@ -260,7 +273,73 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1024</xloc>
|
||||||
|
<yloc>160</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_information_search_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH wanted_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrg' AS name_organ_start_search,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'ugolovZakon' AS article_criminal_code,
|
||||||
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
||||||
|
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
||||||
|
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
||||||
|
true AS is_wanted,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
WHERE '${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM wanted_data) as last_row
|
||||||
|
FROM wanted_data;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>416</xloc>
|
||||||
|
<yloc>272</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>citizen_information_search_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -324,48 +403,7 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>update_citizen_information_search_flags</name>
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<sql>WITH wanted_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrg' AS name_organ_start_search,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'ugolovZakon' AS article_criminal_code,
|
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataNachRozisk', 'YYYY-MM-DD') AS wanted_start_date,
|
|
||||||
TO_DATE(ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'dataPrekrRozysk', 'YYYY-MM-DD') AS wanted_end_date,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'osnovPrekrRozysk' AS grounds_stopping_search,
|
|
||||||
ri.info -> 'svedFL' -> 'extend' -> 'rozysk' ->> 'naimOrgPrekrRozysk' AS name_organ_end_search,
|
|
||||||
true AS is_wanted,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
|
||||||
WHERE '${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND jsonb_typeof(ri.info->'svedFL'->'extend'->'rozysk') = 'object'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM wanted_data) as last_row
|
|
||||||
FROM wanted_data;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>416</xloc>
|
|
||||||
<yloc>272</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Update</name>
|
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -378,19 +416,16 @@ FROM wanted_data;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>is_wanted</field>
|
<field>is_wanted</field>
|
||||||
<name>is_wanted</name>
|
<name>is_wanted</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -409,8 +444,8 @@ FROM wanted_data;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>citizen_information_search_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -421,8 +456,8 @@ FROM wanted_data;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>update_citizen_information_search_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>citizen_information_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>spouse_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_spouse_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>spouse_detect_empty_stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>spouse_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>spouse_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output 2</from>
|
<from>marriage_registry_output </from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Table output</to>
|
<to>citizen_spouse_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Sort rows</to>
|
<to>spouse_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>spouse_sort_rows</from>
|
||||||
<to>Table output 2</to>
|
<to>marriage_registry_output </to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>spouse_detect_empty_stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>citizen_spouse_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>spouse_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -97,7 +102,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>spouse_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -113,8 +118,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -126,14 +134,15 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>736</xloc>
|
<xloc>800</xloc>
|
||||||
<yloc>192</yloc>
|
<yloc>192</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>spouse_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -146,8 +155,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -159,10 +171,11 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>576</xloc>
|
<xloc>592</xloc>
|
||||||
<yloc>912</yloc>
|
<yloc>720</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -195,7 +208,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Detect empty stream</name>
|
<name>spouse_detect_empty_stream</name>
|
||||||
<type>DetectEmptyStream</type>
|
<type>DetectEmptyStream</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -208,7 +221,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
<yloc>912</yloc>
|
<yloc>720</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -240,15 +253,15 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>736</xloc>
|
<xloc>800</xloc>
|
||||||
<yloc>912</yloc>
|
<yloc>912</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>spouse_sort_rows</name>
|
||||||
<type>SortRows</type>
|
<type>SortRows</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -260,7 +273,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<directory>${java.io.tmpdir}</directory>
|
||||||
<prefix>out</prefix>
|
<prefix>out</prefix>
|
||||||
<sort_size>1000000</sort_size>
|
<sort_size>100000</sort_size>
|
||||||
<free_memory/>
|
<free_memory/>
|
||||||
<compress>N</compress>
|
<compress>N</compress>
|
||||||
<compress_variable/>
|
<compress_variable/>
|
||||||
|
|
@ -282,7 +295,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>spouse_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -294,6 +307,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<limit/>
|
||||||
<sql>WITH spouse_data AS (
|
<sql>WITH spouse_data AS (
|
||||||
SELECT
|
SELECT
|
||||||
ri.recruit_id AS recruit_id,
|
ri.recruit_id AS recruit_id,
|
||||||
|
|
@ -348,7 +362,7 @@ FROM spouse_data;
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>citizen_spouse_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -414,23 +428,26 @@ FROM spouse_data;
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>citizen_spouse</table>
|
<table>citizen_spouse</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
<use_batch>Y</use_batch>
|
<use_batch>Y</use_batch>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>736</xloc>
|
<xloc>800</xloc>
|
||||||
<yloc>576</yloc>
|
<yloc>576</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output 2</name>
|
<name>marriage_registry_output </name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -468,11 +485,14 @@ FROM spouse_data;
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>marriage_registry</table>
|
<table>marriage_registry</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
|
|
@ -483,10 +503,35 @@ FROM spouse_data;
|
||||||
<yloc>192</yloc>
|
<yloc>192</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>592</xloc>
|
||||||
|
<yloc>912</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>citizen_spouse_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -497,8 +542,8 @@ FROM spouse_data;
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output 2</source_transform>
|
<source_transform>marriage_registry_output </source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,57 +22,62 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>spouse_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>spouse_update_or_insert</from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>spouse_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>spouse_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update 2</from>
|
<from>marriage_registry_update_or_insert</from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Insert / update</to>
|
<to>spouse_update_or_insert</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Sort rows</to>
|
<to>Sort rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>spouse_update_or_insert</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>Sort rows</from>
|
||||||
<to>Insert / update 2</to>
|
<to>marriage_registry_update_or_insert</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>spouse_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -96,78 +101,6 @@
|
||||||
<yloc>176</yloc>
|
<yloc>176</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
<argument>
|
|
||||||
<name>error_code</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>768</xloc>
|
|
||||||
<yloc>176</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_SUCCESS',
|
|
||||||
error_description = null,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'DELTA_PROCESSING';
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1072</xloc>
|
|
||||||
<yloc>688</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -245,7 +178,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1072</xloc>
|
<xloc>1072</xloc>
|
||||||
|
|
@ -253,7 +186,259 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>496</xloc>
|
||||||
|
<yloc>320</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1072</xloc>
|
||||||
|
<yloc>592</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>marriage_registry_update_or_insert</name>
|
||||||
|
<type>InsertUpdate</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<commit>10000</commit>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<lookup>
|
||||||
|
<key>
|
||||||
|
<condition>=</condition>
|
||||||
|
<field>recruit_id</field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</key>
|
||||||
|
<schema>ervu_dashboard</schema>
|
||||||
|
<table>marriage_registry</table>
|
||||||
|
<value>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<rename>recruit_id</rename>
|
||||||
|
<update>N</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>marriage_az_number</name>
|
||||||
|
<rename>marriage_az_number</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>marriage_date</name>
|
||||||
|
<rename>marriage_date</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>divorce_date</name>
|
||||||
|
<rename>divorce_date</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>divorce_az_number</name>
|
||||||
|
<rename>divorce_az_number</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
</lookup>
|
||||||
|
<update_bypassed>N</update_bypassed>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>496</xloc>
|
||||||
|
<yloc>176</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
<argument>
|
||||||
|
<name>error_code</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'DELTA_ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>768</xloc>
|
||||||
|
<yloc>176</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH spouse_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(supr->>'id')::uuid AS spouse_external_id,
|
||||||
|
NULLIF(supr->>'idERN', '') AS spouse_id_ern,
|
||||||
|
NULLIF(supr->>'rodstvSvyazSuprug', '')::int AS kinship_type,
|
||||||
|
supr->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
||||||
|
supr->'svedFLBS'->'fio'->>'imya' AS first_name,
|
||||||
|
supr->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
supr->'svedFLBS'->'fio'->>'familiya',
|
||||||
|
supr->'svedFLBS'->'fio'->>'imya',
|
||||||
|
supr->'svedFLBS'->'fio'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
||||||
|
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||||
|
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
||||||
|
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend')::date AS marriage_date,
|
||||||
|
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
||||||
|
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend')::date AS divorce_date,
|
||||||
|
CASE
|
||||||
|
WHEN ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1' THEN true
|
||||||
|
ELSE false
|
||||||
|
END AS information_excluded,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL (
|
||||||
|
SELECT supri
|
||||||
|
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
||||||
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
||||||
|
) AS supr(supr)
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND ri.update_date >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM spouse_data) as last_row
|
||||||
|
FROM spouse_data;
|
||||||
|
</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>496</xloc>
|
||||||
|
<yloc>496</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'DELTA_SUCCESS',
|
||||||
|
error_description = null,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'DELTA_PROCESSING';
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1072</xloc>
|
||||||
|
<yloc>688</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_update_or_insert</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -346,166 +531,10 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<yloc>496</yloc>
|
<yloc>496</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Insert / update 2</name>
|
|
||||||
<type>InsertUpdate</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<commit>10000</commit>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<lookup>
|
|
||||||
<key>
|
|
||||||
<condition>=</condition>
|
|
||||||
<field>recruit_id</field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</key>
|
|
||||||
<schema>ervu_dashboard</schema>
|
|
||||||
<table>marriage_registry</table>
|
|
||||||
<value>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<rename>recruit_id</rename>
|
|
||||||
<update>N</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>marriage_az_number</name>
|
|
||||||
<rename>marriage_az_number</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>marriage_date</name>
|
|
||||||
<rename>marriage_date</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>divorce_date</name>
|
|
||||||
<rename>divorce_date</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>divorce_az_number</name>
|
|
||||||
<rename>divorce_az_number</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
</lookup>
|
|
||||||
<update_bypassed>N</update_bypassed>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>496</xloc>
|
|
||||||
<yloc>176</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Sort rows</name>
|
|
||||||
<type>SortRows</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<prefix>out</prefix>
|
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>496</xloc>
|
|
||||||
<yloc>320</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<limit/>
|
|
||||||
<sql>WITH spouse_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id AS recruit_id,
|
|
||||||
(supr->>'id')::uuid AS spouse_external_id,
|
|
||||||
NULLIF(supr->>'idERN', '') AS spouse_id_ern,
|
|
||||||
NULLIF(supr->>'rodstvSvyazSuprug', '')::int AS kinship_type,
|
|
||||||
supr->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
|
||||||
supr->'svedFLBS'->'fio'->>'imya' AS first_name,
|
|
||||||
supr->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
|
||||||
CONCAT_WS(' ',
|
|
||||||
supr->'svedFLBS'->'fio'->>'familiya',
|
|
||||||
supr->'svedFLBS'->'fio'->>'imya',
|
|
||||||
supr->'svedFLBS'->'fio'->>'otchestvo'
|
|
||||||
) AS full_name,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
|
||||||
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
|
||||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
|
||||||
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend')::date AS marriage_date,
|
|
||||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
|
||||||
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend')::date AS divorce_date,
|
|
||||||
CASE
|
|
||||||
WHEN ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1' THEN true
|
|
||||||
ELSE false
|
|
||||||
END AS information_excluded,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL (
|
|
||||||
SELECT supri
|
|
||||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
|
||||||
) AS supr(supr)
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
AND ri.update_date >= '${M_R_UP_DATE}'::timestamp
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM spouse_data) as last_row
|
|
||||||
FROM spouse_data;
|
|
||||||
</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>496</xloc>
|
|
||||||
<yloc>496</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>marriage_registry_update_or_insert</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -516,8 +545,8 @@ FROM spouse_data;
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update 2</source_transform>
|
<source_transform>spouse_update_or_insert</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -49,59 +49,64 @@ M_R_CR_DATE
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>spouse_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>spouse_update_or_insert</from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>spouse_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>spouse_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update 2</from>
|
<from>marriage_registry_update_or_insert</from>
|
||||||
<to>Change job status on error</to>
|
<to>spouse_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Insert / update</to>
|
<to>spouse_update_or_insert</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Sort rows</to>
|
<to>Sort rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>Sort rows</from>
|
||||||
<to>Insert / update 2</to>
|
<to>marriage_registry_update_or_insert</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>spouse_update_or_insert</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>spouse_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>spouse_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -124,7 +129,7 @@ M_R_CR_DATE
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>spouse_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -143,8 +148,11 @@ M_R_CR_DATE
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -156,47 +164,13 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>704</xloc>
|
<xloc>704</xloc>
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
error_description = null,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>944</xloc>
|
|
||||||
<yloc>752</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -257,7 +231,7 @@ DO UPDATE SET
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>352</xloc>
|
<xloc>352</xloc>
|
||||||
<yloc>752</yloc>
|
<yloc>784</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -289,7 +263,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>944</xloc>
|
<xloc>944</xloc>
|
||||||
|
|
@ -297,7 +271,221 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>Sort rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>352</xloc>
|
||||||
|
<yloc>368</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>944</xloc>
|
||||||
|
<yloc>784</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>marriage_registry_update_or_insert</name>
|
||||||
|
<type>InsertUpdate</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<commit>10000</commit>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<lookup>
|
||||||
|
<key>
|
||||||
|
<condition>=</condition>
|
||||||
|
<field>recruit_id</field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</key>
|
||||||
|
<schema>ervu_dashboard</schema>
|
||||||
|
<table>marriage_registry</table>
|
||||||
|
<value>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<rename>recruit_id</rename>
|
||||||
|
<update>N</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>marriage_az_number</name>
|
||||||
|
<rename>marriage_az_number</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>marriage_date</name>
|
||||||
|
<rename>marriage_date</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>divorce_date</name>
|
||||||
|
<rename>divorce_date</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
<value>
|
||||||
|
<name>divorce_az_number</name>
|
||||||
|
<rename>divorce_az_number</rename>
|
||||||
|
<update>Y</update>
|
||||||
|
</value>
|
||||||
|
</lookup>
|
||||||
|
<update_bypassed>N</update_bypassed>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>352</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH spouse_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id AS recruit_id,
|
||||||
|
(supr->>'id')::uuid AS spouse_external_id,
|
||||||
|
NULLIF(supr->>'idERN', '') AS spouse_id_ern,
|
||||||
|
NULLIF(supr->>'rodstvSvyazSuprug', '')::int AS kinship_type,
|
||||||
|
supr->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
||||||
|
supr->'svedFLBS'->'fio'->>'imya' AS first_name,
|
||||||
|
supr->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
||||||
|
CONCAT_WS(' ',
|
||||||
|
supr->'svedFLBS'->'fio'->>'familiya',
|
||||||
|
supr->'svedFLBS'->'fio'->>'imya',
|
||||||
|
supr->'svedFLBS'->'fio'->>'otchestvo'
|
||||||
|
) AS full_name,
|
||||||
|
MAKE_DATE(
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
||||||
|
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
||||||
|
) AS birth_date,
|
||||||
|
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
||||||
|
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||||
|
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
||||||
|
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend')::date AS marriage_date,
|
||||||
|
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
||||||
|
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend')::date AS divorce_date,
|
||||||
|
CASE
|
||||||
|
WHEN ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1' THEN true
|
||||||
|
ELSE false
|
||||||
|
END AS information_excluded,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
CROSS JOIN LATERAL (
|
||||||
|
SELECT supri
|
||||||
|
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
||||||
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
||||||
|
) AS supr(supr)
|
||||||
|
WHERE
|
||||||
|
'${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
*,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM spouse_data) as last_row
|
||||||
|
FROM spouse_data;
|
||||||
|
</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>352</xloc>
|
||||||
|
<yloc>528</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'SUCCESS',
|
||||||
|
error_description = null,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>672</xloc>
|
||||||
|
<yloc>784</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>spouse_update_or_insert</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -390,165 +578,10 @@ DO UPDATE SET
|
||||||
<yloc>528</yloc>
|
<yloc>528</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Insert / update 2</name>
|
|
||||||
<type>InsertUpdate</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<commit>10000</commit>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<lookup>
|
|
||||||
<key>
|
|
||||||
<condition>=</condition>
|
|
||||||
<field>recruit_id</field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
</key>
|
|
||||||
<schema>ervu_dashboard</schema>
|
|
||||||
<table>marriage_registry</table>
|
|
||||||
<value>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<rename>recruit_id</rename>
|
|
||||||
<update>N</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>marriage_az_number</name>
|
|
||||||
<rename>marriage_az_number</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>marriage_date</name>
|
|
||||||
<rename>marriage_date</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>divorce_date</name>
|
|
||||||
<rename>divorce_date</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
<value>
|
|
||||||
<name>divorce_az_number</name>
|
|
||||||
<rename>divorce_az_number</rename>
|
|
||||||
<update>Y</update>
|
|
||||||
</value>
|
|
||||||
</lookup>
|
|
||||||
<update_bypassed>N</update_bypassed>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>352</xloc>
|
|
||||||
<yloc>224</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Sort rows</name>
|
|
||||||
<type>SortRows</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<directory>${java.io.tmpdir}</directory>
|
|
||||||
<prefix>out</prefix>
|
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>352</xloc>
|
|
||||||
<yloc>368</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>N</execute_each_row>
|
|
||||||
<limit/>
|
|
||||||
<sql>WITH spouse_data AS (
|
|
||||||
SELECT
|
|
||||||
ri.recruit_id AS recruit_id,
|
|
||||||
(supr->>'id')::uuid AS spouse_external_id,
|
|
||||||
NULLIF(supr->>'idERN', '') AS spouse_id_ern,
|
|
||||||
NULLIF(supr->>'rodstvSvyazSuprug', '')::int AS kinship_type,
|
|
||||||
supr->'svedFLBS'->'fio'->>'familiya' AS last_name,
|
|
||||||
supr->'svedFLBS'->'fio'->>'imya' AS first_name,
|
|
||||||
supr->'svedFLBS'->'fio'->>'otchestvo' AS middle_name,
|
|
||||||
CONCAT_WS(' ',
|
|
||||||
supr->'svedFLBS'->'fio'->>'familiya',
|
|
||||||
supr->'svedFLBS'->'fio'->>'imya',
|
|
||||||
supr->'svedFLBS'->'fio'->>'otchestvo'
|
|
||||||
) AS full_name,
|
|
||||||
MAKE_DATE(
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz', '')::int,
|
|
||||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den', '')::int
|
|
||||||
) AS birth_date,
|
|
||||||
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
|
||||||
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
|
||||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
|
||||||
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend')::date AS marriage_date,
|
|
||||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
|
||||||
(ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend')::date AS divorce_date,
|
|
||||||
CASE
|
|
||||||
WHEN ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1' THEN true
|
|
||||||
ELSE false
|
|
||||||
END AS information_excluded,
|
|
||||||
ri.ctid as source_ctid
|
|
||||||
FROM ervu_dashboard.recruits_info ri
|
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
|
||||||
CROSS JOIN LATERAL (
|
|
||||||
SELECT supri
|
|
||||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
|
||||||
) AS supr(supr)
|
|
||||||
WHERE
|
|
||||||
'${IDM_ID}' != ''
|
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
|
||||||
)
|
|
||||||
SELECT
|
|
||||||
*,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM spouse_data) as last_row
|
|
||||||
FROM spouse_data;
|
|
||||||
</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>352</xloc>
|
|
||||||
<yloc>528</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>marriage_registry_update_or_insert</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -559,8 +592,8 @@ FROM spouse_data;
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update 2</source_transform>
|
<source_transform>spouse_update_or_insert</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>spouse_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,44 +22,49 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>passport_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>passport_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>passport_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>passport_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>passport_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>passport_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Table output</to>
|
<to>passport_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>passport_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>passport_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>896</xloc>
|
<xloc>896</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>passport_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,10 +156,11 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1264</xloc>
|
<xloc>1264</xloc>
|
||||||
<yloc>176</yloc>
|
<yloc>112</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -193,7 +206,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>496</xloc>
|
<xloc>496</xloc>
|
||||||
<yloc>176</yloc>
|
<yloc>112</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -225,7 +238,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1264</xloc>
|
<xloc>1264</xloc>
|
||||||
|
|
@ -233,7 +246,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>passport_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -287,7 +300,7 @@ FROM passport_data;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>passport_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -333,11 +346,14 @@ FROM passport_data;</sql>
|
||||||
<only_when_have_rows>N</only_when_have_rows>
|
<only_when_have_rows>N</only_when_have_rows>
|
||||||
<partitioning_daily>N</partitioning_daily>
|
<partitioning_daily>N</partitioning_daily>
|
||||||
<partitioning_enabled>N</partitioning_enabled>
|
<partitioning_enabled>N</partitioning_enabled>
|
||||||
|
<partitioning_field/>
|
||||||
<partitioning_monthly>Y</partitioning_monthly>
|
<partitioning_monthly>Y</partitioning_monthly>
|
||||||
|
<return_field/>
|
||||||
<return_keys>N</return_keys>
|
<return_keys>N</return_keys>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<specify_fields>Y</specify_fields>
|
<specify_fields>Y</specify_fields>
|
||||||
<table>passport</table>
|
<table>passport</table>
|
||||||
|
<tablename_field/>
|
||||||
<tablename_in_field>N</tablename_in_field>
|
<tablename_in_field>N</tablename_in_field>
|
||||||
<tablename_in_table>Y</tablename_in_table>
|
<tablename_in_table>Y</tablename_in_table>
|
||||||
<truncate>N</truncate>
|
<truncate>N</truncate>
|
||||||
|
|
@ -348,10 +364,35 @@ FROM passport_data;</sql>
|
||||||
<yloc>320</yloc>
|
<yloc>320</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1264</xloc>
|
||||||
|
<yloc>208</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>passport_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>passport_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,42 +22,47 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>passport_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>passport_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>passport_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>passport_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>passport_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>passport_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Insert / update</to>
|
<to>passport_insert_or_update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>passport_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>passport_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>752</xloc>
|
<xloc>752</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>passport_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,10 +156,11 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'DELTA_PROCESSING';
|
and status = 'DELTA_PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
<yloc>80</yloc>
|
<yloc>16</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -196,7 +209,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>400</xloc>
|
<xloc>400</xloc>
|
||||||
<yloc>80</yloc>
|
<yloc>16</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
|
|
@ -228,7 +241,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1120</xloc>
|
<xloc>1120</xloc>
|
||||||
|
|
@ -236,7 +249,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>passport_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -253,11 +266,13 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
|
<name2/>
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>actual</field>
|
<field>actual</field>
|
||||||
<name>actual</name>
|
<name>actual</name>
|
||||||
|
<name2/>
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>passport</table>
|
<table>passport</table>
|
||||||
|
|
@ -305,7 +320,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>passport_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -359,10 +374,35 @@ FROM passport_data;</sql>
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1120</xloc>
|
||||||
|
<yloc>112</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>passport_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>passport_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,42 +22,47 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>passport_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>passport_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>passport_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>passport_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>passport_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>passport_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>passport_input</from>
|
||||||
<to>Insert / update</to>
|
<to>passport_insert_or_update</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>passport_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
|
|
@ -82,7 +87,7 @@
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on error</name>
|
<name>passport_error_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -98,8 +103,11 @@
|
||||||
</argument>
|
</argument>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>Y</set_params>
|
<set_params>Y</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -111,6 +119,7 @@ WHERE job_name = '${JOB_NAME}'
|
||||||
and recruitment_id = '${IDM_ID}';
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>768</xloc>
|
<xloc>768</xloc>
|
||||||
|
|
@ -118,7 +127,7 @@ and recruitment_id = '${IDM_ID}';
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Change job status on success</name>
|
<name>passport_success_job_status</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -131,8 +140,11 @@ and recruitment_id = '${IDM_ID}';
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
|
<delete_field/>
|
||||||
<execute_each_row>Y</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<insert_field/>
|
||||||
<quoteString>N</quoteString>
|
<quoteString>N</quoteString>
|
||||||
|
<read_field/>
|
||||||
<replace_variables>Y</replace_variables>
|
<replace_variables>Y</replace_variables>
|
||||||
<set_params>N</set_params>
|
<set_params>N</set_params>
|
||||||
<single_statement>N</single_statement>
|
<single_statement>N</single_statement>
|
||||||
|
|
@ -144,6 +156,7 @@ and recruitment_id = '${IDM_ID}'
|
||||||
and status = 'PROCESSING';
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
<update_field/>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1040</xloc>
|
<xloc>1040</xloc>
|
||||||
|
|
@ -242,7 +255,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1040</xloc>
|
<xloc>1040</xloc>
|
||||||
|
|
@ -250,7 +263,7 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>passport_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -267,11 +280,13 @@ DO UPDATE SET
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
|
<name2/>
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>actual</field>
|
<field>actual</field>
|
||||||
<name>actual</name>
|
<name>actual</name>
|
||||||
|
<name2/>
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>passport</table>
|
<table>passport</table>
|
||||||
|
|
@ -319,7 +334,7 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>passport_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -372,10 +387,35 @@ FROM passport_data;</sql>
|
||||||
<yloc>272</yloc>
|
<yloc>272</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1040</xloc>
|
||||||
|
<yloc>144</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>passport_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>passport_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>prosecution_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>prosecution_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>prosecution_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>prosecution_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Table output</to>
|
<to>prosecution_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>prosecution_update_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Sort rows</to>
|
<to>prosecution_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>prosecution_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>prosecution_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>prosecution_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>prosecution_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,75 +101,6 @@
|
||||||
<yloc>224</yloc>
|
<yloc>224</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>848</xloc>
|
|
||||||
<yloc>224</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1072</xloc>
|
|
||||||
<yloc>640</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -240,7 +176,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>1072</xloc>
|
<xloc>1072</xloc>
|
||||||
|
|
@ -248,8 +184,8 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>Unique rows</name>
|
||||||
<type>SortRows</type>
|
<type>Unique</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -258,31 +194,58 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<count_rows>N</count_rows>
|
||||||
<prefix>out</prefix>
|
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
<fields>
|
||||||
<field>
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
</field>
|
||||||
</fields>
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>480</xloc>
|
<xloc>1072</xloc>
|
||||||
<yloc>32</yloc>
|
<yloc>544</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>prosecution_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>848</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -348,7 +311,7 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>prosecution_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -466,7 +429,74 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>prosecution_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>480</xloc>
|
||||||
|
<yloc>32</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'SUCCESS',
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1072</xloc>
|
||||||
|
<yloc>640</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -507,8 +537,8 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>prosecution_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -519,8 +549,8 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>prosecution_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>prosecution_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>prosecution_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>prosecution_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>prosecution_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>prosecution_update_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Insert / update</to>
|
<to>prosecution_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>prosecution_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>prosecution_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Sort rows</to>
|
<to>prosecution_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>prosecution_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>prosecution_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>prosecution_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,75 +101,6 @@
|
||||||
<yloc>592</yloc>
|
<yloc>592</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>736</xloc>
|
|
||||||
<yloc>592</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'DELTA_PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>896</xloc>
|
|
||||||
<yloc>944</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -243,7 +179,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>896</xloc>
|
<xloc>896</xloc>
|
||||||
|
|
@ -251,7 +187,169 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>prosecution_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>384</xloc>
|
||||||
|
<yloc>416</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>896</xloc>
|
||||||
|
<yloc>864</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'DELTA_ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>736</xloc>
|
||||||
|
<yloc>592</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH ugolov_presl AS (
|
||||||
|
SELECT
|
||||||
|
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
|
||||||
|
ri.recruit_id,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
AND '${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
r.recruit_id AS recruit_id,
|
||||||
|
(up->>'id')::uuid AS prosecution_external_id,
|
||||||
|
NULLIF(up->'sledSud'->>'uk', '') AS uk_name,
|
||||||
|
NULLIF(up->'sledSud'->'extend'->>'nomerUDPredv', '') AS case_number,
|
||||||
|
NULLIF(up->'sledSud'->'extend'->>'svedPerekvalif', '') AS reclassification,
|
||||||
|
NULLIF(up->'sledSud'->'extend'->>'naimVidUgolovPresl', '') AS kind,
|
||||||
|
CASE
|
||||||
|
WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true
|
||||||
|
ELSE false -- нет или нет инфы
|
||||||
|
END AS transfer_to_court,
|
||||||
|
NULLIF(up->'sledSud'->>'naimSud','') AS court_name,
|
||||||
|
NULLIF(up->'sledSud'->>'nomerUD','') AS case_number_court,
|
||||||
|
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
||||||
|
NULLIF(up->'sledSud'->>'naimOrgan', '') AS authority_name,
|
||||||
|
NULLIF(up->'sledSud'->'svedSnyat'->>'osnSnyatSud', '') AS conviction_removal_basis,
|
||||||
|
TO_DATE(up->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS conviction_removal_date,
|
||||||
|
TO_DATE(up->'sledSud'->>'dataOsuzhd', 'YYYY-MM-DD') AS conviction_date,
|
||||||
|
TO_DATE(up->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
||||||
|
NULLIF(up->'sledSud'->>'osnPrekrUD', '') AS termination_basis,
|
||||||
|
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
||||||
|
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
||||||
|
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
||||||
|
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
||||||
|
CASE
|
||||||
|
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
||||||
|
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
||||||
|
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
||||||
|
END AS type_info,
|
||||||
|
true AS has_criminal_prosecution,
|
||||||
|
up.source_ctid = (SELECT MAX(source_ctid) FROM ugolov_presl) as last_row
|
||||||
|
FROM ervu_dashboard.citizen r
|
||||||
|
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
||||||
|
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
||||||
|
GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>384</xloc>
|
||||||
|
<yloc>768</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -390,8 +488,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>prosecution_success_job_status</name>
|
||||||
<type>SortRows</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -400,98 +498,30 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<arguments>
|
||||||
<prefix>out</prefix>
|
</arguments>
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>384</xloc>
|
|
||||||
<yloc>416</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH ugolov_presl AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS up,
|
<set_params>N</set_params>
|
||||||
ri.recruit_id,
|
<single_statement>N</single_statement>
|
||||||
ri.ctid as source_ctid
|
<sql>UPDATE etl.job_execution
|
||||||
FROM ervu_dashboard.recruits_info ri
|
SET status = 'DELTA_SUCCESS',
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
execution_end_datetime = current_timestamp
|
||||||
AND '${IDM_ID}' != ''
|
WHERE job_name = '${JOB_NAME}'
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
and recruitment_id = '${IDM_ID}'
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
and status = 'DELTA_PROCESSING';
|
||||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
|
||||||
)
|
</sql>
|
||||||
SELECT
|
|
||||||
r.recruit_id AS recruit_id,
|
|
||||||
(up->>'id')::uuid AS prosecution_external_id,
|
|
||||||
NULLIF(up->'sledSud'->>'uk', '') AS uk_name,
|
|
||||||
NULLIF(up->'sledSud'->'extend'->>'nomerUDPredv', '') AS case_number,
|
|
||||||
NULLIF(up->'sledSud'->'extend'->>'svedPerekvalif', '') AS reclassification,
|
|
||||||
NULLIF(up->'sledSud'->'extend'->>'naimVidUgolovPresl', '') AS kind,
|
|
||||||
CASE
|
|
||||||
WHEN up->'sledSud'->'extend'->>'priznakPeredachSud' = '1' THEN true
|
|
||||||
ELSE false -- нет или нет инфы
|
|
||||||
END AS transfer_to_court,
|
|
||||||
NULLIF(up->'sledSud'->>'naimSud','') AS court_name,
|
|
||||||
NULLIF(up->'sledSud'->>'nomerUD','') AS case_number_court,
|
|
||||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
|
||||||
NULLIF(up->'sledSud'->>'naimOrgan', '') AS authority_name,
|
|
||||||
NULLIF(up->'sledSud'->'svedSnyat'->>'osnSnyatSud', '') AS conviction_removal_basis,
|
|
||||||
TO_DATE(up->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS conviction_removal_date,
|
|
||||||
TO_DATE(up->'sledSud'->>'dataOsuzhd', 'YYYY-MM-DD') AS conviction_date,
|
|
||||||
TO_DATE(up->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
|
||||||
NULLIF(up->'sledSud'->>'osnPrekrUD', '') AS termination_basis,
|
|
||||||
NULLIF(up->'sledSud'->>'statusNaim', '') AS conviction_status,
|
|
||||||
TO_DATE(up->'sledSud'->>'dataPrekrUD', 'YYYY-MM-DD') AS close_date,
|
|
||||||
NULLIF(up->'sledSudTekst'->>'svedTekst' , '') AS sled_sud_tekst_sved_tekst,
|
|
||||||
NULLIF(up->'sledSudTekst'->>'statusNaim', '') AS sled_sud_tekst_status_naim,
|
|
||||||
CASE
|
|
||||||
WHEN (up->>'sledSud') IS NOT NULL AND up->>'sledSud' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в структурированном формате'
|
|
||||||
WHEN (up->>'sledSudTekst') IS NOT NULL AND up->>'sledSudTekst' != 'null' THEN 'Сведения о фактах уголовного преследования или судимости в текстовом виде'
|
|
||||||
ELSE 'Есть сведения о фактах уголовного преследования или судимости без указания подробностей'
|
|
||||||
END AS type_info,
|
|
||||||
true AS has_criminal_prosecution,
|
|
||||||
up.source_ctid = (SELECT MAX(source_ctid) FROM ugolov_presl) as last_row
|
|
||||||
FROM ervu_dashboard.citizen r
|
|
||||||
JOIN ugolov_presl up ON r.recruit_id = up.recruit_id
|
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(up->'sledSud'->'statiUK') AS law(f) ON true
|
|
||||||
GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>384</xloc>
|
<xloc>896</xloc>
|
||||||
<yloc>768</yloc>
|
<yloc>944</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>prosecution_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -504,19 +534,16 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_criminal_prosecution</field>
|
<field>has_criminal_prosecution</field>
|
||||||
<name>has_criminal_prosecution</name>
|
<name>has_criminal_prosecution</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -535,8 +562,8 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>prosecution_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -547,8 +574,8 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>prosecution_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -27,21 +27,21 @@
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>Insert / update</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>prosecution_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>Filter rows</from>
|
||||||
<to>Change job status on success</to>
|
<to>prosecution_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>prosecution_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
|
@ -51,18 +51,18 @@
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>prosecution_update_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>prosecution_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>prosecution_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>prosecution_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>Table input</from>
|
||||||
<to>Sort rows</to>
|
<to>prosecution_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
|
|
@ -96,75 +96,6 @@
|
||||||
<yloc>736</yloc>
|
<yloc>736</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>768</xloc>
|
|
||||||
<yloc>736</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>928</xloc>
|
|
||||||
<yloc>1088</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -257,7 +188,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>prosecution_success_job_status</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>928</xloc>
|
<xloc>928</xloc>
|
||||||
|
|
@ -404,7 +335,7 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>prosecution_sort_rows</name>
|
||||||
<type>SortRows</type>
|
<type>SortRows</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -416,7 +347,7 @@ DO UPDATE SET
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<directory>${java.io.tmpdir}</directory>
|
||||||
<prefix>out</prefix>
|
<prefix>out</prefix>
|
||||||
<sort_size>1000000</sort_size>
|
<sort_size>100000</sort_size>
|
||||||
<free_memory/>
|
<free_memory/>
|
||||||
<compress>N</compress>
|
<compress>N</compress>
|
||||||
<compress_variable/>
|
<compress_variable/>
|
||||||
|
|
@ -504,7 +435,76 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>prosecution_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>768</xloc>
|
||||||
|
<yloc>736</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'SUCCESS',
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>928</xloc>
|
||||||
|
<yloc>1088</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>prosecution_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -517,19 +517,16 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_criminal_prosecution</field>
|
<field>has_criminal_prosecution</field>
|
||||||
<name>has_criminal_prosecution</name>
|
<name>has_criminal_prosecution</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -549,7 +546,7 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>Insert / update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -560,8 +557,8 @@ GROUP BY r.recruit_id, up.up, up.source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>prosecution_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>prosecution_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>punishment_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>punishment_output</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>punishment_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
|
||||||
<from>Filter rows</from>
|
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>punishment_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Table output</to>
|
<to>punishment_output</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>punishment_update_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>punishment_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>punishment_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Sort rows</to>
|
<to>punishment_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table output</from>
|
<from>punishment_output</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>punishment_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,75 +101,6 @@
|
||||||
<yloc>448</yloc>
|
<yloc>448</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>1008</xloc>
|
|
||||||
<yloc>448</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>544</xloc>
|
|
||||||
<yloc>144</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -240,7 +176,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>720</xloc>
|
<xloc>720</xloc>
|
||||||
|
|
@ -248,7 +184,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>punishment_sort_rows</name>
|
||||||
<type>SortRows</type>
|
<type>SortRows</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
|
|
@ -260,7 +196,7 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<directory>${java.io.tmpdir}</directory>
|
||||||
<prefix>out</prefix>
|
<prefix>out</prefix>
|
||||||
<sort_size>1000000</sort_size>
|
<sort_size>100000</sort_size>
|
||||||
<free_memory/>
|
<free_memory/>
|
||||||
<compress>N</compress>
|
<compress>N</compress>
|
||||||
<compress_variable/>
|
<compress_variable/>
|
||||||
|
|
@ -282,7 +218,68 @@ VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table input</name>
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>640</xloc>
|
||||||
|
<yloc>144</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>1008</xloc>
|
||||||
|
<yloc>448</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_input</name>
|
||||||
<type>TableInput</type>
|
<type>TableInput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -348,7 +345,7 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Table output</name>
|
<name>punishment_output</name>
|
||||||
<type>TableOutput</type>
|
<type>TableOutput</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -458,7 +455,40 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>punishment_success_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>N</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'SUCCESS',
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}'
|
||||||
|
and status = 'PROCESSING';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>512</xloc>
|
||||||
|
<yloc>256</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -471,25 +501,21 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_punishment_execution_info</field>
|
<field>has_punishment_execution_info</field>
|
||||||
<name>has_punishment_execution_info</name>
|
<name>has_punishment_execution_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_sentence_info</field>
|
<field>has_sentence_info</field>
|
||||||
<name>has_sentence_info</name>
|
<name>has_sentence_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -512,8 +538,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Table output</source_transform>
|
<source_transform>punishment_output</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -524,8 +550,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>punishment_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_decription</descriptions_valuename>
|
<descriptions_valuename>error_decription</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -41,59 +41,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>punishment_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>punishment_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>punishment_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>punishment_error_job_status</from>
|
||||||
<to>Change job status on success</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Change job status on error</from>
|
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Insert / update</to>
|
<to>punishment_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>punishment_update_flags</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Sort rows</to>
|
<to>punishment_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>punishment_sort_rows</from>
|
||||||
<to>Update</to>
|
<to>punishment_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>punishment_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>punishment_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -115,75 +120,6 @@
|
||||||
<yloc>384</yloc>
|
<yloc>384</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>960</xloc>
|
|
||||||
<yloc>384</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'DELTA_SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'DELTA_PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>608</xloc>
|
|
||||||
<yloc>32</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -262,7 +198,7 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>784</xloc>
|
<xloc>784</xloc>
|
||||||
|
|
@ -270,7 +206,169 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>punishment_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>400</xloc>
|
||||||
|
<yloc>608</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>704</xloc>
|
||||||
|
<yloc>32</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'DELTA_ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>960</xloc>
|
||||||
|
<yloc>384</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH punishment_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id,
|
||||||
|
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
AND '${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
||||||
|
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||||
|
)
|
||||||
|
SELECT recruit_id,
|
||||||
|
(punishment_info ->> 'id')::uuid AS punishment_external_id,
|
||||||
|
-- Блок "Сведения о вынесенном приговоре"
|
||||||
|
punishment_info ->> 'vidNakaz' AS punishment_type, -- Вид наказания
|
||||||
|
punishment_info ->> 'kodVidNakaz' AS punishment_code, -- Код вида наказания
|
||||||
|
TO_DATE(punishment_info ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, -- Дата осуждения
|
||||||
|
punishment_info ->> 'naimSud' AS authority_name, -- Наименование суда
|
||||||
|
punishment_info ->> 'srokNakaz' AS sentence, -- Срок наказания
|
||||||
|
CASE
|
||||||
|
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '1' THEN 'Изменений срока наказания не было'
|
||||||
|
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
|
||||||
|
ELSE punishment_info ->> 'kodIzmSrokNakaz'
|
||||||
|
END AS sentence_changed, -- Признак изменения срока
|
||||||
|
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
|
||||||
|
-- Блок "Сведения об отбывании наказания"
|
||||||
|
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
|
||||||
|
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
||||||
|
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
||||||
|
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
||||||
|
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
||||||
|
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
||||||
|
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
||||||
|
CASE
|
||||||
|
WHEN punishment_info ->> 'kodPerekvalif' = '1' THEN 'Изменений статьи не было'
|
||||||
|
WHEN punishment_info ->> 'kodPerekvalif' = '2' THEN 'Были изменения статьи'
|
||||||
|
ELSE punishment_info ->> 'kodPerekvalif'
|
||||||
|
END AS article_modification_flag, -- Признак переквалификации
|
||||||
|
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
||||||
|
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
||||||
|
true AS has_punishment_execution_info,
|
||||||
|
true AS has_sentence_info,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM punishment_data) as last_row
|
||||||
|
FROM punishment_data
|
||||||
|
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
||||||
|
GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>400</xloc>
|
||||||
|
<yloc>224</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -399,8 +497,8 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>punishment_success_job_status</name>
|
||||||
<type>SortRows</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -409,98 +507,30 @@ and recruitment_id = '${IDM_ID}';</sql>
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<arguments>
|
||||||
<prefix>out</prefix>
|
</arguments>
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>400</xloc>
|
|
||||||
<yloc>608</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH punishment_data AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
ri.recruit_id,
|
<set_params>N</set_params>
|
||||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info,
|
<single_statement>N</single_statement>
|
||||||
ri.ctid as source_ctid
|
<sql>UPDATE etl.job_execution
|
||||||
FROM ervu_dashboard.recruits_info ri
|
SET status = 'DELTA_SUCCESS',
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
execution_end_datetime = current_timestamp
|
||||||
AND '${IDM_ID}' != ''
|
WHERE job_name = '${JOB_NAME}'
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
and recruitment_id = '${IDM_ID}'
|
||||||
AND ri.updated_at >= '${M_R_UP_DATE}'::timestamp
|
and status = 'DELTA_PROCESSING';
|
||||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
|
||||||
)
|
</sql>
|
||||||
SELECT recruit_id,
|
|
||||||
(punishment_info ->> 'id')::uuid AS punishment_external_id,
|
|
||||||
-- Блок "Сведения о вынесенном приговоре"
|
|
||||||
punishment_info ->> 'vidNakaz' AS punishment_type, -- Вид наказания
|
|
||||||
punishment_info ->> 'kodVidNakaz' AS punishment_code, -- Код вида наказания
|
|
||||||
TO_DATE(punishment_info ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, -- Дата осуждения
|
|
||||||
punishment_info ->> 'naimSud' AS authority_name, -- Наименование суда
|
|
||||||
punishment_info ->> 'srokNakaz' AS sentence, -- Срок наказания
|
|
||||||
CASE
|
|
||||||
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '1' THEN 'Изменений срока наказания не было'
|
|
||||||
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
|
|
||||||
ELSE punishment_info ->> 'kodIzmSrokNakaz'
|
|
||||||
END AS sentence_changed, -- Признак изменения срока
|
|
||||||
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
|
|
||||||
-- Блок "Сведения об отбывании наказания"
|
|
||||||
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
|
|
||||||
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
|
||||||
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
|
||||||
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
|
||||||
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
|
||||||
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
|
||||||
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
|
||||||
CASE
|
|
||||||
WHEN punishment_info ->> 'kodPerekvalif' = '1' THEN 'Изменений статьи не было'
|
|
||||||
WHEN punishment_info ->> 'kodPerekvalif' = '2' THEN 'Были изменения статьи'
|
|
||||||
ELSE punishment_info ->> 'kodPerekvalif'
|
|
||||||
END AS article_modification_flag, -- Признак переквалификации
|
|
||||||
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
|
||||||
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
|
||||||
true AS has_punishment_execution_info,
|
|
||||||
true AS has_sentence_info,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM punishment_data) as last_row
|
|
||||||
FROM punishment_data
|
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
|
||||||
GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>400</xloc>
|
<xloc>592</xloc>
|
||||||
<yloc>224</yloc>
|
<yloc>160</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>punishment_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -513,25 +543,21 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_punishment_execution_info</field>
|
<field>has_punishment_execution_info</field>
|
||||||
<name>has_punishment_execution_info</name>
|
<name>has_punishment_execution_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_sentence_info</field>
|
<field>has_sentence_info</field>
|
||||||
<name>has_sentence_info</name>
|
<name>has_sentence_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -554,8 +580,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>punishment_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -566,8 +592,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>punishment_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
|
|
@ -22,59 +22,64 @@
|
||||||
<order>
|
<order>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Create job execution record</from>
|
<from>Create job execution record</from>
|
||||||
<to>Table input</to>
|
<to>punishment_input</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Change job status on error</from>
|
<from>punishment_error_job_status</from>
|
||||||
<to>Abort</to>
|
<to>Abort</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Detect empty stream</from>
|
<from>Detect empty stream</from>
|
||||||
<to>Change job status on success</to>
|
<to>punishment_success_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Filter rows</from>
|
<from>punishment_update_flags</from>
|
||||||
<to>Change job status on success</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Update</from>
|
<from>punishment_insert_or_update</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_error_job_status</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>punishment_input</from>
|
||||||
<to>Change job status on error</to>
|
<to>punishment_insert_or_update</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_input</from>
|
||||||
<to>Insert / update</to>
|
<to>punishment_sort_rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Table input</from>
|
<from>punishment_sort_rows</from>
|
||||||
<to>Sort rows</to>
|
<to>punishment_update_flags</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Sort rows</from>
|
<from>punishment_input</from>
|
||||||
<to>Update</to>
|
|
||||||
<enabled>Y</enabled>
|
|
||||||
</hop>
|
|
||||||
<hop>
|
|
||||||
<from>Table input</from>
|
|
||||||
<to>Detect empty stream</to>
|
<to>Detect empty stream</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
<hop>
|
<hop>
|
||||||
<from>Insert / update</from>
|
<from>punishment_insert_or_update</from>
|
||||||
<to>Filter rows</to>
|
<to>Filter rows</to>
|
||||||
<enabled>Y</enabled>
|
<enabled>Y</enabled>
|
||||||
</hop>
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Filter rows</from>
|
||||||
|
<to>Unique rows</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
|
<hop>
|
||||||
|
<from>Unique rows</from>
|
||||||
|
<to>punishment_success_job_status</to>
|
||||||
|
<enabled>Y</enabled>
|
||||||
|
</hop>
|
||||||
</order>
|
</order>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Abort</name>
|
<name>Abort</name>
|
||||||
|
|
@ -96,75 +101,6 @@
|
||||||
<yloc>432</yloc>
|
<yloc>432</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
|
||||||
<name>Change job status on error</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
<argument>
|
|
||||||
<name>error_description</name>
|
|
||||||
</argument>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>Y</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'ERROR',
|
|
||||||
error_description = ?,
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>992</xloc>
|
|
||||||
<yloc>432</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Change job status on success</name>
|
|
||||||
<type>ExecSql</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>Y</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
<connection>ervu-dashboard</connection>
|
|
||||||
<execute_each_row>Y</execute_each_row>
|
|
||||||
<quoteString>N</quoteString>
|
|
||||||
<replace_variables>Y</replace_variables>
|
|
||||||
<set_params>N</set_params>
|
|
||||||
<single_statement>N</single_statement>
|
|
||||||
<sql>UPDATE etl.job_execution
|
|
||||||
SET status = 'SUCCESS',
|
|
||||||
execution_end_datetime = current_timestamp
|
|
||||||
WHERE job_name = '${JOB_NAME}'
|
|
||||||
and recruitment_id = '${IDM_ID}'
|
|
||||||
and status = 'PROCESSING';
|
|
||||||
|
|
||||||
</sql>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>640</xloc>
|
|
||||||
<yloc>112</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
<transform>
|
||||||
<name>Create job execution record</name>
|
<name>Create job execution record</name>
|
||||||
<type>ExecSql</type>
|
<type>ExecSql</type>
|
||||||
|
|
@ -257,7 +193,7 @@ DO UPDATE SET
|
||||||
</value>
|
</value>
|
||||||
</condition>
|
</condition>
|
||||||
</compare>
|
</compare>
|
||||||
<send_true_to>Change job status on success</send_true_to>
|
<send_true_to>Unique rows</send_true_to>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>816</xloc>
|
<xloc>816</xloc>
|
||||||
|
|
@ -265,7 +201,168 @@ DO UPDATE SET
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Insert / update</name>
|
<name>punishment_sort_rows</name>
|
||||||
|
<type>SortRows</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<directory>${java.io.tmpdir}</directory>
|
||||||
|
<prefix>out</prefix>
|
||||||
|
<sort_size>100000</sort_size>
|
||||||
|
<free_memory/>
|
||||||
|
<compress>N</compress>
|
||||||
|
<compress_variable/>
|
||||||
|
<unique_rows>Y</unique_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
<ascending>Y</ascending>
|
||||||
|
<case_sensitive>N</case_sensitive>
|
||||||
|
<collator_enabled>N</collator_enabled>
|
||||||
|
<collator_strength>0</collator_strength>
|
||||||
|
<presorted>N</presorted>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>416</xloc>
|
||||||
|
<yloc>640</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>Unique rows</name>
|
||||||
|
<type>Unique</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<count_rows>N</count_rows>
|
||||||
|
<fields>
|
||||||
|
<field>
|
||||||
|
<case_insensitive>N</case_insensitive>
|
||||||
|
<name>recruit_id</name>
|
||||||
|
</field>
|
||||||
|
</fields>
|
||||||
|
<reject_duplicate_row>N</reject_duplicate_row>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>736</xloc>
|
||||||
|
<yloc>112</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_error_job_status</name>
|
||||||
|
<type>ExecSql</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>Y</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<arguments>
|
||||||
|
<argument>
|
||||||
|
<name>error_description</name>
|
||||||
|
</argument>
|
||||||
|
</arguments>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>Y</execute_each_row>
|
||||||
|
<quoteString>N</quoteString>
|
||||||
|
<replace_variables>Y</replace_variables>
|
||||||
|
<set_params>Y</set_params>
|
||||||
|
<single_statement>N</single_statement>
|
||||||
|
<sql>UPDATE etl.job_execution
|
||||||
|
SET status = 'ERROR',
|
||||||
|
error_description = ?,
|
||||||
|
execution_end_datetime = current_timestamp
|
||||||
|
WHERE job_name = '${JOB_NAME}'
|
||||||
|
and recruitment_id = '${IDM_ID}';
|
||||||
|
|
||||||
|
</sql>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>992</xloc>
|
||||||
|
<yloc>432</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_input</name>
|
||||||
|
<type>TableInput</type>
|
||||||
|
<description/>
|
||||||
|
<distribute>N</distribute>
|
||||||
|
<custom_distribution/>
|
||||||
|
<copies>1</copies>
|
||||||
|
<partitioning>
|
||||||
|
<method>none</method>
|
||||||
|
<schema_name/>
|
||||||
|
</partitioning>
|
||||||
|
<connection>ervu-dashboard</connection>
|
||||||
|
<execute_each_row>N</execute_each_row>
|
||||||
|
<sql>WITH punishment_data AS (
|
||||||
|
SELECT
|
||||||
|
ri.recruit_id,
|
||||||
|
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info,
|
||||||
|
ri.ctid as source_ctid
|
||||||
|
FROM ervu_dashboard.recruits_info ri
|
||||||
|
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
||||||
|
AND '${IDM_ID}' != ''
|
||||||
|
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||||
|
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
||||||
|
)
|
||||||
|
SELECT recruit_id,
|
||||||
|
(punishment_info ->> 'id')::uuid AS punishment_external_id,
|
||||||
|
-- Блок "Сведения о вынесенном приговоре"
|
||||||
|
punishment_info ->> 'vidNakaz' AS punishment_type, -- Вид наказания
|
||||||
|
punishment_info ->> 'kodVidNakaz' AS punishment_code, -- Код вида наказания
|
||||||
|
TO_DATE(punishment_info ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, -- Дата осуждения
|
||||||
|
punishment_info ->> 'naimSud' AS authority_name, -- Наименование суда
|
||||||
|
punishment_info ->> 'srokNakaz' AS sentence, -- Срок наказания
|
||||||
|
CASE
|
||||||
|
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '1' THEN 'Изменений срока наказания не было'
|
||||||
|
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
|
||||||
|
ELSE punishment_info ->> 'kodIzmSrokNakaz'
|
||||||
|
END AS sentence_changed, -- Признак изменения срока
|
||||||
|
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
|
||||||
|
-- Блок "Сведения об отбывании наказания"
|
||||||
|
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
|
||||||
|
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
||||||
|
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
||||||
|
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
||||||
|
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
||||||
|
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
||||||
|
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
||||||
|
CASE
|
||||||
|
WHEN punishment_info ->> 'kodPerekvalif' = '1' THEN 'Изменений статьи не было'
|
||||||
|
WHEN punishment_info ->> 'kodPerekvalif' = '2' THEN 'Были изменения статьи'
|
||||||
|
ELSE punishment_info ->> 'kodPerekvalif'
|
||||||
|
END AS article_modification_flag, -- Признак переквалификации
|
||||||
|
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
||||||
|
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
||||||
|
true AS has_punishment_execution_info,
|
||||||
|
true AS has_sentence_info,
|
||||||
|
source_ctid = (SELECT MAX(source_ctid) FROM punishment_data) as last_row
|
||||||
|
FROM punishment_data
|
||||||
|
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
||||||
|
GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
|
<variables_active>Y</variables_active>
|
||||||
|
<attributes/>
|
||||||
|
<GUI>
|
||||||
|
<xloc>416</xloc>
|
||||||
|
<yloc>272</yloc>
|
||||||
|
</GUI>
|
||||||
|
</transform>
|
||||||
|
<transform>
|
||||||
|
<name>punishment_insert_or_update</name>
|
||||||
<type>InsertUpdate</type>
|
<type>InsertUpdate</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -389,13 +486,13 @@ DO UPDATE SET
|
||||||
<update_bypassed>N</update_bypassed>
|
<update_bypassed>N</update_bypassed>
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>816</xloc>
|
<xloc>800</xloc>
|
||||||
<yloc>272</yloc>
|
<yloc>272</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Sort rows</name>
|
<name>punishment_success_job_status</name>
|
||||||
<type>SortRows</type>
|
<type>ExecSql</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>Y</distribute>
|
<distribute>Y</distribute>
|
||||||
<custom_distribution/>
|
<custom_distribution/>
|
||||||
|
|
@ -404,97 +501,30 @@ DO UPDATE SET
|
||||||
<method>none</method>
|
<method>none</method>
|
||||||
<schema_name/>
|
<schema_name/>
|
||||||
</partitioning>
|
</partitioning>
|
||||||
<directory>${java.io.tmpdir}</directory>
|
<arguments>
|
||||||
<prefix>out</prefix>
|
</arguments>
|
||||||
<sort_size>1000000</sort_size>
|
|
||||||
<free_memory/>
|
|
||||||
<compress>N</compress>
|
|
||||||
<compress_variable/>
|
|
||||||
<unique_rows>Y</unique_rows>
|
|
||||||
<fields>
|
|
||||||
<field>
|
|
||||||
<name>recruit_id</name>
|
|
||||||
<ascending>Y</ascending>
|
|
||||||
<case_sensitive>N</case_sensitive>
|
|
||||||
<collator_enabled>N</collator_enabled>
|
|
||||||
<collator_strength>0</collator_strength>
|
|
||||||
<presorted>N</presorted>
|
|
||||||
</field>
|
|
||||||
</fields>
|
|
||||||
<attributes/>
|
|
||||||
<GUI>
|
|
||||||
<xloc>416</xloc>
|
|
||||||
<yloc>640</yloc>
|
|
||||||
</GUI>
|
|
||||||
</transform>
|
|
||||||
<transform>
|
|
||||||
<name>Table input</name>
|
|
||||||
<type>TableInput</type>
|
|
||||||
<description/>
|
|
||||||
<distribute>N</distribute>
|
|
||||||
<custom_distribution/>
|
|
||||||
<copies>1</copies>
|
|
||||||
<partitioning>
|
|
||||||
<method>none</method>
|
|
||||||
<schema_name/>
|
|
||||||
</partitioning>
|
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<execute_each_row>N</execute_each_row>
|
<execute_each_row>Y</execute_each_row>
|
||||||
<sql>WITH punishment_data AS (
|
<quoteString>N</quoteString>
|
||||||
SELECT
|
<replace_variables>Y</replace_variables>
|
||||||
ri.recruit_id,
|
<set_params>N</set_params>
|
||||||
jsonb_array_elements(ri.info -> 'svedFL' -> 'svedNakaz' -> 'nakaz') AS punishment_info,
|
<single_statement>N</single_statement>
|
||||||
ri.ctid as source_ctid
|
<sql>UPDATE etl.job_execution
|
||||||
FROM ervu_dashboard.recruits_info ri
|
SET status = 'SUCCESS',
|
||||||
JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id
|
execution_end_datetime = current_timestamp
|
||||||
AND '${IDM_ID}' != ''
|
WHERE job_name = '${JOB_NAME}'
|
||||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
and recruitment_id = '${IDM_ID}'
|
||||||
WHERE ri.info -> 'svedFL' -> 'svedNakaz' ->> 'nakaz' != 'null'
|
and status = 'PROCESSING';
|
||||||
)
|
|
||||||
SELECT recruit_id,
|
</sql>
|
||||||
(punishment_info ->> 'id')::uuid AS punishment_external_id,
|
|
||||||
-- Блок "Сведения о вынесенном приговоре"
|
|
||||||
punishment_info ->> 'vidNakaz' AS punishment_type, -- Вид наказания
|
|
||||||
punishment_info ->> 'kodVidNakaz' AS punishment_code, -- Код вида наказания
|
|
||||||
TO_DATE(punishment_info ->> 'dataOsuzhd', 'YYYY-MM-DD') AS sentense_date, -- Дата осуждения
|
|
||||||
punishment_info ->> 'naimSud' AS authority_name, -- Наименование суда
|
|
||||||
punishment_info ->> 'srokNakaz' AS sentence, -- Срок наказания
|
|
||||||
CASE
|
|
||||||
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '1' THEN 'Изменений срока наказания не было'
|
|
||||||
WHEN punishment_info ->> 'kodIzmSrokNakaz' = '2' THEN 'Были изменения срока наказания'
|
|
||||||
ELSE punishment_info ->> 'kodIzmSrokNakaz'
|
|
||||||
END AS sentence_changed, -- Признак изменения срока
|
|
||||||
STRING_AGG(TRIM(BOTH ' "' FROM law_articles), ', ') AS law_point, -- Статьи УК
|
|
||||||
-- Блок "Сведения об отбывании наказания"
|
|
||||||
punishment_info ->> 'katUcheta' AS registration_category, -- Категория учета
|
|
||||||
punishment_info ->> 'naimSubekt' AS region_name, -- Наименование субъекта
|
|
||||||
punishment_info ->> 'naimOrg' AS facility_name, -- Название учреждения
|
|
||||||
punishment_info ->> 'adresOrg' AS facility_address, -- Адрес учреждения
|
|
||||||
punishment_info ->> 'nomerUD' AS criminal_case_number, -- Номер уголовного дела
|
|
||||||
TO_DATE(punishment_info ->> 'dataNachSrok', 'YYYY-MM-DD') AS start_date, -- Дата начала срока
|
|
||||||
TO_DATE(punishment_info ->> 'dataOkonchSrok', 'YYYY-MM-DD') AS planned_date, -- Планируемая дата освобождения
|
|
||||||
CASE
|
|
||||||
WHEN punishment_info ->> 'kodPerekvalif' = '1' THEN 'Изменений статьи не было'
|
|
||||||
WHEN punishment_info ->> 'kodPerekvalif' = '2' THEN 'Были изменения статьи'
|
|
||||||
ELSE punishment_info ->> 'kodPerekvalif'
|
|
||||||
END AS article_modification_flag, -- Признак переквалификации
|
|
||||||
punishment_info ->> 'osnOsvob' AS release_reason, -- Основание освобождения
|
|
||||||
TO_DATE(punishment_info ->> 'dataOsvob', 'YYYY-MM-DD') AS release_date, -- Фактическая дата освобождения
|
|
||||||
true AS has_punishment_execution_info,
|
|
||||||
true AS has_sentence_info,
|
|
||||||
source_ctid = (SELECT MAX(source_ctid) FROM punishment_data) as last_row
|
|
||||||
FROM punishment_data
|
|
||||||
LEFT JOIN LATERAL jsonb_array_elements_text(punishment_info -> 'statiUK') AS law_articles ON true
|
|
||||||
GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
|
||||||
<variables_active>Y</variables_active>
|
|
||||||
<attributes/>
|
<attributes/>
|
||||||
<GUI>
|
<GUI>
|
||||||
<xloc>416</xloc>
|
<xloc>640</xloc>
|
||||||
<yloc>272</yloc>
|
<yloc>192</yloc>
|
||||||
</GUI>
|
</GUI>
|
||||||
</transform>
|
</transform>
|
||||||
<transform>
|
<transform>
|
||||||
<name>Update</name>
|
<name>punishment_update_flags</name>
|
||||||
<type>Update</type>
|
<type>Update</type>
|
||||||
<description/>
|
<description/>
|
||||||
<distribute>N</distribute>
|
<distribute>N</distribute>
|
||||||
|
|
@ -507,25 +537,21 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<commit>10000</commit>
|
<commit>10000</commit>
|
||||||
<connection>ervu-dashboard</connection>
|
<connection>ervu-dashboard</connection>
|
||||||
<error_ignored>Y</error_ignored>
|
<error_ignored>Y</error_ignored>
|
||||||
<ignore_flag_field/>
|
|
||||||
<lookup>
|
<lookup>
|
||||||
<key>
|
<key>
|
||||||
<condition>=</condition>
|
<condition>=</condition>
|
||||||
<field>recruit_id</field>
|
<field>recruit_id</field>
|
||||||
<name>recruit_id</name>
|
<name>recruit_id</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_punishment_execution_info</field>
|
<field>has_punishment_execution_info</field>
|
||||||
<name>has_punishment_execution_info</name>
|
<name>has_punishment_execution_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<key>
|
<key>
|
||||||
<condition><></condition>
|
<condition><></condition>
|
||||||
<field>has_sentence_info</field>
|
<field>has_sentence_info</field>
|
||||||
<name>has_sentence_info</name>
|
<name>has_sentence_info</name>
|
||||||
<name2/>
|
|
||||||
</key>
|
</key>
|
||||||
<schema>ervu_dashboard</schema>
|
<schema>ervu_dashboard</schema>
|
||||||
<table>citizen</table>
|
<table>citizen</table>
|
||||||
|
|
@ -548,8 +574,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
</transform>
|
</transform>
|
||||||
<transform_error_handling>
|
<transform_error_handling>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Insert / update</source_transform>
|
<source_transform>punishment_insert_or_update</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
@ -560,8 +586,8 @@ GROUP BY recruit_id, punishment_info,source_ctid;</sql>
|
||||||
<min_pct_rows/>
|
<min_pct_rows/>
|
||||||
</error>
|
</error>
|
||||||
<error>
|
<error>
|
||||||
<source_transform>Update</source_transform>
|
<source_transform>punishment_update_flags</source_transform>
|
||||||
<target_transform>Change job status on error</target_transform>
|
<target_transform>punishment_error_job_status</target_transform>
|
||||||
<is_enabled>Y</is_enabled>
|
<is_enabled>Y</is_enabled>
|
||||||
<nr_valuename/>
|
<nr_valuename/>
|
||||||
<descriptions_valuename>error_description</descriptions_valuename>
|
<descriptions_valuename>error_description</descriptions_valuename>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue