ERVU-506: красота
This commit is contained in:
parent
c6080b6f4b
commit
6621235000
37 changed files with 2292 additions and 7501 deletions
|
|
@ -1,204 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>branching_citizen_address</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 14:40:44.856</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 14:40:44.856</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>JSON input state_job_citizen_address.json</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Set variables</from>
|
||||
<to>Write to log</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>JSON input state_job_citizen_address.json</name>
|
||||
<type>JsonInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<include>N</include>
|
||||
<include_field/>
|
||||
<rownum>N</rownum>
|
||||
<addresultfile>N</addresultfile>
|
||||
<readurl>N</readurl>
|
||||
<removeSourceField>N</removeSourceField>
|
||||
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
|
||||
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
|
||||
<ignoreMissingPath>Y</ignoreMissingPath>
|
||||
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
|
||||
<rownum_field/>
|
||||
<file>
|
||||
<name>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/checkpoints/state_job_citizen_address.json</name>
|
||||
<filemask/>
|
||||
<exclude_filemask/>
|
||||
<file_required>N</file_required>
|
||||
<include_subfolders>N</include_subfolders>
|
||||
</file>
|
||||
<fields>
|
||||
<field>
|
||||
<name>pipeline</name>
|
||||
<path>$.pipeline</path>
|
||||
<type>String</type>
|
||||
<format/>
|
||||
<currency/>
|
||||
<decimal/>
|
||||
<group/>
|
||||
<length>-1</length>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<repeat>N</repeat>
|
||||
</field>
|
||||
<field>
|
||||
<name>status</name>
|
||||
<path>$.status</path>
|
||||
<type>String</type>
|
||||
<format/>
|
||||
<currency/>
|
||||
<decimal/>
|
||||
<group/>
|
||||
<length>-1</length>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<repeat>N</repeat>
|
||||
</field>
|
||||
</fields>
|
||||
<limit>0</limit>
|
||||
<IsInFields>N</IsInFields>
|
||||
<IsAFile>N</IsAFile>
|
||||
<valueField/>
|
||||
<shortFileFieldName/>
|
||||
<pathFieldName/>
|
||||
<hiddenFieldName/>
|
||||
<lastModificationTimeFieldName/>
|
||||
<uriNameFieldName/>
|
||||
<rootUriNameFieldName/>
|
||||
<extensionFieldName/>
|
||||
<sizeFieldName/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>528</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Set variables</name>
|
||||
<type>SetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<field_name>pipeline</field_name>
|
||||
<variable_name>PIPE</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
<field>
|
||||
<field_name>status</field_name>
|
||||
<variable_name>STATUS</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
</fields>
|
||||
<use_formatting>Y</use_formatting>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
status as STATUS,
|
||||
job_name AS PIPELINE
|
||||
from public.etl_checkpoints
|
||||
where job_name = 'job_citizen_address'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Write to log</name>
|
||||
<type>WriteToLog</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<displayHeader>Y</displayHeader>
|
||||
<fields>
|
||||
<field>
|
||||
<name>pipeline</name>
|
||||
</field>
|
||||
<field>
|
||||
<name>status</name>
|
||||
</field>
|
||||
</fields>
|
||||
<limitRows>N</limitRows>
|
||||
<limitRowsNumber>0</limitRowsNumber>
|
||||
<loglevel>Basic</loglevel>
|
||||
<logmessage>${PIPE}
|
||||
${STATUS}</logmessage>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,222 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>branching_citizen_address_delta</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 14:40:44.856</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 14:40:44.856</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>JSON input state_job_citizen_address.json</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Set variables</from>
|
||||
<to>Write to log</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>JSON input state_job_citizen_address.json</name>
|
||||
<type>JsonInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<include>N</include>
|
||||
<include_field/>
|
||||
<rownum>N</rownum>
|
||||
<addresultfile>N</addresultfile>
|
||||
<readurl>N</readurl>
|
||||
<removeSourceField>N</removeSourceField>
|
||||
<IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
|
||||
<doNotFailIfNoFile>Y</doNotFailIfNoFile>
|
||||
<ignoreMissingPath>Y</ignoreMissingPath>
|
||||
<defaultPathLeafToNull>Y</defaultPathLeafToNull>
|
||||
<rownum_field/>
|
||||
<file>
|
||||
<name>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/checkpoints/state_job_citizen_address.json</name>
|
||||
<filemask/>
|
||||
<exclude_filemask/>
|
||||
<file_required>N</file_required>
|
||||
<include_subfolders>N</include_subfolders>
|
||||
</file>
|
||||
<fields>
|
||||
<field>
|
||||
<name>pipeline</name>
|
||||
<path>$.pipeline</path>
|
||||
<type>String</type>
|
||||
<format/>
|
||||
<currency/>
|
||||
<decimal/>
|
||||
<group/>
|
||||
<length>-1</length>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<repeat>N</repeat>
|
||||
</field>
|
||||
<field>
|
||||
<name>status</name>
|
||||
<path>$.status</path>
|
||||
<type>String</type>
|
||||
<format/>
|
||||
<currency/>
|
||||
<decimal/>
|
||||
<group/>
|
||||
<length>-1</length>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<repeat>N</repeat>
|
||||
</field>
|
||||
</fields>
|
||||
<limit>0</limit>
|
||||
<IsInFields>N</IsInFields>
|
||||
<IsAFile>N</IsAFile>
|
||||
<valueField/>
|
||||
<shortFileFieldName/>
|
||||
<pathFieldName/>
|
||||
<hiddenFieldName/>
|
||||
<lastModificationTimeFieldName/>
|
||||
<uriNameFieldName/>
|
||||
<rootUriNameFieldName/>
|
||||
<extensionFieldName/>
|
||||
<sizeFieldName/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>528</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Set variables</name>
|
||||
<type>SetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<field_name>pipeline</field_name>
|
||||
<variable_name>PIPE</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
<field>
|
||||
<field_name>status</field_name>
|
||||
<variable_name>STATUS</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
</fields>
|
||||
<use_formatting>Y</use_formatting>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(job_name, 'job_citizen_address_delta') AS PIPELINE,
|
||||
COALESCE(status, 'ERROR') AS STATUS,
|
||||
current_timestamp::timestamp as record_created
|
||||
FROM (
|
||||
select
|
||||
CASE
|
||||
WHEN status = 'PROCESSING' THEN 'ERROR'
|
||||
ELSE status
|
||||
END AS status,
|
||||
job_name
|
||||
from public.etl_checkpoints
|
||||
where job_name = 'job_citizen_address_delta'
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT NULL, NULL
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM public.etl_checkpoints
|
||||
WHERE job_name = 'job_citizen_address_delta'
|
||||
)
|
||||
) t</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Write to log</name>
|
||||
<type>WriteToLog</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<displayHeader>Y</displayHeader>
|
||||
<fields>
|
||||
<field>
|
||||
<name>pipeline</name>
|
||||
</field>
|
||||
<field>
|
||||
<name>status</name>
|
||||
</field>
|
||||
</fields>
|
||||
<limitRows>N</limitRows>
|
||||
<limitRowsNumber>0</limitRowsNumber>
|
||||
<loglevel>Basic</loglevel>
|
||||
<logmessage>${PIPE}
|
||||
${STATUS}</logmessage>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_to_processing_delta</name>
|
||||
<name>check_if_need_to_repeat_job</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -13,22 +13,22 @@
|
|||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 13:42:26.494</created_date>
|
||||
<created_date>2025/08/08 12:27:51.630</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 13:42:26.494</modified_date>
|
||||
<modified_date>2025/08/08 12:27:51.630</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<to>Set variables</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Set variables</name>
|
||||
<type>SetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -37,37 +37,18 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<fields>
|
||||
<field>
|
||||
<field_name>need_to_repeat_job</field_name>
|
||||
<variable_name>NEED_TO_REPEAT_JOB</variable_name>
|
||||
<variable_type>ROOT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
</fields>
|
||||
<use_formatting>Y</use_formatting>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1248</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>624</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -84,16 +65,19 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
'PROCESSING' AS status,
|
||||
'delta_citizen_address' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints</sql>
|
||||
<sql>SELECT EXISTS (SELECT 1
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'citizen_address_job'
|
||||
where je.status is null or je.status in ('ERROR', 'PROCESSING')
|
||||
limit 1
|
||||
) as need_to_repeat_job;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>336</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
@ -1,250 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow1_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
SELECT
|
||||
'citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,250 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow1_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
SELECT
|
||||
'citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,254 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow2_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1,
|
||||
*/
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,254 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow2_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
--MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
--(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1,
|
||||
*/
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow3_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow3_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow4_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow4_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
*/
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1--,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4--,
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
*/
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
/*
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
*/
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow5_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_citizen_address_flow5_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 09:14:18.787</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 09:14:18.787</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_recruitment_id</name>
|
||||
<rename>last_recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_created_date</name>
|
||||
<rename>recruitment_created_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen cit
|
||||
join ervu_dashboard.citizen_address ch on ch.recruit_id = cit.recruit_id
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
/*
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4--,
|
||||
*/
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
/*
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
*/
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
/*
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
*/
|
||||
SELECT
|
||||
'citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow1_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow1' as job_name,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow1_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow1' as job_name,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow2_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow2' as job_name,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow2_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow2' as job_name,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow3_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow3' as job_name,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow3_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow3' as job_name,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow4_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow4' as job_name,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow4_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow4' as job_name,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow5_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow5' as job_name,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_delta_citizen_address_flow5_success</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/16 12:20:06.191</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/16 12:20:06.191</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
'delta_citizen_address_flow5' as job_name,
|
||||
'SUCCESS' as status,
|
||||
current_timestamp as record_created
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>change_status_to_processing</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/11 16:14:31.162</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/11 16:14:31.162</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
'PROCESSING' AS status,
|
||||
'job_citizen_address' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'PROCESSING' AS status,
|
||||
'citizen_address_flow1' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'PROCESSING' AS status,
|
||||
'citizen_address_flow2' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'PROCESSING' AS status,
|
||||
'citizen_address_flow3' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'PROCESSING' AS status,
|
||||
'citizen_address_flow4' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT
|
||||
'PROCESSING' AS status,
|
||||
'citizen_address_flow5' AS job_name,
|
||||
current_timestamp AS record_created
|
||||
--FROM public.etl_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>368</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>check_if_job_citizen_address_address_exists</name>
|
||||
<name>check_if_citizen_address_job_exists</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
|
|
@ -13,23 +13,23 @@
|
|||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/11 15:20:18.267</created_date>
|
||||
<created_date>2025/08/05 13:28:46.661</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/11 15:20:18.267</modified_date>
|
||||
<modified_date>2025/08/05 13:28:46.661</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Set variables</from>
|
||||
<to>Write to log</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Set variables</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Set variables</name>
|
||||
|
|
@ -44,21 +44,16 @@
|
|||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<field_name>job_name</field_name>
|
||||
<variable_name>PIPE</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
<field>
|
||||
<field_name>status</field_name>
|
||||
<variable_name>STATUS</variable_name>
|
||||
<field_name>job_executed_flag</field_name>
|
||||
<variable_name>JOB_EXECUTED_FLAG</variable_name>
|
||||
<variable_type>PARENT_WORKFLOW</variable_type>
|
||||
</field>
|
||||
</fields>
|
||||
<use_formatting>Y</use_formatting>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>672</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -75,29 +70,17 @@
|
|||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(job_name, 'job_citizen_address') AS job_name,
|
||||
COALESCE(status, 'NEW') AS status,
|
||||
current_timestamp::timestamp as record_created
|
||||
FROM (
|
||||
SELECT job_name, status
|
||||
FROM public.etl_checkpoints
|
||||
WHERE job_name = 'job_citizen_address'
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT NULL, NULL
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM public.etl_checkpoints
|
||||
WHERE job_name = 'job_citizen_address'
|
||||
)
|
||||
) t</sql>
|
||||
<sql>SELECT EXISTS (
|
||||
SELECT 1
|
||||
FROM etl.job_execution
|
||||
WHERE job_name = 'citizen_address_job'
|
||||
limit 1
|
||||
) AS job_executed_flag;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>384</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -111,17 +94,17 @@ FROM (
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<loglevel>Basic</loglevel>
|
||||
<displayHeader>Y</displayHeader>
|
||||
<fields>
|
||||
</fields>
|
||||
<limitRows>N</limitRows>
|
||||
<limitRowsNumber>0</limitRowsNumber>
|
||||
<loglevel>Basic</loglevel>
|
||||
<logmessage>${STATUS}</logmessage>
|
||||
<fields>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>960</xloc>
|
||||
<yloc>240</yloc>
|
||||
<xloc>944</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
@ -1,272 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>checkpoint_citizen_address_address_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 15:39:31.759</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 15:39:31.759</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Select values</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>idm_id</name>
|
||||
<rename>idm_id</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>560</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num
|
||||
FROM ordered
|
||||
),
|
||||
flow_ranges AS (
|
||||
SELECT
|
||||
flow_num,
|
||||
MIN(created_at) AS min_date,
|
||||
MAX(created_at) AS max_date
|
||||
FROM splitted
|
||||
GROUP BY flow_num
|
||||
),
|
||||
recr_inf AS (
|
||||
SELECT DISTINCT COALESCE(recruitment_id, target_recruitment_id) AS idm_id
|
||||
FROM ervu_dashboard.citizen_address_address
|
||||
),
|
||||
flow_data AS (
|
||||
SELECT
|
||||
fr.flow_num,
|
||||
ri.idm_id,
|
||||
(SELECT r.created_at FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
AND r.created_at BETWEEN fr.min_date AND fr.max_date
|
||||
LIMIT 1) AS created_at
|
||||
FROM recr_inf ri
|
||||
CROSS JOIN flow_ranges fr
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM ervu_dashboard.recruitment r
|
||||
WHERE r.idm_id = ri.idm_id
|
||||
)
|
||||
),
|
||||
result_ma as (
|
||||
SELECT
|
||||
MAX(created_at) FILTER(WHERE flow_num = 1) AS cr_flow1,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 1 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow1,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 2) AS cr_flow2,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 2 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow2,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 3) AS cr_flow3,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 3 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow3,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 4) AS cr_flow4,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 4 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow4,
|
||||
|
||||
MAX(created_at) FILTER(WHERE flow_num = 5) AS cr_flow5,
|
||||
(SELECT idm_id FROM flow_data WHERE flow_num = 5 ORDER BY created_at DESC NULLS LAST LIMIT 1) AS idm_flow5
|
||||
FROM flow_data
|
||||
),
|
||||
result_max as ( --костыль
|
||||
SELECT
|
||||
CASE
|
||||
WHEN cr_flow1 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow1
|
||||
END AS cr_flow1,
|
||||
idm_flow1,
|
||||
CASE
|
||||
WHEN cr_flow2 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow2
|
||||
END AS cr_flow2,
|
||||
idm_flow2,
|
||||
CASE
|
||||
WHEN cr_flow3 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow3
|
||||
END AS cr_flow3,
|
||||
idm_flow3,
|
||||
CASE
|
||||
WHEN cr_flow4 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow4
|
||||
END AS cr_flow4,
|
||||
idm_flow4,
|
||||
CASE
|
||||
WHEN cr_flow5 is null THEN '0001-01-01 00:00:00'::timestamp
|
||||
ELSE cr_flow5
|
||||
END AS cr_flow5,
|
||||
idm_flow5
|
||||
FROM result_ma
|
||||
),
|
||||
for_checkpoints as (
|
||||
SELECT
|
||||
'job_citizen_address_flow1' as job_name,
|
||||
idm_flow1 as last_recruitment_id,
|
||||
cr_flow1 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow2' as job_name,
|
||||
idm_flow2 as last_recruitment_id,
|
||||
cr_flow2 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow3' as job_name,
|
||||
idm_flow3 as last_recruitment_id,
|
||||
cr_flow3 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow4' as job_name,
|
||||
idm_flow4 as last_recruitment_id,
|
||||
cr_flow4 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
|
||||
union all
|
||||
|
||||
SELECT
|
||||
'job_citizen_address_flow5' as job_name,
|
||||
idm_flow5 as last_recruitment_id,
|
||||
cr_flow5 as recruitment_created_date,
|
||||
'ERROR' as status,
|
||||
current_timestamp as record_created
|
||||
from result_max
|
||||
)
|
||||
select * from for_checkpoints</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>public</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>etl_checkpoints</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1264</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>checkpoint_job_citizen_address</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 14:19:02.590</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 14:19:02.590</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH status_check AS (
|
||||
SELECT
|
||||
bool_or(status = 'ERROR' AND job_name IN (
|
||||
'citizen_address_flow1',
|
||||
'citizen_address_flow2',
|
||||
'citizen_address_flow3',
|
||||
'citizen_address_flow4',
|
||||
'citizen_address_flow5'
|
||||
)) AS has_error,
|
||||
count(*) FILTER (
|
||||
WHERE status = 'SUCCESS' AND job_name IN (
|
||||
'citizen_address_flow1',
|
||||
'citizen_address_flow2',
|
||||
'citizen_address_flow3',
|
||||
'citizen_address_flow4',
|
||||
'citizen_address_flow5'
|
||||
)
|
||||
) = 5 AS all_success
|
||||
FROM public.etl_checkpoints
|
||||
)
|
||||
SELECT
|
||||
'job_citizen_address' as job_name,
|
||||
CASE
|
||||
WHEN has_error THEN 'ERROR'
|
||||
WHEN all_success THEN 'SUCCESS'
|
||||
ELSE 'ERROR'
|
||||
END AS status,
|
||||
current_timestamp AS record_created
|
||||
FROM status_check;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>checkpoint_job_citizen_address_delta</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 14:19:02.590</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 14:19:02.590</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>job_name</field>
|
||||
<name>job_name</name>
|
||||
</key>
|
||||
<schema>public</schema>
|
||||
<table>etl_checkpoints</table>
|
||||
<value>
|
||||
<name>job_name</name>
|
||||
<rename>job_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>record_created</name>
|
||||
<rename>record_created</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status</name>
|
||||
<rename>status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH status_check AS (
|
||||
SELECT
|
||||
bool_or(status = 'ERROR' AND job_name IN (
|
||||
'delta_citizen_address_flow1',
|
||||
'delta_citizen_address_flow2',
|
||||
'delta_citizen_address_flow3',
|
||||
'delta_citizen_address_flow4',
|
||||
'delta_citizen_address_flow5'
|
||||
)) AS has_error,
|
||||
count(*) FILTER (
|
||||
WHERE status = 'SUCCESS' AND job_name IN (
|
||||
'delta_citizen_address_flow1',
|
||||
'delta_citizen_address_flow2',
|
||||
'delta_citizen_address_flow3',
|
||||
'delta_citizen_address_flow4',
|
||||
'delta_citizen_address_flow5'
|
||||
)
|
||||
) = 5 AS all_success
|
||||
FROM public.etl_checkpoints
|
||||
)
|
||||
SELECT
|
||||
'job_citizen_address_delta' as job_name,
|
||||
CASE
|
||||
WHEN has_error THEN 'ERROR'
|
||||
WHEN all_success THEN 'SUCCESS'
|
||||
ELSE 'ERROR'
|
||||
END AS status,
|
||||
current_timestamp AS record_created
|
||||
FROM status_check;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -7,39 +7,68 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/05/21 14:05:02.260</created_date>
|
||||
<created_date>2025/08/05 14:31:22.799</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/05/21 14:05:02.260</modified_date>
|
||||
<modified_date>2025/08/05 14:31:22.799</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values 4 2</to>
|
||||
<enabled>N</enabled>
|
||||
<from>Create job execution record</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 2</from>
|
||||
<to>Get variables</to>
|
||||
<enabled>N</enabled>
|
||||
<from>Table output</from>
|
||||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Change job status on error</from>
|
||||
<to>Abort</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Detect empty stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Detect empty stream</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Filter rows</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<to>Identify last row in a stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Identify last row in a stream</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table output</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables</name>
|
||||
<type>GetVariable</type>
|
||||
<name>Abort</name>
|
||||
<type>Abort</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -48,25 +77,18 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>recruitment_id</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
<variable>ID_F1</variable>
|
||||
</field>
|
||||
</fields>
|
||||
<abort_option>ABORT_WITH_ERROR</abort_option>
|
||||
<always_log_rows>Y</always_log_rows>
|
||||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>976</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>704</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Change job status on error</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -75,82 +97,33 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<arguments>
|
||||
<argument>
|
||||
<name>error_description</name>
|
||||
</argument>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_address</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_address</name>
|
||||
<rename>factual_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_expiry_date</name>
|
||||
<rename>factual_info_expiry_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_received_date</name>
|
||||
<rename>factual_info_received_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_address</name>
|
||||
<rename>place_stay_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_deregistration_date</name>
|
||||
<rename>place_stay_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_date</name>
|
||||
<rename>place_stay_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_type</name>
|
||||
<rename>place_stay_registration_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_address</name>
|
||||
<rename>residence_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_deregistration_date</name>
|
||||
<rename>residence_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_registration_date</name>
|
||||
<rename>residence_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<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 = ?
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>944</xloc>
|
||||
<yloc>288</yloc>
|
||||
<xloc>832</xloc>
|
||||
<yloc>704</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 2</name>
|
||||
<type>SelectValues</type>
|
||||
<name>Change job status on success</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -159,37 +132,114 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>ID_F1</name>
|
||||
<rename>ID_F1</rename>
|
||||
<type>String</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask/>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<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'
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}'
|
||||
and status = 'PROCESSING';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>96</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Create job execution record</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>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>INSERT INTO etl.job_execution (id, job_name, status, execution_datetime, error_description, recruitment_id)
|
||||
VALUES (DEFAULT, '${JOB_NAME}', 'PROCESSING', DEFAULT, null, '${IDM_ID}');
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>240</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Detect empty stream</name>
|
||||
<type>DetectEmptyStream</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>96</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Filter rows</name>
|
||||
<type>FilterRows</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<compare>
|
||||
<condition>
|
||||
<conditions>
|
||||
</conditions>
|
||||
<function>=</function>
|
||||
<leftvalue>last_row</leftvalue>
|
||||
<negated>N</negated>
|
||||
<operator>-</operator>
|
||||
<value>
|
||||
<isnull>N</isnull>
|
||||
<length>-1</length>
|
||||
<name>constant</name>
|
||||
<precision>-1</precision>
|
||||
<text>Y</text>
|
||||
<type>Boolean</type>
|
||||
</value>
|
||||
</condition>
|
||||
</compare>
|
||||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
|
|
@ -198,7 +248,6 @@
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
ri.recruit_id::uuid,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS residence_address,
|
||||
|
|
@ -220,26 +269,121 @@ 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
|
||||
'${RECRUITMENT_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${RECRUITMENT_ID}'
|
||||
AND '${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
||||
'${IDM_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
|
||||
GROUP BY ri.recruit_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>288</yloc>
|
||||
<xloc>464</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
<field>
|
||||
<column_name>recruit_id</column_name>
|
||||
<stream_name>recruit_id</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>residence_address</column_name>
|
||||
<stream_name>residence_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>residence_registration_date</column_name>
|
||||
<stream_name>residence_registration_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>residence_deregistration_date</column_name>
|
||||
<stream_name>residence_deregistration_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>place_stay_address</column_name>
|
||||
<stream_name>place_stay_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>place_stay_registration_date</column_name>
|
||||
<stream_name>place_stay_registration_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>place_stay_deregistration_date</column_name>
|
||||
<stream_name>place_stay_deregistration_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>place_stay_registration_type</column_name>
|
||||
<stream_name>place_stay_registration_type</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>factual_address</column_name>
|
||||
<stream_name>factual_address</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>factual_info_received_date</column_name>
|
||||
<stream_name>factual_info_received_date</stream_name>
|
||||
</field>
|
||||
<field>
|
||||
<column_name>factual_info_expiry_date</column_name>
|
||||
<stream_name>factual_info_expiry_date</stream_name>
|
||||
</field>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>Y</specify_fields>
|
||||
<table>citizen_address</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Identify last row in a stream</name>
|
||||
<type>DetectLastRow</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<resultfieldname>last_row</resultfieldname>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Select values 4 2</source_transform>
|
||||
<target_transform>Get variables</target_transform>
|
||||
<source_transform>Table output</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<descriptions_valuename>error_description</descriptions_valuename>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<codes_valuename>error_code</codes_valuename>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,403 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_address_flow_delta</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/08/11 13:22:56.048</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/08/11 13:22:56.048</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Create job execution record</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Detect empty stream</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Filter rows</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Change job status on error</from>
|
||||
<to>Abort</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Identify last row in a stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Identify last row in a stream</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Detect empty stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Abort</name>
|
||||
<type>Abort</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<abort_option>ABORT_WITH_ERROR</abort_option>
|
||||
<always_log_rows>Y</always_log_rows>
|
||||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</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 = ?
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>464</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'
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}'
|
||||
and status = 'DELTA_PROCESSING';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>16</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Create job execution record</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>N</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_PROCESSING',
|
||||
execution_datetime = DEFAULT,
|
||||
error_description = NULL
|
||||
where job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}';</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>128</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Detect empty stream</name>
|
||||
<type>DetectEmptyStream</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>16</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Filter rows</name>
|
||||
<type>FilterRows</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<compare>
|
||||
<condition>
|
||||
<conditions>
|
||||
</conditions>
|
||||
<function>=</function>
|
||||
<leftvalue>last_row</leftvalue>
|
||||
<negated>N</negated>
|
||||
<operator>-</operator>
|
||||
<value>
|
||||
<isnull>N</isnull>
|
||||
<length>-1</length>
|
||||
<name>constant</name>
|
||||
<precision>-1</precision>
|
||||
<text>Y</text>
|
||||
<type>Boolean</type>
|
||||
</value>
|
||||
</condition>
|
||||
</compare>
|
||||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Identify last row in a stream</name>
|
||||
<type>DetectLastRow</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<resultfieldname>last_row</resultfieldname>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>944</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_address</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_address</name>
|
||||
<rename>residence_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_registration_date</name>
|
||||
<rename>residence_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_deregistration_date</name>
|
||||
<rename>residence_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_address</name>
|
||||
<rename>place_stay_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_date</name>
|
||||
<rename>place_stay_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_deregistration_date</name>
|
||||
<rename>place_stay_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_type</name>
|
||||
<rename>place_stay_registration_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_address</name>
|
||||
<rename>factual_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_received_date</name>
|
||||
<rename>factual_info_received_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_expiry_date</name>
|
||||
<rename>factual_info_expiry_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<sql>SELECT
|
||||
ri.recruit_id::uuid,
|
||||
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 'В учреждении уголовно-исполнительной системы'
|
||||
ELSE NULL
|
||||
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;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Insert / update</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename>error_description</descriptions_valuename>
|
||||
<fields_valuename/>
|
||||
<codes_valuename>error_code</codes_valuename>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,417 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_address_flow_repeat</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/08/08 13:25:52.319</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/08/08 13:25:52.319</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Create job execution record</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Change job status on error</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Detect empty stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Detect empty stream</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Filter rows</from>
|
||||
<to>Change job status on success</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Change job status on error</from>
|
||||
<to>Abort</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update</from>
|
||||
<to>Identify last row in a stream</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Identify last row in a stream</from>
|
||||
<to>Filter rows</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Abort</name>
|
||||
<type>Abort</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<abort_option>ABORT_WITH_ERROR</abort_option>
|
||||
<always_log_rows>Y</always_log_rows>
|
||||
<row_threshold>0</row_threshold>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1232</xloc>
|
||||
<yloc>544</yloc>
|
||||
</GUI>
|
||||
</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 = ?
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>544</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'
|
||||
WHERE job_name = '${JOB_NAME}'
|
||||
and recruitment_id = '${IDM_ID}'
|
||||
and status = 'PROCESSING';
|
||||
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>16</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Create job execution record</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>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>INSERT INTO etl.job_execution (
|
||||
id,
|
||||
job_name,
|
||||
status,
|
||||
execution_datetime,
|
||||
error_description,
|
||||
recruitment_id
|
||||
)
|
||||
VALUES (
|
||||
DEFAULT,
|
||||
'${JOB_NAME}',
|
||||
'PROCESSING',
|
||||
DEFAULT,
|
||||
NULL,
|
||||
'${IDM_ID}'
|
||||
)
|
||||
ON CONFLICT (job_name, recruitment_id)
|
||||
DO UPDATE SET
|
||||
status = 'PROCESSING',
|
||||
execution_datetime = DEFAULT,
|
||||
error_description = NULL;</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>176</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Detect empty stream</name>
|
||||
<type>DetectEmptyStream</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>16</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Filter rows</name>
|
||||
<type>FilterRows</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<compare>
|
||||
<condition>
|
||||
<conditions>
|
||||
</conditions>
|
||||
<function>=</function>
|
||||
<leftvalue>last_row</leftvalue>
|
||||
<negated>N</negated>
|
||||
<operator>-</operator>
|
||||
<value>
|
||||
<isnull>N</isnull>
|
||||
<length>-1</length>
|
||||
<name>constant</name>
|
||||
<precision>-1</precision>
|
||||
<text>Y</text>
|
||||
<type>Boolean</type>
|
||||
</value>
|
||||
</condition>
|
||||
</compare>
|
||||
<send_true_to>Change job status on success</send_true_to>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Identify last row in a stream</name>
|
||||
<type>DetectLastRow</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<resultfieldname>last_row</resultfieldname>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>960</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_address</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_address</name>
|
||||
<rename>residence_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_registration_date</name>
|
||||
<rename>residence_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_deregistration_date</name>
|
||||
<rename>residence_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_address</name>
|
||||
<rename>place_stay_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_date</name>
|
||||
<rename>place_stay_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_deregistration_date</name>
|
||||
<rename>place_stay_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_type</name>
|
||||
<rename>place_stay_registration_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_address</name>
|
||||
<rename>factual_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_received_date</name>
|
||||
<rename>factual_info_received_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_expiry_date</name>
|
||||
<rename>factual_info_expiry_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<sql>SELECT
|
||||
ri.recruit_id::uuid,
|
||||
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 'В учреждении уголовно-исполнительной системы'
|
||||
ELSE NULL
|
||||
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;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Insert / update</source_transform>
|
||||
<target_transform>Change job status on error</target_transform>
|
||||
<is_enabled>Y</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename>error_description</descriptions_valuename>
|
||||
<fields_valuename/>
|
||||
<codes_valuename>error_code</codes_valuename>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>delta_citizen_address_flow</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/06/03 16:10:48.509</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/06/03 16:10:48.509</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_address</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_address</name>
|
||||
<rename>factual_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_expiry_date</name>
|
||||
<rename>factual_info_expiry_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>factual_info_received_date</name>
|
||||
<rename>factual_info_received_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_address</name>
|
||||
<rename>place_stay_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_deregistration_date</name>
|
||||
<rename>place_stay_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_date</name>
|
||||
<rename>place_stay_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>place_stay_registration_type</name>
|
||||
<rename>place_stay_registration_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_address</name>
|
||||
<rename>residence_address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_deregistration_date</name>
|
||||
<rename>residence_deregistration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residence_registration_date</name>
|
||||
<rename>residence_registration_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1040</xloc>
|
||||
<yloc>336</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>0</limit>
|
||||
<sql>SELECT
|
||||
ri.recruit_id::uuid,
|
||||
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 'В учреждении уголовно-исполнительной системы'
|
||||
ELSE NULL
|
||||
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
|
||||
'${RECRUITMENT_ID}' != ''
|
||||
AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${RECRUITMENT_ID}'
|
||||
AND'${M_R_CR_DATE}'::timestamp >= c.recruit_create_date
|
||||
AND c.update_date >= '${M_R_UP_DATE}'::timestamp
|
||||
GROUP BY ri.recruit_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_five_flow_delta</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/08/11 13:16:11.204</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/08/11 13:16:11.204</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_delta.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_delta.hpl 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_delta.hpl 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_delta.hpl 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_delta.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'citizen_address_job'
|
||||
where je.status in ('SUCCESS', 'DELTA_ERROR', 'DELTA_SUCCESS', 'DELTA_PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_delta.hpl</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_delta.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>128</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_delta.hpl 2</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_delta.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_delta.hpl 3</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_delta.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_delta.hpl 4</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_delta.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_delta.hpl 5</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_delta.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,360 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_five_flow_on_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/08/05 12:54:50.126</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/08/05 12:54:50.126</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_repeat.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_repeat.hpl 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_repeat.hpl 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_repeat.hpl 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>citizen_address_flow_repeat.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
r.idm_id as recruitment_id
|
||||
FROM ervu_dashboard.recruitment r
|
||||
LEFT JOIN etl.job_execution je
|
||||
ON r.idm_id = je.recruitment_id
|
||||
and job_name = 'citizen_address_job'
|
||||
where je.status is null or je.status in('ERROR', 'PROCESSING');</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>272</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_repeat.hpl</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_repeat.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_repeat.hpl 2</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_repeat.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_repeat.hpl 3</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_repeat.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_repeat.hpl 4</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_repeat.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow_repeat.hpl 5</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow_repeat.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment_id</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>528</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_rows_five_flow_if_error</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/05/23 14:28:22.572</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/05/23 14:28:22.572</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>880</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
fr_check AS (
|
||||
SELECT
|
||||
last_recruitment_id AS recruitment_id,
|
||||
recruitment_created_date,
|
||||
status,
|
||||
job_name
|
||||
FROM public.etl_checkpoints
|
||||
WHERE status = 'ERROR' AND job_name IN ('citizen_address_flow1', 'citizen_address_flow2', 'citizen_address_flow3', 'citizen_address_flow4', 'citizen_address_flow5')
|
||||
),
|
||||
ordered AS (
|
||||
SELECT
|
||||
idm_id,
|
||||
created_at,
|
||||
ROW_NUMBER() OVER (ORDER BY created_at) AS rn,
|
||||
COUNT(*) OVER () AS total_rows
|
||||
FROM ervu_dashboard.recruitment
|
||||
),
|
||||
splitted AS (
|
||||
SELECT *,
|
||||
CEIL(total_rows / 5.0) AS part_size,
|
||||
FLOOR((rn - 1) / CEIL(total_rows / 5.0)) + 1 AS flow_num,
|
||||
((rn - 1) % CEIL(total_rows / 5.0)) + 1 AS position
|
||||
FROM ordered
|
||||
),
|
||||
pivoted AS (
|
||||
SELECT
|
||||
position,
|
||||
MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow1') THEN created_at END) AS cr_flow1,
|
||||
MAX(CASE WHEN flow_num = 1 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow1') THEN idm_id::text END) AS idm_flow1,
|
||||
MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow2') THEN created_at END) AS cr_flow2,
|
||||
MAX(CASE WHEN flow_num = 2 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow2') THEN idm_id::text END) AS idm_flow2,
|
||||
MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow3') THEN created_at END) AS cr_flow3,
|
||||
MAX(CASE WHEN flow_num = 3 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow3') THEN idm_id::text END) AS idm_flow3,
|
||||
MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow4') THEN created_at END) AS cr_flow4,
|
||||
MAX(CASE WHEN flow_num = 4 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow4') THEN idm_id::text END) AS idm_flow4,
|
||||
MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow5') THEN created_at END) AS cr_flow5,
|
||||
MAX(CASE WHEN flow_num = 5 AND created_at >= (SELECT recruitment_created_date FROM fr_check WHERE job_name = 'citizen_address_flow5') THEN idm_id::text END) AS idm_flow5
|
||||
FROM splitted
|
||||
GROUP BY position
|
||||
),
|
||||
remains as (
|
||||
SELECT
|
||||
position,
|
||||
cr_flow1,
|
||||
idm_flow1::uuid,
|
||||
cr_flow2,
|
||||
idm_flow2::uuid,
|
||||
cr_flow3,
|
||||
idm_flow3::uuid,
|
||||
cr_flow4,
|
||||
idm_flow4::uuid,
|
||||
cr_flow5,
|
||||
idm_flow5::uuid
|
||||
FROM pivoted
|
||||
WHERE (cr_flow1 IS NOT NULL AND idm_flow1 IS NOT NULL)
|
||||
OR (cr_flow2 IS NOT NULL AND idm_flow2 IS NOT NULL)
|
||||
OR (cr_flow3 IS NOT NULL AND idm_flow3 IS NOT NULL)
|
||||
OR (cr_flow4 IS NOT NULL AND idm_flow4 IS NOT NULL)
|
||||
OR (cr_flow5 IS NOT NULL AND idm_flow5 IS NOT NULL)
|
||||
order by position
|
||||
),
|
||||
idm1 as (
|
||||
select
|
||||
cr_flow1,
|
||||
idm_flow1
|
||||
from remains
|
||||
where cr_flow1 is not null and idm_flow1 is not null
|
||||
),
|
||||
idm2 as (
|
||||
select
|
||||
cr_flow2,
|
||||
idm_flow2
|
||||
from remains
|
||||
where cr_flow2 is not null and idm_flow2 is not null
|
||||
),
|
||||
idm3 as (
|
||||
select
|
||||
cr_flow3,
|
||||
idm_flow3
|
||||
from remains
|
||||
where cr_flow3 is not null and idm_flow3 is not null
|
||||
),
|
||||
idm4 as (
|
||||
select
|
||||
cr_flow4,
|
||||
idm_flow4
|
||||
from remains
|
||||
where cr_flow4 is not null and idm_flow4 is not null
|
||||
),
|
||||
idm5 as (
|
||||
select
|
||||
cr_flow5,
|
||||
idm_flow5
|
||||
from remains
|
||||
where cr_flow5 is not null and idm_flow5 is not null
|
||||
)
|
||||
select
|
||||
i1.*,
|
||||
i2.*,
|
||||
i3.*,
|
||||
i4.*,
|
||||
i5.*
|
||||
FROM
|
||||
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm1) i1
|
||||
FULL OUTER JOIN
|
||||
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm2) i2 ON i1.rn = i2.rn
|
||||
FULL OUTER JOIN
|
||||
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm3) i3 ON i1.rn = i3.rn
|
||||
FULL OUTER JOIN
|
||||
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm4) i4 ON i1.rn = i4.rn
|
||||
FULL OUTER JOIN
|
||||
(SELECT *, ROW_NUMBER() OVER () as rn FROM idm5) i5 ON i1.rn = i5.rn
|
||||
ORDER BY COALESCE(i1.rn, i2.rn, i3.rn, i4.rn, i5.rn)
|
||||
limit 2</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,356 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitments_five_flow</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/04/18 09:48:01.970</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/04/18 09:48:01.970</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get all recruitments ordered by created_date</from>
|
||||
<to>citizen_address_flow.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get all recruitments ordered by created_date</from>
|
||||
<to>citizen_address_flow.hpl 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get all recruitments ordered by created_date</from>
|
||||
<to>citizen_address_flow.hpl 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get all recruitments ordered by created_date</from>
|
||||
<to>citizen_address_flow.hpl 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get all recruitments ordered by created_date</from>
|
||||
<to>citizen_address_flow.hpl 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get all recruitments ordered by created_date</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
idm_id AS recruitment
|
||||
FROM ervu_dashboard.recruitment;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow.hpl</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>144</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow.hpl 2</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow.hpl 3</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow.hpl 4</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>citizen_address_flow.hpl 5</name>
|
||||
<type>PipelineExecutor</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<run_configuration>local</run_configuration>
|
||||
<filename>${PROJECT_HOME}/info_recruits/citizen_tables/citizen_address/parallel/citizen_address_flow.hpl</filename>
|
||||
<filenameInField>N</filenameInField>
|
||||
<filenameField/>
|
||||
<group_size>1</group_size>
|
||||
<group_field/>
|
||||
<group_time/>
|
||||
<parameters>
|
||||
<variable_mapping>
|
||||
<variable>IDM_ID</variable>
|
||||
<field>recruitment</field>
|
||||
<input/>
|
||||
</variable_mapping>
|
||||
<variable_mapping>
|
||||
<variable>JOB_NAME</variable>
|
||||
<field/>
|
||||
<input>citizen_address_job</input>
|
||||
</variable_mapping>
|
||||
<inherit_all_vars>Y</inherit_all_vars>
|
||||
</parameters>
|
||||
<execution_result_target_transform/>
|
||||
<execution_time_field>ExecutionTime</execution_time_field>
|
||||
<execution_result_field>ExecutionResult</execution_result_field>
|
||||
<execution_errors_field>ExecutionNrErrors</execution_errors_field>
|
||||
<execution_lines_read_field>ExecutionLinesRead</execution_lines_read_field>
|
||||
<execution_lines_written_field>ExecutionLinesWritten</execution_lines_written_field>
|
||||
<execution_lines_input_field>ExecutionLinesInput</execution_lines_input_field>
|
||||
<execution_lines_output_field>ExecutionLinesOutput</execution_lines_output_field>
|
||||
<execution_lines_rejected_field>ExecutionLinesRejected</execution_lines_rejected_field>
|
||||
<execution_lines_updated_field>ExecutionLinesUpdated</execution_lines_updated_field>
|
||||
<execution_lines_deleted_field>ExecutionLinesDeleted</execution_lines_deleted_field>
|
||||
<execution_files_retrieved_field>ExecutionFilesRetrieved</execution_files_retrieved_field>
|
||||
<execution_exit_status_field>ExecutionExitStatus</execution_exit_status_field>
|
||||
<execution_log_text_field>ExecutionLogText</execution_log_text_field>
|
||||
<execution_log_channelid_field>ExecutionLogChannelId</execution_log_channelid_field>
|
||||
<result_rows_target_transform/>
|
||||
<result_files_target_transform/>
|
||||
<result_files_file_name_field>FileName</result_files_file_name_field>
|
||||
<executors_output_transform/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
Loading…
Add table
Add a link
Reference in a new issue