This commit is contained in:
Ruslan 2025-03-05 10:44:21 +03:00
parent 567a5f4a7c
commit a8f074aa5e
8 changed files with 991 additions and 486 deletions

View file

@ -268,7 +268,7 @@
<hop>
<from>job_recruitments_region.hwf</from>
<to>job_ratings.hwf</to>
<enabled>Y</enabled>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>

View file

@ -23,57 +23,57 @@
<hop>
<from>Table input</from>
<to>Insert / update (main_dashboard.total_registered)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (main_dashboard.waiting_registration)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.reg_mil_cat)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.removed_registry)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.subpoenas)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.driver_license)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.child_minor)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.age)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.marital_status)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.education_level)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (recruitment_campaign.appeals)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
@ -88,16 +88,71 @@
<hop>
<from>Table input main_dashboard.recruitment_campaign</from>
<to>Insert / update (main_dashboard.recruitment_campaign)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input recruitment_campaign.subpoenas</from>
<to>Insert / update (recruitment_campaign.subpoenas)</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.busyness)</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update 5</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update 6</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update (total_registered.subpoenas)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update (total_registered.removed_registry)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update (total_registered.reg_mil_cat)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update (main_dashboard.waiting_registration)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Update (main_dashboard.total_registered)</to>
<enabled>Y</enabled>
</hop>
</order>
@ -114,8 +169,8 @@
</partitioning>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>400</yloc>
<xloc>176</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform>
@ -163,8 +218,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1440</xloc>
<yloc>400</yloc>
<xloc>416</xloc>
<yloc>464</yloc>
</GUI>
</transform>
<transform>
@ -321,8 +376,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>528</yloc>
<xloc>176</xloc>
<yloc>592</yloc>
</GUI>
</transform>
<transform>
@ -370,8 +425,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>608</yloc>
<xloc>176</xloc>
<yloc>672</yloc>
</GUI>
</transform>
<transform>
@ -419,8 +474,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1488</yloc>
<xloc>0</xloc>
<yloc>2016</yloc>
</GUI>
</transform>
<transform>
@ -617,8 +672,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1088</yloc>
<xloc>0</xloc>
<yloc>1616</yloc>
</GUI>
</transform>
<transform>
@ -666,8 +721,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1248</yloc>
<xloc>0</xloc>
<yloc>1776</yloc>
</GUI>
</transform>
<transform>
@ -715,8 +770,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1008</yloc>
<xloc>0</xloc>
<yloc>1536</yloc>
</GUI>
</transform>
<transform>
@ -764,8 +819,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>928</yloc>
<xloc>0</xloc>
<yloc>1456</yloc>
</GUI>
</transform>
<transform>
@ -813,8 +868,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1328</yloc>
<xloc>0</xloc>
<yloc>1856</yloc>
</GUI>
</transform>
<transform>
@ -862,8 +917,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1168</yloc>
<xloc>0</xloc>
<yloc>1696</yloc>
</GUI>
</transform>
<transform>
@ -911,8 +966,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>688</yloc>
<xloc>176</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
@ -960,8 +1015,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>768</yloc>
<xloc>176</xloc>
<yloc>832</yloc>
</GUI>
</transform>
<transform>
@ -1009,8 +1064,8 @@
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>848</yloc>
<xloc>176</xloc>
<yloc>912</yloc>
</GUI>
</transform>
<transform>
@ -1162,6 +1217,461 @@ WHERE schema in ('Department', 'Organization', 'Region') </sql>
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Update</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>driver_license</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>928</yloc>
</GUI>
</transform>
<transform>
<name>Update 2</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>child_minor</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1008</yloc>
</GUI>
</transform>
<transform>
<name>Update 3</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>age</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1088</yloc>
</GUI>
</transform>
<transform>
<name>Update 4</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>marital_status</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>1184</yloc>
</GUI>
</transform>
<transform>
<name>Update 5</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>busyness</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1232</xloc>
<yloc>1264</yloc>
</GUI>
</transform>
<transform>
<name>Update 6</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<schema>total_registered</schema>
<table>education_level</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1232</xloc>
<yloc>1344</yloc>
</GUI>
</transform>
<transform>
<name>Update (main_dashboard.total_registered)</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<schema>main_dashboard</schema>
<table>total_registered</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Update (main_dashboard.waiting_registration)</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<schema>main_dashboard</schema>
<table>waiting_registration</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>560</yloc>
</GUI>
</transform>
<transform>
<name>Update (total_registered.reg_mil_cat)</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>reg_mil_cat</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>640</yloc>
</GUI>
</transform>
<transform>
<name>Update (total_registered.removed_registry)</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>removed_registry</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>720</yloc>
</GUI>
</transform>
<transform>
<name>Update (total_registered.subpoenas)</name>
<type>Update</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<error_ignored>Y</error_ignored>
<ignore_flag_field/>
<lookup>
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>subpoenas</table>
<value>
<name>schema</name>
<rename>schema</rename>
</value>
</lookup>
<skip_lookup>N</skip_lookup>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>800</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (person_registry) регион/мужчины 2</from>
<to>Insert / update (total_registered.age) 2 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>
@ -95,6 +95,39 @@
<yloc>800</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 2 2 2</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>REC_ID</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
<field>
<length>-1</length>
<name>SCM</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1536</xloc>
<yloc>1008</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.age) 2</name>
<type>InsertUpdate</type>
@ -113,31 +146,26 @@
<condition>=</condition>
<field>recruitment_id</field>
<name>recruitment_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>registered</field>
<name>registered</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>convicts</field>
<name>convicts</name>
<name2/>
</key>
<schema>total_registered</schema>
<table>age</table>
@ -254,248 +282,6 @@
<yloc>720</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>REC_ID</name>
<rename>REC_ID</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
<meta>
<name>SCM</name>
<rename>SCM</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>800</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) регион/мужчины</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
ids AS (
-- Преобразуем строковый массив в таблицу UUID
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
),
recruit_data AS (
SELECT
r.target_recruitment_id,
r.gender,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
r.id AS recruit_id,
r.birth_date
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.gender IN ('MALE', 'FEMALE')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
),
total_count AS (
SELECT
rd.target_recruitment_id as recruitment_id,
rd.gender,
rd.registered,
COUNT(rd.recruit_id) AS total
FROM recruit_data rd
GROUP BY rd.target_recruitment_id, rd.gender, rd.registered
),
total_count_all AS (
SELECT
r.target_recruitment_id AS recruitment_id,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
COUNT(r.id) AS total
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
GROUP BY r.target_recruitment_id, r.vu_current_info->>'isMilitaryRegistered'
),
age_counts AS (
SELECT
rd.target_recruitment_id as recruitment_id,
rd.gender,
rd.registered,
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
FROM recruit_data rd
GROUP BY rd.target_recruitment_id, rd.gender, rd.registered
),
age_counts_all AS (
SELECT
r.target_recruitment_id AS recruitment_id,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
GROUP BY r.target_recruitment_id, r.vu_current_info->>'isMilitaryRegistered'
)
SELECT
current_date AS recording_date,
COALESCE(ac."17_year_count", 0) AS "17_year_count",
COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
COALESCE(tc.total, 0) AS total_count,
tc.recruitment_id,
(CASE
WHEN tc.gender = 'MALE' THEN 'M'
ELSE 'W'
END)::text AS gender,
'ALL' AS convicts,
tc.registered::text
FROM total_count tc
LEFT JOIN age_counts ac
ON ac.recruitment_id = tc.recruitment_id
AND ac.gender = tc.gender
AND ac.registered = tc.registered
UNION ALL
SELECT
current_date AS recording_date,
COALESCE(aca."17_year_count", 0) AS "17_year_count",
COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
COALESCE(tca.total, 0) AS total_count,
tca.recruitment_id,
'ALL' AS gender,
'ALL' AS convicts,
tca.registered::text
FROM total_count_all tca
LEFT JOIN age_counts_all aca
ON aca.recruitment_id = tca.recruitment_id
AND aca.registered = tca.registered</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1296</xloc>
<yloc>720</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 2 2 2</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>REC_ID</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
<field>
<length>-1</length>
<name>SCM</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1536</xloc>
<yloc>1008</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.age) 2 2</name>
<type>InsertUpdate</type>
@ -650,6 +436,60 @@ LEFT JOIN age_counts_all aca
<yloc>928</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>REC_ID</name>
<rename>REC_ID</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
<meta>
<name>SCM</name>
<rename>SCM</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>800</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2 2</name>
<type>SelectValues</type>
@ -704,6 +544,161 @@ LEFT JOIN age_counts_all aca
<yloc>1008</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) регион/мужчины</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
ids AS (
-- Преобразуем строковый массив в таблицу UUID
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
),
recruit_data AS (
SELECT
r.target_recruitment_id,
r.gender,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
r.id AS recruit_id,
r.birth_date
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.gender IN ('MALE', 'FEMALE')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
),
total_count AS (
SELECT
rd.target_recruitment_id as recruitment_id,
rd.gender,
rd.registered,
COUNT(rd.recruit_id) AS total
FROM recruit_data rd
GROUP BY rd.target_recruitment_id, rd.gender, rd.registered
),
total_count_all AS (
SELECT
r.target_recruitment_id AS recruitment_id,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
COUNT(r.id) AS total
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
GROUP BY r.target_recruitment_id, r.vu_current_info->>'isMilitaryRegistered'
),
age_counts AS (
SELECT
rd.target_recruitment_id as recruitment_id,
rd.gender,
rd.registered,
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) = 17) AS "17_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
COUNT(rd.recruit_id) FILTER (WHERE EXTRACT(YEAR FROM AGE(rd.birth_date)) >= 51) AS "51+_year_count"
FROM recruit_data rd
GROUP BY rd.target_recruitment_id, rd.gender, rd.registered
),
age_counts_all AS (
SELECT
r.target_recruitment_id AS recruitment_id,
r.vu_current_info->>'isMilitaryRegistered' AS registered,
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) = 17) AS "17_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 18 AND 26) AS "18-26_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 27 AND 30) AS "27-30_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 31 AND 35) AS "31-35_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 36 AND 40) AS "36-40_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 41 AND 45) AS "41-45_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) BETWEEN 46 AND 50) AS "46-50_year_count",
COUNT(r.id) FILTER (WHERE EXTRACT(YEAR FROM AGE(r.birth_date)) >= 51) AS "51+_year_count"
FROM public.recruits r
LEFT JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' IN ('true', 'false')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
GROUP BY r.target_recruitment_id, r.vu_current_info->>'isMilitaryRegistered'
)
SELECT
current_date AS recording_date,
COALESCE(ac."17_year_count", 0) AS "17_year_count",
COALESCE(ROUND((COALESCE(ac."17_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "17_year_percent",
COALESCE(ac."18-26_year_count", 0) AS "18-26_year_count",
COALESCE(ROUND((COALESCE(ac."18-26_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "18-26_year_percent",
COALESCE(ac."27-30_year_count", 0) AS "27-30_year_count",
COALESCE(ROUND((COALESCE(ac."27-30_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "27-30_year_percent",
COALESCE(ac."31-35_year_count", 0) AS "31-35_year_count",
COALESCE(ROUND((COALESCE(ac."31-35_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "31-35_year_percent",
COALESCE(ac."36-40_year_count", 0) AS "36-40_year_count",
COALESCE(ROUND((COALESCE(ac."36-40_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "36-40_year_percent",
COALESCE(ac."41-45_year_count", 0) AS "41-45_year_count",
COALESCE(ROUND((COALESCE(ac."41-45_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "41-45_year_percent",
COALESCE(ac."46-50_year_count", 0) AS "46-50_year_count",
COALESCE(ROUND((COALESCE(ac."46-50_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "46-50_year_percent",
COALESCE(ac."51+_year_count", 0) AS "51+_year_count",
COALESCE(ROUND((COALESCE(ac."51+_year_count", 0) * 100.0) / NULLIF(tc.total, 0), 2), 0) AS "51+_year_percent",
COALESCE(tc.total, 0) AS total_count,
tc.recruitment_id,
(CASE
WHEN tc.gender = 'MALE' THEN 'M'
ELSE 'W'
END)::text AS gender,
'ALL' AS convicts,
tc.registered::text
FROM total_count tc
LEFT JOIN age_counts ac
ON ac.recruitment_id = tc.recruitment_id
AND ac.gender = tc.gender
AND ac.registered = tc.registered
UNION ALL
SELECT
current_date AS recording_date,
COALESCE(aca."17_year_count", 0) AS "17_year_count",
COALESCE(ROUND((COALESCE(aca."17_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "17_year_percent",
COALESCE(aca."18-26_year_count", 0) AS "18-26_year_count",
COALESCE(ROUND((COALESCE(aca."18-26_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "18-26_year_percent",
COALESCE(aca."27-30_year_count", 0) AS "27-30_year_count",
COALESCE(ROUND((COALESCE(aca."27-30_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "27-30_year_percent",
COALESCE(aca."31-35_year_count", 0) AS "31-35_year_count",
COALESCE(ROUND((COALESCE(aca."31-35_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "31-35_year_percent",
COALESCE(aca."36-40_year_count", 0) AS "36-40_year_count",
COALESCE(ROUND((COALESCE(aca."36-40_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "36-40_year_percent",
COALESCE(aca."41-45_year_count", 0) AS "41-45_year_count",
COALESCE(ROUND((COALESCE(aca."41-45_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "41-45_year_percent",
COALESCE(aca."46-50_year_count", 0) AS "46-50_year_count",
COALESCE(ROUND((COALESCE(aca."46-50_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "46-50_year_percent",
COALESCE(aca."51+_year_count", 0) AS "51+_year_count",
COALESCE(ROUND((COALESCE(aca."51+_year_count", 0) * 100.0) / NULLIF(tca.total, 0), 2), 0) AS "51+_year_percent",
COALESCE(tca.total, 0) AS total_count,
tca.recruitment_id,
'ALL' AS gender,
'ALL' AS convicts,
tca.registered::text
FROM total_count_all tca
LEFT JOIN age_counts_all aca
ON aca.recruitment_id = tca.recruitment_id
AND aca.registered = tca.registered</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1296</xloc>
<yloc>720</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) регион/мужчины 2</name>
<type>TableInput</type>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (person_registry) РФ/мужчины 2</from>
<to>Insert / update (total_registered.busyness) 2 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (person_registry)регион/все 2</from>
<to>Insert / update (total_registered.child_minor) 3 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (driver_license) регионы/все 2</from>
<to>Insert / update (total_registered.driver_license) 2 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (person_registry) РФ/мужчины 2</from>
<to>Insert / update (total_registered.education_level) 2 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>
@ -95,6 +95,39 @@
<yloc>624</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 2 2 2</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>REC_ID</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
<field>
<length>-1</length>
<name>SCM</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level) 2</name>
<type>InsertUpdate</type>
@ -199,6 +232,110 @@
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level) 2 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>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
</key>
<key>
<condition>=</condition>
<field>convicts</field>
<name>convicts</name>
</key>
<schema>total_registered</schema>
<table>education_level</table>
<value>
<name>higher</name>
<rename>higher</rename>
<update>Y</update>
</value>
<value>
<name>average</name>
<rename>average_prof</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>only_general</name>
<rename>only_general</rename>
<update>Y</update>
</value>
<value>
<name>no_data</name>
<rename>count_nodata</rename>
<update>Y</update>
</value>
<value>
<name>higher_percent</name>
<rename>higher_percentage</rename>
<update>Y</update>
</value>
<value>
<name>average_percent</name>
<rename>average_prof_percentage</rename>
<update>Y</update>
</value>
<value>
<name>only_general_percent</name>
<rename>only_general_percentage</rename>
<update>Y</update>
</value>
<value>
<name>no_data_percent</name>
<rename>count_nodata_percentage</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>education_level</name>
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2</name>
<type>SelectValues</type>
@ -253,6 +390,60 @@
<yloc>624</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>REC_ID</name>
<rename>REC_ID</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
<meta>
<name>SCM</name>
<rename>SCM</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>1472</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) РФ/мужчины</name>
<type>TableInput</type>
@ -413,197 +604,6 @@ FROM final_counts_all fca</sql>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 2 2 2</name>
<type>GetVariable</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<field>
<length>-1</length>
<name>REC_ID</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
<field>
<length>-1</length>
<name>SCM</name>
<precision>-1</precision>
<trim_type>none</trim_type>
<type>String</type>
</field>
</fields>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level) 2 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>recruitment_id</field>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>recording_date</field>
<name>recording_date</name>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
</key>
<key>
<condition>=</condition>
<field>convicts</field>
<name>convicts</name>
</key>
<schema>total_registered</schema>
<table>education_level</table>
<value>
<name>higher</name>
<rename>higher</rename>
<update>Y</update>
</value>
<value>
<name>average</name>
<rename>average_prof</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>only_general</name>
<rename>only_general</rename>
<update>Y</update>
</value>
<value>
<name>no_data</name>
<rename>count_nodata</rename>
<update>Y</update>
</value>
<value>
<name>higher_percent</name>
<rename>higher_percentage</rename>
<update>Y</update>
</value>
<value>
<name>average_percent</name>
<rename>average_prof_percentage</rename>
<update>Y</update>
</value>
<value>
<name>only_general_percent</name>
<rename>only_general_percentage</rename>
<update>Y</update>
</value>
<value>
<name>no_data_percent</name>
<rename>count_nodata_percentage</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>education_level</name>
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>convicts</name>
<rename>convicts</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>752</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2 2</name>
<type>SelectValues</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<fields>
<select_unspecified>N</select_unspecified>
<meta>
<name>REC_ID</name>
<rename>REC_ID</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
<meta>
<name>SCM</name>
<rename>SCM</rename>
<type>String</type>
<length>-2</length>
<precision>-2</precision>
<conversion_mask/>
<date_format_lenient>false</date_format_lenient>
<date_format_locale/>
<date_format_timezone/>
<lenient_string_to_number>false</lenient_string_to_number>
<encoding/>
<decimal_symbol/>
<grouping_symbol/>
<currency_symbol/>
<storage_type/>
</meta>
</fields>
<attributes/>
<GUI>
<xloc>1472</xloc>
<yloc>880</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) РФ/мужчины 2</name>
<type>TableInput</type>

View file

@ -59,7 +59,7 @@
<hop>
<from>Table input (person_registry) регионы/мужчины 2</from>
<to>Insert / update (total_registered.marital_status) 2 2</to>
<enabled>Y</enabled>
<enabled>N</enabled>
</hop>
</order>
<transform>