This commit is contained in:
Ruslan 2025-02-11 11:10:40 +03:00
parent b027efce98
commit 765b557f6a
41 changed files with 3445 additions and 1474 deletions

View file

@ -195,6 +195,16 @@ WHERE recording_date = current_date
<rename>schema</rename>
<update>N</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>Y</update>
</value>
<value>
<name>convicts_percent</name>
<rename>convicts_percent</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -271,62 +281,167 @@ WHERE recording_date = current_date
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
<sql>WITH
a AS (
SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) &gt; 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered,
'Ministry' AS schema
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema = 'Region'
AND "all_M_W" IN ('M', 'W')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered
),
a2 AS (
SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema = 'Region'
AND "all_M_W" = 'ALL'
AND recording_date = CURRENT_DATE
GROUP BY registered
)
AND schema = 'Region'
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered;</sql>
SELECT
a.study,
a.work,
a.convicts,
a.study_percent,
a.work_percent,
a.not_work,
a.not_work_percent,
a.total_people,
a.recruitment_id,
a.gender,
a.registered,
'Ministry' AS schema,
COALESCE(
CASE
WHEN a2.convicts > 0
THEN ROUND((a.convicts / a2.convicts * 100), 2)
ELSE 0
END,
0
) AS convicts_percent
FROM a
LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered
UNION ALL
SELECT
a2.study,
a2.work,
a2.convicts,
a2.study_percent,
a2.work_percent,
a2.not_work,
a2.not_work_percent,
a2.total_people,
a2.recruitment_id,
'ALL' AS gender,
a2.registered,
'Ministry' AS schema,
0 AS convicts_percent
FROM a2</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -23,12 +23,12 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
<enabled>Y</enabled>
</hop>
</order>
<transform>
@ -49,6 +49,13 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>full_name</field>
<name>full_name</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -80,7 +87,7 @@
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
<update>N</update>
</value>
<value>
<name>kinship_type</name>
@ -113,6 +120,7 @@
(select jsonb_array_elements(ri.info->'svedDeti'->'rebenok') ch,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array')
select
r.id::uuid recruit_id,
@ -129,8 +137,10 @@ select
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->'dataRozhdDok'->>'nomerZapis' birth_az_number
from public.recruits r
join child on r.id = child.recruit_id</sql>
<variables_active>N</variables_active>
join child on r.id = child.recruit_id
where
r.system_update_date >= '${UP_D}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>400</xloc>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizen_foreign</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,14 +23,132 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</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>
<key>
<condition>=</condition>
<field>citizenship_date</field>
<name>citizenship_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizenship_foreign</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>citizenship_date</name>
<rename>citizenship_date</rename>
<update>N</update>
</value>
<value>
<name>country_name</name>
<rename>country_name</rename>
<update>Y</update>
</value>
<value>
<name>citizenship_basis</name>
<rename>citizenship_basis</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>residense_right_date</field>
<name>residense_right_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>citizenship_foreign</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>residense_right_date</name>
<rename>residense_right_date</rename>
<update>N</update>
</value>
<value>
<name>country_name</name>
<rename>country_name</rename>
<update>Y</update>
</value>
<value>
<name>residense_right_basis</name>
<rename>residense_right_basis</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -45,10 +161,13 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with citizen as
(select jsonb_array_elements(ri.info->'svedIGPP'->'svedIG') cit,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedIGPP'->'svedIG') = 'array')
select
r.id recruit_id,
@ -56,18 +175,13 @@ select
cit->>'osnovPriobrIG' citizenship_basis,
to_date(cit->>'dataPriobrIG', 'YYYY-MM-DD') citizenship_date
from public.recruits r
join citizen on r.id = citizen.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join citizen on r.id = citizen.recruit_id
WHERE r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -82,10 +196,13 @@ join citizen on r.id = citizen.recruit_id;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with citizen as
(select jsonb_array_elements(ri.info->'svedIGPP'->'svedPP') cit,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedIGPP'->'svedPP') = 'array')
select
r.id recruit_id,
@ -93,18 +210,13 @@ select
cit->>'osnovPriobrPP' residense_right_basis,
to_date(cit->>'dataPriobrPP', 'YYYY-MM-DD') residense_right_date
from public.recruits r
join citizen on r.id = citizen.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join citizen on r.id = citizen.recruit_id
WHERE r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>304</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -118,31 +230,27 @@ join citizen on r.id = citizen.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>citizenship_foreign</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>citizenship_foreign</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<yloc>48</yloc>
</GUI>
</transform>
<transform>
@ -156,31 +264,27 @@ join citizen on r.id = citizen.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>citizenship_foreign</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>citizenship_foreign</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<yloc>512</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>citizenship</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,9 +23,88 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<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>citizenship</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>acquiring_authority</name>
<rename>acquiring_authority</rename>
<update>Y</update>
</value>
<value>
<name>acquiring_basis</name>
<rename>acquiring_basis</rename>
<update>Y</update>
</value>
<value>
<name>acquiring_date</name>
<rename>acquiring_date</rename>
<update>Y</update>
</value>
<value>
<name>acquiring_number</name>
<rename>acquiring_number</rename>
<update>Y</update>
</value>
<value>
<name>renunciation_authority</name>
<rename>renunciation_authority</rename>
<update>Y</update>
</value>
<value>
<name>renunciation_basis</name>
<rename>renunciation_basis</rename>
<update>Y</update>
</value>
<value>
<name>renunciation_date</name>
<rename>renunciation_date</rename>
<update>Y</update>
</value>
<value>
<name>renunciation_number</name>
<rename>renunciation_number</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -40,6 +117,8 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select r.id recruit_id,
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis,
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number,
@ -50,20 +129,16 @@ ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number,
to_date(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)
and r.system_update_date >= '${UP_D}'
</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>432</xloc>
<yloc>224</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -77,31 +152,27 @@ where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>citizenship</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>citizenship</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>224</yloc>
<draw>Y</draw>
<yloc>352</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -23,16 +23,21 @@
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</to>
<enabled>Y</enabled>
</hop>
</order>
@ -55,6 +60,11 @@
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>deputy</field>
<name>deputy</name>
</key>
<schema>ervu_dashboard</schema>
<table>deputy</table>
<value>
@ -77,12 +87,76 @@
<rename>period_office</rename>
<update>Y</update>
</value>
<value>
<name>deputy</name>
<rename>deputy</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>160</yloc>
<xloc>688</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>deputy</field>
<name>deputy</name>
</key>
<schema>ervu_dashboard</schema>
<table>deputy</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>end_date</name>
<rename>end_date</rename>
<update>Y</update>
</value>
<value>
<name>information</name>
<rename>information</rename>
<update>Y</update>
</value>
<value>
<name>period_office</name>
<rename>period_office</rename>
<update>Y</update>
</value>
<value>
<name>deputy</name>
<rename>deputy</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>320</yloc>
</GUI>
</transform>
<transform>
@ -102,11 +176,13 @@
<sql>select r.id recruit_id,
ri.info->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
to_date(ri.info->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information,
true deputy
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null;</sql>
<variables_active>N</variables_active>
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null
AND r.system_update_date >= '${UP_D}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
@ -132,9 +208,10 @@ to_date(ri.info->'svedKandidat'->'kandidat'->>'dataSnyatiyaKandidatury', 'YYYY-M
ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
false deputy
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql>
<variables_active>N</variables_active>
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null
AND r.system_update_date >= '${UP_D}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>432</xloc>
@ -171,8 +248,8 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>800</xloc>
<yloc>224</yloc>
<xloc>688</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -205,8 +282,8 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>800</xloc>
<yloc>320</yloc>
<xloc>688</xloc>
<yloc>448</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>disability</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,14 +23,147 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>disability</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>confirmation_date</name>
<rename>confirmation_date</rename>
<update>Y</update>
</value>
<value>
<name>disability</name>
<rename>disability</rename>
<update>Y</update>
</value>
<value>
<name>disability_group</name>
<rename>disability_group</rename>
<update>Y</update>
</value>
<value>
<name>organization_name</name>
<rename>organization_name</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>disability</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>organization_name</name>
<rename>organization_name</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>432</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -45,6 +176,8 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select
r.id recruit_id,
case when ri.info->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
@ -59,18 +192,14 @@
true disability
from public.recruits r
join public.recruits_info ri on r.id = ri.recruit_id
where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null
and
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -85,6 +214,8 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select
r.id recruit_id,
ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name,
@ -92,18 +223,14 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date
from public.recruits r
join public.recruits_info ri on r.id = ri.recruit_id
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null
and
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>304</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -117,31 +244,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>disability</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>disability</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
@ -155,31 +278,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>disability</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>disability</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<yloc>496</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>disease</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,9 +23,68 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<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>
<key>
<condition>=</condition>
<field>reg_date</field>
<name>reg_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>disease</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>code</name>
<rename>code</rename>
<update>Y</update>
</value>
<value>
<name>name</name>
<rename>name</rename>
<update>Y</update>
</value>
<value>
<name>reg_date</name>
<rename>reg_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -40,29 +97,29 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with zdorov as
(select jsonb_array_elements(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
select
r.id recruit_id,
z->>'kodZabol' code,
z->>'naimZabol' name,
to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date
--registered - поставлен на учет по заболеванию
from public.recruits r
join zdorov on r.id = zdorov.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join zdorov on r.id = zdorov.recruit_id
where
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -76,31 +133,27 @@ join zdorov on r.id = zdorov.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>disease</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>disease</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>464</xloc>
<yloc>64</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>drivers_licence</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,14 +23,187 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</to>
<enabled>Y</enabled>
</hop>
<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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>tractor_driver</field>
<name>tractor_driver</name>
</key>
<schema>ervu_dashboard</schema>
<table>drivers_licence</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>categories</name>
<rename>categories</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>licence_number</name>
<rename>licence_number</rename>
<update>Y</update>
</value>
<value>
<name>licence_series</name>
<rename>licence_series</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>tractor_driver</name>
<rename>tractor_driver</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>tractor_driver</field>
<name>tractor_driver</name>
</key>
<schema>ervu_dashboard</schema>
<table>drivers_licence</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>categories</name>
<rename>categories</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>licence_number</name>
<rename>licence_number</rename>
<update>Y</update>
</value>
<value>
<name>licence_series</name>
<rename>licence_series</rename>
<update>Y</update>
</value>
<value>
<name>replacement_date</name>
<rename>replacement_date</rename>
<update>Y</update>
</value>
<value>
<name>return_date</name>
<rename>return_date</rename>
<update>Y</update>
</value>
<value>
<name>seizure_date</name>
<rename>seizure_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>tractor_driver</name>
<rename>tractor_driver</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>416</xloc>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -45,8 +216,11 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select
r.id recruit_id,
false as tractor_driver,
ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' licence_series,
ri.info->'svedVoditUdost'->'voditUdost'->>'nomVodUd' licence_number,
to_date(ri.info->'svedVoditUdost'->'voditUdost'->>'dataVodUd', 'YYYY-MM-DD') start_date,
@ -57,18 +231,14 @@
where jsonb_typeof(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
from public.recruits r
join public.recruits_info ri on r.id = ri.recruit_id
where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null
and
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -83,6 +253,8 @@ where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select
r.id recruit_id,
ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' licence_series,
@ -99,19 +271,14 @@ where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null;</sql>
true tractor_driver
from public.recruits r
join public.recruits_info ri on r.id = ri.recruit_id
where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null
AND r.system_update_date >= '${UP_D}';
</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<yloc>416</yloc>
</GUI>
</transform>
<transform>
@ -125,31 +292,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>drivers_licence</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>drivers_licence</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<yloc>64</yloc>
</GUI>
</transform>
<transform>
@ -163,31 +326,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>drivers_licence</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>drivers_licence</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<yloc>544</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>medical_authorities</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,14 +23,132 @@
<hop>
<from>Table input hiv</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input hiv</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>medical_authorities</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>hiv</name>
<rename>hiv</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>medical_authorities</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>change_date</name>
<rename>change_date</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>448</xloc>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2</name>
<type>TableInput</type>
@ -45,10 +161,13 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with uchet as
(select jsonb_array_elements(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
select
r.id recruit_id,
@ -56,18 +175,14 @@ select
u->>'dataSnyatUchet' close_date,
u->>'dataPlan' change_date
from public.recruits r
join uchet on r.id = uchet.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join uchet on r.id = uchet.recruit_id
where
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>352</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -82,10 +197,13 @@ join uchet on r.id = uchet.recruit_id;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with uchet as
(select jsonb_array_elements(ri.info->'svedUchetVICH'->'uchetVICH') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedUchetVICH'->'uchetVICH') = 'array')
select
r.id recruit_id,
@ -93,18 +211,14 @@ select
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
true HIV
from public.recruits r
join uchet on r.id = uchet.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join uchet on r.id = uchet.recruit_id
where
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -118,31 +232,27 @@ join uchet on r.id = uchet.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>medical_authorities</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>medical_authorities</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
@ -156,31 +266,27 @@ join uchet on r.id = uchet.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>medical_authorities</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>medical_authorities</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>352</yloc>
<draw>Y</draw>
<xloc>432</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -98,6 +98,7 @@
(select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array')
select
r.id recruit_id,
@ -106,7 +107,7 @@ select
ch->'fioOpek'->>'otchestvo') full_name,
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'dataRozhdDok'->&gt;'den','')::int) birth_date,
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
ch->>'snils' snils
from public.recruits r
join person on r.id = person.recruit_id
@ -138,14 +139,11 @@ r.system_update_date >= '${UP_D}'</sql>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_monthly>Y</partitioning_monthly>
<return_field/>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>citizen_guardianship</table>
<tablename_field/>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>passport</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,14 +23,172 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2</from>
<to>Insert / update 2</to>
<enabled>N</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>
<key>
<condition>=</condition>
<field>passport_number</field>
<name>passport_number</name>
</key>
<key>
<condition>=</condition>
<field>passport_series</field>
<name>passport_series</name>
</key>
<schema>ervu_dashboard</schema>
<table>passport</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>issue_date</name>
<rename>issue_date</rename>
<update>Y</update>
</value>
<value>
<name>organization_name</name>
<rename>organization_name</rename>
<update>Y</update>
</value>
<value>
<name>passport_number</name>
<rename>passport_number</rename>
<update>Y</update>
</value>
<value>
<name>passport_series</name>
<rename>passport_series</rename>
<update>Y</update>
</value>
<value>
<name>unit_code</name>
<rename>unit_code</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>passport_number</field>
<name>passport_number</name>
</key>
<key>
<condition>=</condition>
<field>passport_series</field>
<name>passport_series</name>
</key>
<schema>ervu_dashboard</schema>
<table>passport</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>actual</name>
<rename>actual</rename>
<update>Y</update>
</value>
<value>
<name>issue_date</name>
<rename>issue_date</rename>
<update>Y</update>
</value>
<value>
<name>organization_name</name>
<rename>organization_name</rename>
<update>Y</update>
</value>
<value>
<name>passport_number</name>
<rename>passport_number</rename>
<update>Y</update>
</value>
<value>
<name>passport_series</name>
<rename>passport_series</rename>
<update>Y</update>
</value>
<value>
<name>unit_code</name>
<rename>unit_code</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -45,6 +201,8 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select r.id recruit_id,
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number,
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series,
@ -55,19 +213,13 @@ case when ri.info->'pasportRF'->'aktPasportRF'->>'kodStatus'='1' then true
else false
end actual
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>416</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
@ -82,6 +234,8 @@ where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select r.id recruit_id,
ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number,
ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series,
@ -94,17 +248,11 @@ end actual
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>416</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
@ -118,31 +266,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>passport</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>passport</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>736</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
@ -156,31 +300,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>passport</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>passport</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>736</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>property</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,36 +16,54 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<from>Table input realty</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2</from>
<from>Table input ground_transportation</from>
<to>Table output 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input 2 2</from>
<from>Table input water_vehicles</from>
<to>Table output 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input air_vehicles</from>
<to>Table output 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input realty</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input 2 2 2</from>
<to>Table output 2 2 2</to>
<from>Table input air_vehicles</from>
<to>Insert / update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input ground_transportation</from>
<to>Insert / update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input water_vehicles</from>
<to>Insert / update 3</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Table input</name>
<type>TableInput</type>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
@ -54,36 +72,288 @@
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedON'->'on') u,
ri.recruit_id
from public.recruits_info ri
where jsonb_typeof(ri.info->'svedON'->'on') = 'array')
select
r.id recruit_id,
u->>'naimVidPrav' kind_right,
u->'adrObSob'->>'adrObSobTekst' address,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'realty' type_property
from public.recruits r
join prop on r.id = prop.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>address</name>
<rename>address</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>kind_right</name>
<rename>kind_right</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>480</xloc>
<xloc>720</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
<name>Table input 2</name>
<name>Insert / update 2</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>vehicle_category</name>
<rename>vehicle_category</rename>
<update>Y</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 3</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>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>vehicle_category</name>
<rename>vehicle_category</rename>
<update>Y</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 4</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>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>brand_model</name>
<rename>brand_model</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>issue_year</name>
<rename>issue_year</rename>
<update>Y</update>
</value>
<value>
<name>reg_plate</name>
<rename>reg_plate</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
<value>
<name>vin</name>
<rename>vin</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input air_vehicles</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
@ -94,10 +364,50 @@ join prop on r.id = prop.recruit_id;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array')
select
r.id recruit_id,
u->>'naimVid' vehicle_type,
u->>'naznKat' vehicle_category,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'air_vehicles' type_property
from public.recruits r
join prop on r.id = prop.recruit_id
WHERE r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>464</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Table input ground_transportation</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedNazTS'->'nazTS') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedNazTS'->'nazTS') = 'array')
select
r.id recruit_id,
@ -110,22 +420,17 @@ select
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'ground_transportation' type_property
from public.recruits r
join prop on r.id = prop.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join prop on r.id = prop.recruit_id
WHERE r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>480</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>928</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2 2</name>
<name>Table input realty</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
@ -136,35 +441,34 @@ join prop on r.id = prop.recruit_id;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u,
(select jsonb_array_elements(ri.info->'svedON'->'on') u,
ri.recruit_id
from public.recruits_info ri
where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array')
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedON'->'on') = 'array')
select
r.id recruit_id,
u->>'naimVid' vehicle_type,
u->>'naznKat' vehicle_category,
u->>'naimVidPrav' kind_right,
u->'adrObSob'->>'adrObSobTekst' address,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'air_vehicles' type_property
'realty' type_property
from public.recruits r
join prop on r.id = prop.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join prop on r.id = prop.recruit_id
where
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>480</xloc>
<yloc>384</yloc>
<draw>Y</draw>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input 2 2 2</name>
<name>Table input water_vehicles</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
@ -175,31 +479,29 @@ join prop on r.id = prop.recruit_id;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u,
(select jsonb_array_elements(ri.info->'svedVodTS'->'vodTS') u,
ri.recruit_id
from public.recruits_info ri
where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array')
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedVodTS'->'vodTS') = 'array')
select
r.id recruit_id,
u->>'naimVid' vehicle_type,
u->>'naznKat' vehicle_category,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'air_vehicles' type_property
'water_vehicles' type_property
from public.recruits r
join prop on r.id = prop.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join prop on r.id = prop.recruit_id
WHERE r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>480</xloc>
<yloc>464</yloc>
<draw>Y</draw>
<xloc>928</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
@ -213,31 +515,27 @@ join prop on r.id = prop.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>property</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>688</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
@ -251,31 +549,27 @@ join prop on r.id = prop.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>property</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>688</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>1136</xloc>
<yloc>96</yloc>
</GUI>
</transform>
<transform>
@ -289,31 +583,27 @@ join prop on r.id = prop.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>property</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>688</xloc>
<yloc>384</yloc>
<draw>Y</draw>
<xloc>1152</xloc>
<yloc>576</yloc>
</GUI>
</transform>
<transform>
@ -327,31 +617,27 @@ join prop on r.id = prop.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>property</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>688</xloc>
<yloc>464</yloc>
<draw>Y</draw>
<xloc>672</xloc>
<yloc>576</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>prosecution</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,9 +23,85 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<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>
<name2/>
</key>
<key>
<condition>=</condition>
<field>create_date</field>
<name>create_date</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>prosecution</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>authority_name</name>
<rename>authority_name</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>create_date</name>
<rename>create_date</rename>
<update>Y</update>
</value>
<value>
<name>kind</name>
<rename>kind</rename>
<update>Y</update>
</value>
<value>
<name>law_point</name>
<rename>law_point</rename>
<update>Y</update>
</value>
<value>
<name>termination_basis</name>
<rename>termination_basis</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>304</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -40,10 +114,13 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with ugol as
(select jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array')
select
r.id recruit_id,
@ -54,18 +131,13 @@ select
u->>'ugolovZakon' law_point,
u->>'osnovPrekrashh' termination_basis
from public.recruits r
join ugol on r.id = ugol.recruit_id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
join ugol on r.id = ugol.recruit_id
where r.system_update_date >= '${UP_D}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>528</xloc>
<yloc>304</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -79,31 +151,27 @@ join ugol on r.id = ugol.recruit_id;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>prosecution</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>prosecution</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>736</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>752</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>select_delta_time_subpoena</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/01/10 14:32:39.906</created_date>
<modified_user>-</modified_user>
<modified_date>2025/01/10 14:32:39.906</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<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>768</xloc>
<yloc>240</yloc>
</GUI>
</transform>
<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>
<lookup>
<schema/>
<table>lookup table</table>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>768</xloc>
<yloc>384</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 max(status_change_date) AS STATUS_CHANGE_DATE
from ervu_dashboard.subpoena</sql>
<variables_active>N</variables_active>
<attributes/>
<GUI>
<xloc>464</xloc>
<yloc>240</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>

View file

@ -23,7 +23,7 @@
<hop>
<from>Select values</from>
<to>Table output</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
@ -33,7 +33,7 @@
<hop>
<from>Select values</from>
<to>Insert / update</to>
<enabled>N</enabled>
<enabled>Y</enabled>
</hop>
</order>
<transform>
@ -54,11 +54,13 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>full_name</field>
<name>full_name</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_spouse</table>
@ -74,7 +76,7 @@
</value>
<value>
<name>death_az_number</name>
<rename>divorce_az_number</rename>
<rename>death_az_number</rename>
<update>Y</update>
</value>
<value>
@ -95,7 +97,7 @@
<value>
<name>full_name</name>
<rename>full_name</rename>
<update>Y</update>
<update>N</update>
</value>
<value>
<name>information_excluded</name>
@ -206,6 +208,7 @@
END AS information_excluded,
ri.recruit_id
FROM public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
LEFT JOIN LATERAL (
SELECT jsonb_array_elements(ri.info->'svedSemPolozh'->'suprugi') AS supri
WHERE jsonb_typeof(ri.info->'svedSemPolozh'->'suprugi') = 'array'
@ -236,8 +239,10 @@ SELECT
divorce_date,
information_excluded
FROM public.recruits r
JOIN suprug ON r.id = suprug.recruit_id;</sql>
<variables_active>N</variables_active>
JOIN suprug ON r.id = suprug.recruit_id
where
r.system_update_date >= '${UP_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>192</xloc>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>subpoena</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,9 +23,168 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<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>subpoena_id</field>
<name>subpoena_id</name>
</key>
<key>
<condition>=</condition>
<field>status_change_date</field>
<name>status_change_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>subpoena</table>
<value>
<name>subpoena_id</name>
<rename>subpoena_id</rename>
<update>N</update>
</value>
<value>
<name>status_change_date</name>
<rename>status_change_date</rename>
<update>N</update>
</value>
<value>
<name>act_number</name>
<rename>act_number</rename>
<update>Y</update>
</value>
<value>
<name>address</name>
<rename>address</rename>
<update>Y</update>
</value>
<value>
<name>appearance</name>
<rename>appearance</rename>
<update>Y</update>
</value>
<value>
<name>appearance_status</name>
<rename>appearance_status</rename>
<update>Y</update>
</value>
<value>
<name>create_date</name>
<rename>create_date</rename>
<update>Y</update>
</value>
<value>
<name>delivery_date</name>
<rename>delivery_date</rename>
<update>Y</update>
</value>
<value>
<name>delivery_fio</name>
<rename>delivery_fio</rename>
<update>Y</update>
</value>
<value>
<name>delivery_status</name>
<rename>delivery_status</rename>
<update>Y</update>
</value>
<value>
<name>department_id</name>
<rename>department_id</rename>
<update>Y</update>
</value>
<value>
<name>fio_commiss</name>
<rename>fio_commiss</rename>
<update>Y</update>
</value>
<value>
<name>method_delivery</name>
<rename>method_delivery</rename>
<update>Y</update>
</value>
<value>
<name>method_sending</name>
<rename>method_sending</rename>
<update>Y</update>
</value>
<value>
<name>number</name>
<rename>number</rename>
<update>Y</update>
</value>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_name</name>
<rename>recruitment_name</rename>
<update>Y</update>
</value>
<value>
<name>send_date</name>
<rename>send_date</rename>
<update>Y</update>
</value>
<value>
<name>series</name>
<rename>series</rename>
<update>Y</update>
</value>
<value>
<name>sig_info</name>
<rename>sig_info</rename>
<update>Y</update>
</value>
<value>
<name>subpoena_reason</name>
<rename>subpoena_reason</rename>
<update>Y</update>
</value>
<value>
<name>subpoena_status</name>
<rename>subpoena_status</rename>
<update>Y</update>
</value>
<value>
<name>track_number</name>
<rename>track_number</rename>
<update>Y</update>
</value>
<value>
<name>visit_date</name>
<rename>visit_date</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1008</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -40,8 +197,11 @@
<schema_name/>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
s.id AS subpoena_id, -- идентификатор повестки
s.status_change_date,
s.recruit_id, -- идентификатор рекрута
s.department_id, -- идентификатор ВК
s.series, -- серия повестки
@ -98,18 +258,13 @@ LEFT JOIN public.send_dictionary AS sd
LEFT JOIN public.subpoena_status AS ss
ON ss.id = s.status_id
LEFT JOIN public.subpoena_appearance AS sa
ON sa.subpoena_id = s.id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
ON sa.subpoena_id = s.id
WHERE s.status_change_date >= '${ST_CH_D}';</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>688</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform>
@ -123,31 +278,27 @@ LEFT JOIN public.subpoena_appearance AS sa
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>subpoena</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>subpoena</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>1056</xloc>
<yloc>688</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>temporary_measure</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -25,9 +23,108 @@
<hop>
<from>Table input</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<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>subpoena_id</field>
<name>subpoena_id</name>
</key>
<schema>ervu_dashboard</schema>
<table>temporary_measures</table>
<value>
<name>applied_fact</name>
<rename>applied_fact</rename>
<update>Y</update>
</value>
<value>
<name>cancel_date</name>
<rename>cancel_date</rename>
<update>Y</update>
</value>
<value>
<name>decision_date_cancel</name>
<rename>decision_date_cancel</rename>
<update>Y</update>
</value>
<value>
<name>decision_date_create</name>
<rename>decision_date_create</rename>
<update>Y</update>
</value>
<value>
<name>decision_number_cancel</name>
<rename>decision_number_cancel</rename>
<update>Y</update>
</value>
<value>
<name>decision_number_create</name>
<rename>decision_number_create</rename>
<update>Y</update>
</value>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_name</name>
<rename>recruitment_name</rename>
<update>Y</update>
</value>
<value>
<name>restriction_name</name>
<rename>restriction_name</rename>
<update>Y</update>
</value>
<value>
<name>status_measure</name>
<rename>status_measure</rename>
<update>Y</update>
</value>
<value>
<name>subpoena_id</name>
<rename>subpoena_id</rename>
<update>N</update>
</value>
<value>
<name>type</name>
<rename>type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>480</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input</name>
<type>TableInput</type>
@ -40,6 +137,8 @@
<schema_name/>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
rd.subpoena_id,
rd.vk_id AS recruitment_id,
@ -81,18 +180,13 @@ LEFT JOIN public.restriction AS rn
LEFT JOIN public.restriction_document_status AS rds
ON rds.code = rd.status
LEFT JOIN public.subpoena AS s
ON s.id = rd.subpoena_id</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
ON s.id = rd.subpoena_id
WHERE s.status_change_date >= '${ST_CH_D}'</sql>
<variables_active>Y</variables_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -106,31 +200,27 @@ LEFT JOIN public.subpoena AS s
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>temporary_measures</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>temporary_measures</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
<xloc>432</xloc>
<yloc>400</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -124,8 +124,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/info_recruits/job_info_recruits.hwf</filename>
<logext/>
<logfile/>
<loglevel>Nothing</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -167,15 +165,15 @@
<from>job_recruitments_all</from>
<to>job_info_recruits.hwf</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
<evaluation>N</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_info_recruits.hwf</from>
<to>job_last_recording_date</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
<evaluation>N</evaluation>
<unconditional>Y</unconditional>
</hop>
</hops>
<notepads>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>passport_once</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -30,7 +28,7 @@
<hop>
<from>Table input 2</from>
<to>Table output 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>
@ -45,6 +43,8 @@
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select r.id recruit_id,
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number,
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series,
@ -57,17 +57,11 @@ end actual
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -82,6 +76,8 @@ where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>select r.id recruit_id,
ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number,
ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series,
@ -94,17 +90,11 @@ end actual
from public.recruits_info ri
join public.recruits r ON ri.recruit_id = r.id
where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>528</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
@ -118,31 +108,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>passport</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>passport</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -156,31 +142,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>passport</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>passport</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>672</xloc>
<yloc>304</yloc>
<draw>Y</draw>
<xloc>992</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform_error_handling>

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>subpoena_once</name>
@ -6,7 +7,6 @@
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<directory>/</directory>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
@ -16,8 +16,6 @@
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
<is_key_private>N</is_key_private>
</info>
<notepads>
</notepads>
@ -40,8 +38,11 @@
<schema_name/>
</partitioning>
<connection>postgres.subpoena</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql> SELECT
s.id AS subpoena_id, -- идентификатор повестки
s.status_change_date,
s.recruit_id, -- идентификатор рекрута
s.department_id, -- идентификатор ВК
s.series, -- серия повестки
@ -99,17 +100,11 @@ LEFT JOIN public.subpoena_status AS ss
ON ss.id = s.status_id
LEFT JOIN public.subpoena_appearance AS sa
ON sa.subpoena_id = s.id;</sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>208</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform>
@ -123,31 +118,27 @@ LEFT JOIN public.subpoena_appearance AS sa
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu-dashboard</connection>
<schema>ervu_dashboard</schema>
<table>subpoena</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>Y</use_batch>
<specify_fields>N</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field/>
<connection>ervu-dashboard</connection>
<fields>
</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>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>subpoena</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<cluster_schema/>
<GUI>
<xloc>416</xloc>
<yloc>208</yloc>
<draw>Y</draw>
</GUI>
</transform>
<transform_error_handling>

View file

@ -179,7 +179,7 @@
<params_from_previous>Y</params_from_previous>
<run_configuration>local</run_configuration>
<set_append_logfile>N</set_append_logfile>
<set_logfile>Y</set_logfile>
<set_logfile>N</set_logfile>
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1248</xloc>
@ -725,7 +725,7 @@
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.reg_mil_cat
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -743,7 +743,8 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.recruitment_campaign
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -760,7 +761,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.total_registered
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -778,7 +779,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.waiting_registration
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -796,7 +797,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM recruitment_campaign.subpoenas
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -813,7 +814,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.removed_registry
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -830,7 +831,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.subpoenas
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -848,7 +849,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.driver_license
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -865,7 +866,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.child_minor
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -883,7 +884,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.age
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -901,7 +902,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.marital_status
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -919,7 +920,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.education_level
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -936,7 +937,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.busyness
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')
</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
@ -954,7 +955,7 @@ WHERE recording_date = current_date
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM recruitment_campaign.appeals
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty', 'Organization', 'Region')</sql>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -1276,7 +1277,7 @@ WHERE recording_date = current_date
<from>SQL total_registered.busyness</from>
<to>total_registered.busyness(m_c).hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<evaluation>N</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>

View file

@ -65,11 +65,6 @@
<to>Insert / update (total_registered.marital_status)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.busyness)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.education_level)</to>
@ -83,7 +78,7 @@
<hop>
<from>Table input</from>
<to>Dummy (do nothing)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Dummy (do nothing)</from>
@ -100,6 +95,11 @@
<to>Insert / update (recruitment_campaign.subpoenas)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.busyness)</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Dummy (do nothing)</name>

View file

@ -161,6 +161,16 @@
<rename>total_people</rename>
<update>Y</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>Y</update>
</value>
<value>
<name>convicts_percent</name>
<rename>convicts_percent</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -240,7 +250,9 @@
<sql>WITH
ids AS (
-- Преобразуем строковый массив в таблицу UUID
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
SELECT unnest(string_to_array(trim(both '{}' from
'${ARR_MC}'
), ','))::uuid AS recruitment_id
),
gender_separations AS (
SELECT 'MALE' AS gender
@ -302,7 +314,6 @@ status_info AS (
ELSE false
END
) AS is_working,
-- Проверка на отсутствие сведений о вузе
info->'svedVUZ'->>'prOtsSvedVUZ' = '1' AS no_info_vuz,
@ -313,11 +324,12 @@ status_info AS (
info->'svedTrud'->>'prOtsSvedTrud' = '1' AS no_info_work,
r.target_recruitment_id AS recruitment_id,
r.gender,
r.vu_current_info -> 'isMilitaryRegistered' AS registered
r.vu_current_info -> 'isMilitaryRegistered' AS registered,
r.vu_current_info->>'recruitmentCommercialInfo' AS sidit
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE (r.vu_current_info -> 'isMilitaryRegistered' = 'true' OR r.vu_current_info -> 'isMilitaryRegistered' = 'false')
AND (r.gender = 'MALE' OR r.gender = 'FEMALE')
AND (r.gender = 'MALE' OR r.gender = 'FEMALE')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
),
@ -340,7 +352,10 @@ summary AS (
COUNT(CASE WHEN no_info_vuz AND no_info_college AND no_info_work THEN 1 END) AS no_info,
-- Общее количество людей
COUNT(*) AS total_people
COUNT(si.recruitment_id) AS total_people,
COUNT(CASE WHEN sidit = 'true' THEN 1 END) AS convicts
FROM data_combinations dc
LEFT JOIN status_info si
ON si.recruitment_id = dc.recruitment_id
@ -356,7 +371,8 @@ summary_all AS (
SUM(study) AS study,
SUM(work) AS work,
SUM(no_info) AS no_info,
SUM(total_people) AS total_people
SUM(total_people) AS total_people,
SUM(convicts) AS convicts
FROM summary
GROUP BY recruitment_id, registered
)
@ -369,15 +385,19 @@ SELECT
s.work,
s.no_info,
s.total_people,
s.convicts,
-- Процент людей, которые учатся
ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2) AS study_percent,
COALESCE(ROUND(s.study * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS study_percent,
-- Процент людей, которые работают
ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2) AS work_percent,
COALESCE(ROUND(s.work * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS work_percent,
-- Процент людей, для которых отсутствуют сведения
ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2) AS no_info_percent
COALESCE(ROUND(s.no_info * 100.0 / NULLIF(s.total_people, 0), 2), 0.0) AS no_info_percent,
COALESCE(ROUND(s.convicts * 100.0 / NULLIF((select sum(convicts) from summary_all), 0), 2), 0.0) AS convicts_percent
FROM summary s
UNION ALL
SELECT
@ -389,15 +409,17 @@ SELECT
sa.work,
sa.no_info,
sa.total_people,
sa.convicts,
-- Процент людей, которые учатся
ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2) AS study_percent,
COALESCE(ROUND(sa.study * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS study_percent,
-- Процент людей, которые работают
ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2) AS work_percent,
COALESCE(ROUND(sa.work * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS work_percent,
-- Процент людей, для которых отсутствуют сведения
ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2) AS no_info_percent
COALESCE(ROUND(sa.no_info * 100.0 / NULLIF(sa.total_people, 0), 2), 0.0) AS no_info_percent,
'0.0' AS convicts_percent
FROM summary_all sa</sql>
<variables_active>Y</variables_active>
<attributes/>

View file

@ -69,7 +69,8 @@
<sql>DELETE FROM total_registered.busyness
WHERE recording_date = current_date
AND schema = 'Region'
AND recruitment_id = '${MD_ID}'</sql>
AND recruitment_id = '${MD_ID}'
</sql>
<attributes/>
<GUI>
<xloc>368</xloc>
@ -98,7 +99,8 @@ WHERE recording_date = current_date
<sql>DELETE FROM total_registered.busyness
WHERE recording_date = current_date
AND schema = 'MD_LVL'
AND recruitment_id = '${MD_ID}'</sql>
AND recruitment_id = '${MD_ID}'
</sql>
<attributes/>
<GUI>
<xloc>1552</xloc>
@ -156,25 +158,21 @@ WHERE recording_date = current_date
<condition>=</condition>
<field>recruitment_id</field>
<name>MD_ID</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>schema</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>registered</field>
<name>registered</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>busyness</table>
@ -233,6 +231,16 @@ WHERE recording_date = current_date
<rename>schema</rename>
<update>N</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>Y</update>
</value>
<value>
<name>convicts_percent</name>
<rename>convicts_percent</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -309,62 +317,167 @@ WHERE recording_date = current_date
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
<sql>WITH
a AS (
SELECT
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${MD_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered,
'Region' AS schema
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ','
)::uuid[]
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${MD_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND "all_M_W" IN ('M', 'W')
AND schema = 'Organization'
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered
),
a2 AS (
SELECT
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${MD_ARRAY}' IS NULL OR '${MD_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${MD_ID}' AS recruitment_id,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${MD_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND "all_M_W" = 'ALL'
AND schema = 'Organization'
AND recording_date = CURRENT_DATE
GROUP BY registered
)
AND schema = 'Organization'
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered;</sql>
SELECT
a.study,
a.work,
a.convicts,
a.study_percent,
a.work_percent,
a.not_work,
a.not_work_percent,
a.total_people,
a.recruitment_id,
a.gender,
a.registered,
'Region' AS schema,
COALESCE(
CASE
WHEN a2.convicts > 0
THEN ROUND((a.convicts / a2.convicts * 100), 2)
ELSE 0
END,
0
) AS convicts_percent
FROM a
LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered
UNION ALL
SELECT
a2.study,
a2.work,
a2.convicts,
a2.study_percent,
a2.work_percent,
a2.not_work,
a2.not_work_percent,
a2.total_people,
a2.recruitment_id,
'ALL' AS gender,
a2.registered,
'Region' AS schema,
0 AS convicts_percent
FROM a2</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -79,19 +79,15 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>Y</exec_per_row>
<filename>${PROJECT_HOME}/ratings/ratings.appear_subpoena.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<parameter>
<name>VK_ARRAY</name>
<stream_name>VK_ARRAY_ID</stream_name>
<value/>
</parameter>
<parameter>
<name>REG_ID</name>
<stream_name>RECRUITMENT_REG_ID</stream_name>
<value/>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
@ -226,7 +222,6 @@
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>delete from ratings.conscription_info where recording_date = current_date</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
@ -242,7 +237,6 @@
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>delete from ratings.consideration_complaint where recording_date = current_date</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>

View file

@ -80,7 +80,6 @@
<parameter>
<name>ARR_REG</name>
<stream_name>ARRAY_REGION</stream_name>
<value/>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
@ -765,7 +764,6 @@
<parameter>
<name>ARR_REG</name>
<stream_name>ARRAY_REGION</stream_name>
<value/>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
@ -853,8 +851,6 @@
<create_parent_folder>N</create_parent_folder>
<exec_per_row>N</exec_per_row>
<filename>${PROJECT_HOME}/region/appeals.review_rating.hpl</filename>
<logext/>
<logfile/>
<loglevel>Basic</loglevel>
<parameters>
<pass_all_parameters>Y</pass_all_parameters>
@ -886,14 +882,15 @@
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.recruitment_campaign
<sql>/*DELETE FROM main_dashboard.recruitment_campaign
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>400</yloc>
<xloc>976</xloc>
<yloc>1232</yloc>
<attributes_hac/>
</action>
<action>
@ -921,14 +918,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM recruitment_campaign.subpoenas
<sql>/*DELETE FROM recruitment_campaign.subpoenas
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>592</yloc>
<xloc>976</xloc>
<yloc>1424</yloc>
<attributes_hac/>
</action>
<action>
@ -956,14 +954,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.total_registered
<sql>/*DELETE FROM main_dashboard.total_registered
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>464</yloc>
<xloc>976</xloc>
<yloc>1296</yloc>
<attributes_hac/>
</action>
<action>
@ -973,14 +972,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM main_dashboard.waiting_registration
<sql>/*DELETE FROM main_dashboard.waiting_registration
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>528</yloc>
<xloc>976</xloc>
<yloc>1360</yloc>
<attributes_hac/>
</action>
<action>
@ -990,14 +990,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.reg_mil_cat
<sql>/*DELETE FROM total_registered.reg_mil_cat
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>656</yloc>
<xloc>976</xloc>
<yloc>1488</yloc>
<attributes_hac/>
</action>
<action>
@ -1007,14 +1008,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.removed_registry
<sql>/*DELETE FROM total_registered.removed_registry
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>720</yloc>
<xloc>976</xloc>
<yloc>1552</yloc>
<attributes_hac/>
</action>
<action>
@ -1024,14 +1026,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.subpoenas
<sql>/*DELETE FROM total_registered.subpoenas
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>784</yloc>
<xloc>976</xloc>
<yloc>1616</yloc>
<attributes_hac/>
</action>
<action>
@ -1041,14 +1044,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.driver_license
<sql>/*DELETE FROM total_registered.driver_license
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>864</yloc>
<xloc>976</xloc>
<yloc>1696</yloc>
<attributes_hac/>
</action>
<action>
@ -1058,14 +1062,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.child_minor
<sql>/*DELETE FROM total_registered.child_minor
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>944</yloc>
<xloc>976</xloc>
<yloc>1776</yloc>
<attributes_hac/>
</action>
<action>
@ -1075,14 +1080,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.age
<sql>/*DELETE FROM total_registered.age
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>1024</yloc>
<xloc>976</xloc>
<yloc>1856</yloc>
<attributes_hac/>
</action>
<action>
@ -1092,14 +1098,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.marital_status
<sql>/*DELETE FROM total_registered.marital_status
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>1104</yloc>
<xloc>976</xloc>
<yloc>1936</yloc>
<attributes_hac/>
</action>
<action>
@ -1109,14 +1116,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.education_level
<sql>/*DELETE FROM total_registered.education_level
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>1184</yloc>
<xloc>976</xloc>
<yloc>2016</yloc>
<attributes_hac/>
</action>
<action>
@ -1126,14 +1134,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM total_registered.busyness
<sql>/*DELETE FROM total_registered.busyness
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>1264</yloc>
<xloc>976</xloc>
<yloc>2096</yloc>
<attributes_hac/>
</action>
<action>
@ -1143,14 +1152,15 @@ WHERE recording_date = current_date
<attributes/>
<connection>ervu-dashboard</connection>
<sendOneStatement>N</sendOneStatement>
<sql>DELETE FROM recruitment_campaign.appeals
<sql>/*DELETE FROM recruitment_campaign.appeals
WHERE recording_date = current_date
AND schema = 'Organization'</sql>
AND schema = 'Organization'*/</sql>
<sqlfilename/>
<sqlfromfile>N</sqlfromfile>
<useVariableSubstitution>N</useVariableSubstitution>
<parallel>N</parallel>
<xloc>1344</xloc>
<yloc>1344</yloc>
<xloc>976</xloc>
<yloc>2176</yloc>
<attributes_hac/>
</action>
<action>
@ -1448,20 +1458,6 @@ WHERE recording_date = current_date
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL main_dashboard.recruitment_campaign</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL main_dashboard.recruitment_campaign</from>
<to>main_dashboard.recruitment_campaign(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>recruitment_campaign.subpoenas(reg)</from>
<to>recruitment_campaign.subpoenas</to>
@ -1476,188 +1472,6 @@ WHERE recording_date = current_date
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL recruitment_campaign.subpoenas</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL recruitment_campaign.subpoenas</from>
<to>recruitment_campaign.subpoenas(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL main_dashboard.total_registered</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL main_dashboard.total_registered</from>
<to>main_dashboard.total_registered(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL main_dashboard.waiting_registration</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL main_dashboard.waiting_registration</from>
<to>main_dashboard.waiting_registration(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.reg_mil_cat</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.reg_mil_cat</from>
<to>total_registered.reg_mil_cat(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.removed_registry</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.removed_registry</from>
<to>total_registered.removed_registry(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.subpoenas</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.subpoenas</from>
<to>total_registered.subpoenas(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.driver_license</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.driver_license</from>
<to>total_registered.driver_license(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.child_minor</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.child_minor</from>
<to>total_registered.child_minor(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.age</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.age</from>
<to>total_registered.age(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.marital_status</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.marital_status</from>
<to>total_registered.marital_status(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.education_level</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.education_level</from>
<to>total_registered.education_level(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL total_registered.busyness</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL total_registered.busyness</from>
<to>total_registered.busyness(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>SQL recruitment_campaign.appeals</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>SQL recruitment_campaign.appeals</from>
<to>recruitment_campaign.appeals(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>main_dashboard.total_registered(reg)</from>
<to>main_dashboard.total_registered</to>
@ -1826,6 +1640,104 @@ WHERE recording_date = current_date
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>main_dashboard.recruitment_campaign(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>main_dashboard.total_registered(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>main_dashboard.waiting_registration(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>recruitment_campaign.subpoenas(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.reg_mil_cat(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.removed_registry(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.subpoenas(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.driver_license(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.child_minor(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.age(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.marital_status(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.education_level(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>total_registered.busyness(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_get_rows_reg.hwf</from>
<to>recruitment_campaign.appeals(reg)</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
</hops>
<notepads>
</notepads>

View file

@ -306,6 +306,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY spring_autumn;</sql>
<variables_active>Y</variables_active>

View file

@ -278,6 +278,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE;</sql>
<variables_active>Y</variables_active>
<attributes/>

View file

@ -284,6 +284,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE;</sql>
<variables_active>Y</variables_active>
<attributes/>

View file

@ -268,6 +268,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY spring_autumn;</sql>
<variables_active>Y</variables_active>

View file

@ -410,6 +410,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY spring_autumn;</sql>
<variables_active>Y</variables_active>

View file

@ -404,6 +404,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered;</sql>
<variables_active>Y</variables_active>

View file

@ -88,19 +88,16 @@
<condition>=</condition>
<field>recruitment_id</field>
<name>REG_ID</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>schema</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>busyness</table>
@ -159,6 +156,16 @@
<rename>schema</rename>
<update>N</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>Y</update>
</value>
<value>
<name>convicts_percent</name>
<rename>convicts_percent</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -235,61 +242,164 @@
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
<sql>WITH a AS (
SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND "all_M_W" IN ('M', 'W')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered
),
a2 AS (
SELECT
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(study) END AS study,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(work) END AS work,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(convicts) END AS convicts,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS study_percent,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
"all_M_W" AS gender,
registered,
'Organization' AS schema
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(not_work) END AS not_work,
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = ''
THEN 0
ELSE COALESCE(
CASE
WHEN SUM(busyness) > 0
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
ELSE 0
END,
0
)
END AS not_work_percent,
CASE WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN 0 ELSE SUM(busyness) END AS total_people,
'${REG_ID}' AS recruitment_id,
registered
FROM total_registered.busyness
WHERE recruitment_id = ANY (
string_to_array(
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND "all_M_W" = 'ALL'
AND recording_date = CURRENT_DATE
GROUP BY registered, "all_M_W"
)
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W", registered;</sql>
SELECT
a.study,
a.work,
a.convicts,
a.study_percent,
a.work_percent,
a.not_work,
a.not_work_percent,
a.total_people,
a.recruitment_id,
a.gender,
a.registered,
'Organization' AS schema,
COALESCE(
CASE
WHEN a2.convicts > 0
THEN ROUND((a.convicts / a2.convicts * 100), 2)
ELSE 0
END,
0
) AS convicts_percent
FROM a
LEFT JOIN a2 ON a.recruitment_id = a2.recruitment_id AND a.registered = a2.registered
UNION ALL
SELECT
a2.study,
a2.work,
a2.convicts,
a2.study_percent,
a2.work_percent,
a2.not_work,
a2.not_work_percent,
a2.total_people,
a2.recruitment_id,
'ALL' AS gender,
a2.registered,
'Organization' AS schema,
0 AS convicts_percent
FROM a2
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -323,6 +323,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W";</sql>
<variables_active>Y</variables_active>

View file

@ -341,6 +341,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W";</sql>
<variables_active>Y</variables_active>

View file

@ -301,6 +301,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W";</sql>
<variables_active>Y</variables_active>

View file

@ -254,6 +254,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY "all_M_W";</sql>
<variables_active>Y</variables_active>

View file

@ -340,6 +340,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY mil_reg;</sql>
<variables_active>Y</variables_active>

View file

@ -335,6 +335,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE;</sql>
<variables_active>Y</variables_active>
<attributes/>

View file

@ -446,6 +446,7 @@ WHERE recruitment_id = ANY (
trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ','
)::uuid[]
)
AND schema IN ('Department', 'REG_LVL')
AND recording_date = CURRENT_DATE
GROUP BY mil_reg;</sql>
<variables_active>Y</variables_active>