This commit is contained in:
Ruslan 2025-01-23 17:30:34 +03:00
parent e7bfc585fb
commit 154276b182
14 changed files with 32157 additions and 3715 deletions

View file

@ -254,35 +254,35 @@
<hop>
<from>job_recruitments_region.hwf</from>
<to>job_recruitments_mildis.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_ratings.hwf</from>
<to>Success 3</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_recruitments_region.hwf</from>
<to>job_ratings.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_recruitments_mildis.hwf</from>
<to>job_recruitments_country.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>job_recruitments_country.hwf</from>
<to>Success 2</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -296,14 +296,14 @@
<hop>
<from>add_schema.hpl</from>
<to>job_recruitments_region.hwf</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>add_schema.hpl</from>
<to>Success</to>
<enabled>Y</enabled>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>

View file

@ -1,10 +0,0 @@
2025/01/23 09:53:46 - main_dashboard.total_registered(m_c).hpl - Using run configuration [local]
2025/01/23 09:53:46 - main_dashboard.total_registered(m_c) - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 09:53:46 - main_dashboard.total_registered(m_c) - Execution started for pipeline [main_dashboard.total_registered(m_c)]
2025/01/23 09:53:47 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 09:53:47 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2025/01/23 09:53:47 - Table input (person_registry) регион.0 - Finished reading query, closing connection.
2025/01/23 09:53:47 - Table input (person_registry) регион.0 - Finished processing (I=158, O=0, R=0, W=158, U=0, E=0)
2025/01/23 09:54:13 - Insert / update (main_dashboard.total_registered) 2.0 - Finished processing (I=158, O=158, R=158, W=158, U=0, E=0)
2025/01/23 09:54:13 - main_dashboard.total_registered(m_c) - Pipeline duration : 26.803 seconds [ 26.803" ]
2025/01/23 09:54:13 - main_dashboard.total_registered(m_c) - Execution finished on a local pipeline engine with run configuration 'local'

View file

@ -0,0 +1,547 @@
2025/01/23 17:24:17 - info_recruits - Using run configuration [local]
2025/01/23 17:24:17 - info_recruits - nr of transforms to run : 4 , nr of hops : 3
2025/01/23 17:24:17 - info_recruits - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:24:17 - info_recruits - Not running a unit test...
2025/01/23 17:24:17 - info_recruits - Execution started for pipeline [info_recruits]
2025/01/23 17:24:17 - info_recruits - I found 3 different transforms to launch.
2025/01/23 17:24:17 - info_recruits - Allocating rowsets...
2025/01/23 17:24:17 - info_recruits - Allocating rowsets for transform 0 --> Table input
2025/01/23 17:24:17 - info_recruits - prevcopies = 1, nextcopies=1
2025/01/23 17:24:17 - info_recruits - Pipeline allocated new rowset [Table input.0 - Select values 4.0]
2025/01/23 17:24:17 - info_recruits - Allocated 1 rowsets for transform 0 --> Table input
2025/01/23 17:24:17 - info_recruits - Allocating rowsets for transform 1 --> Select values 4
2025/01/23 17:24:17 - info_recruits - prevcopies = 1, nextcopies=1
2025/01/23 17:24:17 - info_recruits - Pipeline allocated new rowset [Select values 4.0 - Insert / update.0]
2025/01/23 17:24:17 - info_recruits - Allocated 2 rowsets for transform 1 --> Select values 4
2025/01/23 17:24:17 - info_recruits - Allocating rowsets for transform 2 --> Insert / update
2025/01/23 17:24:17 - info_recruits - Allocated 2 rowsets for transform 2 --> Insert / update
2025/01/23 17:24:17 - info_recruits - Allocating Transforms & TransformData...
2025/01/23 17:24:17 - info_recruits - Pipeline is about to allocate transform [Table input] of type [TableInput]
2025/01/23 17:24:17 - info_recruits - Transform has nrcopies=1
2025/01/23 17:24:17 - Table input.0 - Starting allocation of buffers & new threads...
2025/01/23 17:24:17 - Table input.0 - Transform info: nrinput=0 nroutput=1
2025/01/23 17:24:17 - Table input.0 - output rel. is 1:1
2025/01/23 17:24:17 - Table input.0 - Found output rowset [Table input.0 - Select values 4.0]
2025/01/23 17:24:17 - Table input.0 - Finished dispatching
2025/01/23 17:24:17 - info_recruits - Pipeline has allocated a new transform: [Table input].0
2025/01/23 17:24:17 - info_recruits - Pipeline is about to allocate transform [Select values 4] of type [SelectValues]
2025/01/23 17:24:17 - info_recruits - Transform has nrcopies=1
2025/01/23 17:24:17 - Select values 4.0 - Starting allocation of buffers & new threads...
2025/01/23 17:24:17 - Select values 4.0 - Transform info: nrinput=1 nroutput=1
2025/01/23 17:24:17 - Select values 4.0 - Got previous transform from [Select values 4] #0 --> Table input
2025/01/23 17:24:17 - Select values 4.0 - input rel is 1:1
2025/01/23 17:24:17 - Select values 4.0 - Found input rowset [Table input.0 - Select values 4.0]
2025/01/23 17:24:17 - Select values 4.0 - output rel. is 1:1
2025/01/23 17:24:17 - Select values 4.0 - Found output rowset [Select values 4.0 - Insert / update.0]
2025/01/23 17:24:17 - Select values 4.0 - Finished dispatching
2025/01/23 17:24:17 - info_recruits - Pipeline has allocated a new transform: [Select values 4].0
2025/01/23 17:24:17 - info_recruits - Pipeline is about to allocate transform [Insert / update] of type [InsertUpdate]
2025/01/23 17:24:17 - info_recruits - Transform has nrcopies=1
2025/01/23 17:24:17 - Insert / update.0 - Starting allocation of buffers & new threads...
2025/01/23 17:24:17 - Insert / update.0 - Transform info: nrinput=1 nroutput=0
2025/01/23 17:24:17 - Insert / update.0 - Got previous transform from [Insert / update] #0 --> Select values 4
2025/01/23 17:24:17 - Insert / update.0 - input rel is 1:1
2025/01/23 17:24:17 - Insert / update.0 - Found input rowset [Select values 4.0 - Insert / update.0]
2025/01/23 17:24:17 - Insert / update.0 - Finished dispatching
2025/01/23 17:24:17 - info_recruits - Pipeline has allocated a new transform: [Insert / update].0
2025/01/23 17:24:17 - info_recruits - Initialising 3 transforms...
2025/01/23 17:24:17 - ervu-dashboard - New database connection defined
2025/01/23 17:24:17 - ervu_person_registry - New database connection defined
2025/01/23 17:24:17 - ervu-dashboard - Connecting to database using URL: jdbc:postgresql://10.10.31.119:5432/ervu-dashboard-copy?stringtype=unspecified
2025/01/23 17:24:17 - ervu_person_registry - Connecting to database using URL: jdbc:postgresql://10.10.31.118:5432/ervu-person-registry
2025/01/23 17:24:17 - ervu_person_registry - Auto commit off
2025/01/23 17:24:17 - Table input.0 - Connected to database...
2025/01/23 17:24:17 - ervu-dashboard - Auto commit off
2025/01/23 17:24:17 - info_recruits - Transform [Table input.0] initialized flawlessly.
2025/01/23 17:24:17 - info_recruits - Transform [Select values 4.0] initialized flawlessly.
2025/01/23 17:24:17 - info_recruits - Transform [Insert / update.0] initialized flawlessly.
2025/01/23 17:24:17 - info_recruits - Data Set enabled? false
2025/01/23 17:24:17 - info_recruits - Pipeline has allocated 3 threads and 2 rowsets.
2025/01/23 17:24:17 - Table input.0 - Starting to run...
2025/01/23 17:24:17 - Select values 4.0 - Starting to run...
2025/01/23 17:24:17 - Insert / update.0 - Starting to run...
2025/01/23 17:24:17 - Table input.0 - SQL query : WITH extracted_children AS (
SELECT
ri.recruit_id,
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM
public.recruits_info ri
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
),
children_birth_dates AS (
SELECT
recruit_id,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
FROM
extracted_children
),
children_count AS (
SELECT
recruit_id,
COUNT(*) AS children_under_16
FROM
children_birth_dates
WHERE
AGE(make_date(year, month, day)) < interval '16 years'
GROUP BY
recruit_id
),
registration_reasons AS (
SELECT mrr.value AS reason_registration,
r.id AS recruit_id
FROM public.recruits AS r
JOIN public.military_registration_reason AS mrr
ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
),
driver_license AS (
SELECT
ri.recruit_id,
COALESCE(
string_agg(sved_vodit->>'kategoriya', ', '),
'Нет информации'
) AS driver_license
FROM
public.recruits_info ri
LEFT JOIN LATERAL
jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
ON true
GROUP BY ri.recruit_id
),
sports_category AS ( -- проверка на наличие спортивного разряда или звания
SELECT
ri.recruit_id,
CASE
WHEN
-- Условия для "true" (спортивная категория)
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Проверяем, что 'sport' это массив
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
WHERE
(
-- Проверяем, что 'sportRazr' существует и срок действия актуален
jsonb_typeof(sport_elem->'sportRazr') = 'object'
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
)
OR (
-- Проверяем, что 'sportZvan' существует и не пусто
sport_elem->>'sportZvan' IS NOT NULL
AND sport_elem->>'sportZvan' <> ''
)
OR (
-- Проверяем, что 'sportRazr' существует и срок действия истек
jsonb_typeof(sport_elem->'sportRazr') = 'object'
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') <= CURRENT_DATE
)
)
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
THEN true
WHEN
-- Условия для "false" (не является спортивной категорией)
(
ri.info->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
OR (
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
)
)
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
WHERE
(
-- Проверяем 'sportZvan' и если оно не существует или пусто
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
)
OR (
-- Проверяем 'sportRazr' и срок действия истек
jsonb_typeof(sport_elem->'sportRazr') = 'object'
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
-- И 'sportZvan' также не должно существовать или быть пустым
AND (sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = '')
)
)
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
THEN false
WHEN
-- Условия для "null" (нет информации)
ri.info->'svedSport'->>'prOtsSvedSport' = '1'
OR ri.info->'svedSport' IS NULL -- Проверяем, что 'svedSport' отсутствует
THEN null
ELSE null -- Неопределенное значение для всех других случаев
END AS sports_category
FROM public.recruits_info ri
),
disability_group AS (
SELECT
ri.recruit_id,
CASE
WHEN ri.info->'svedInvalid'->'invalid'->>'gruppa' IS NOT NULL
AND ri.info->'svedInvalid'->>'prOtsSvedInvalid' IS NULL
AND (ri.info->'sportRazr'->>'dataSnyat' IS NULL
OR TO_DATE(ri.info->'sportRazr'->>'dataSnyat', 'YYYY-MM-DD') <= CURRENT_DATE)
THEN ri.info->'svedInvalid'->'invalid'->>'gruppa'
WHEN ri.info->'svedInvalid'->>'prOtsSvedInvalid' = '1' THEN 'Нет информации об инвалидности'
ELSE 'Нет информации об инвалидности'
END AS disability_group
FROM public.recruits_info ri
),
tractor_license AS (
SELECT
ri.recruit_id,
CASE
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') > CURRENT_DATE
THEN true
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') <= CURRENT_DATE
THEN false
WHEN ri.info->'svedUdostrTraktMash'->>'prOtsSvedUTM' = '1' THEN null
ELSE null
END AS tractor_license
FROM public.recruits_info ri
),
is_wanted AS (
SELECT
ri.recruit_id,
CASE
WHEN
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
WHERE
criminal_prosecution->>'dataPrekrashh' IS NULL -- дата прекращения отсутствует
)
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
THEN true
WHEN
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
WHERE
criminal_prosecution->>'dataPrekrashh' IS NOT NULL -- дата прекращения не отсутствует
)
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
THEN false
WHEN
ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' = '1'
THEN NULL
ELSE NULL
END AS criminal_prosecution
FROM public.recruits_info ri
),
employment AS (
SELECT
ri.recruit_id,
COALESCE(
CASE
WHEN (
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
)
) OR (
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
)
) THEN 'Обучается'
ELSE NULL
END ||
CASE
WHEN jsonb_typeof(info->'svedTrud'->'trudDeyat') = 'array'
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(info->'svedTrud'->'trudDeyat') AS trud
WHERE trud->>'prAktMestRab' = '1'
) THEN
CASE
WHEN (
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
)
) OR (
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
)
) THEN ', Работает'
ELSE 'Работает'
END
ELSE NULL
END,
CASE
WHEN
info->'svedVUZ'->>'prOtsSvedVUZ' = '1' -- Отсутствие сведений о вузе
AND info->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' -- Отсутствие сведений о колледже
AND info->'svedTrud'->>'prOtsSvedTrud' = '1' -- Отсутствие сведений о работе
THEN 'Нет информации'
ELSE 'Нет информации'
END
) AS employment_status
FROM public.recruits_info ri
)
SELECT
r.full_name,
r.last_name,
r.first_name,
r.middle_name,
r.gender,
r.birth_date,
EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
r.birth_place,
r.phone,
r.conscription AS deferment_liberation,
CASE
WHEN (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 70 AND r.gender = 'MALE' AND
(r.conscription IS NULL OR r.conscription = false) AND
COALESCE(cc.children_under_16, 0) < 5
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
OR
(EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 45 AND r.gender = 'FEMALE' AND
(r.conscription IS NULL OR r.conscription = false) AND
COALESCE(cc.children_under_16, 0) < 5
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
THEN true
ELSE false
END AS mobilization,
CASE
WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
AND gender = 'MALE' -- мужчины от 18 до 30 лет
AND (conscription IS NULL OR conscription = false)
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
THEN true
ELSE false
END AS urgent_service,
CASE WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
AND gender = 'MALE' -- мужчины от 18 до 50 лет
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' -- признак отсутствия данных о судимости
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
THEN true
ELSE false
END AS contract_service,
CASE
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'true' THEN 'Состоит на воинском учете'
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'false' THEN 'Не состоит на воинском учете'
ELSE 'Нет информации'
END AS is_registered,
CASE
WHEN (EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5'))
OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
)) THEN 'Высшее'
WHEN (EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' = '10')
OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' = '10'
)) THEN 'Среднее профессиональное'
WHEN (EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('7', '9'))
OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('7', '9')
)) THEN 'Общее'
WHEN ((ri.info->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
ELSE 'Не указано' -- Добавлено условие по умолчанию
END AS education,
ri.info->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
(SELECT COUNT(*)
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
) AS number_children,
(SELECT COUNT(*)
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) >= make_interval(years => 18)
) AS number_children_18_old,
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
ri.info->'svedVoin'->'voin'->>'dataReg' AS issue_date,
ri.recruit_id, -- ID рекрута
r.target_recruitment_id AS recruitment_id,
rr.reason_registration, -- причина постановки на учет char
sc.sports_category, -- наличие спортивной категории bool
dl.driver_license, -- категории водительских удостоверений char
dg.disability_group, -- группа инвалидности char
tl.tractor_license, -- наличие удостоверения тракториста bool
iw.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
em.employment_status AS employment, -- занятость char
r.system_update_date AS update_date
FROM
public.recruits_info ri
JOIN
public.recruits r ON ri.recruit_id = r.id
LEFT JOIN
children_count cc ON r.id = cc.recruit_id -- Присоединение для получения количества детей
JOIN
registration_reasons rr ON rr.recruit_id = ri.recruit_id
JOIN
sports_category sc ON sc.recruit_id = ri.recruit_id
JOIN
driver_license dl ON dl.recruit_id = ri.recruit_id
JOIN
disability_group dg ON dg.recruit_id = ri.recruit_id
JOIN
tractor_license tl ON tl.recruit_id = ri.recruit_id
JOIN
is_wanted iw ON iw.recruit_id = ri.recruit_id
JOIN
employment em ON em.recruit_id = ri.recruit_id
WHERE
r.target_recruitment_id IS NOT NULL
AND r.current_recruitment_id IS NOT NULL
AND r.system_update_date >= '2024/12/07 08:55:45.592540000';
2025/01/23 17:24:19 - Table input.0 - Signaling 'output done' to 1 output rowsets.
2025/01/23 17:24:19 - Table input.0 - Finished reading query, closing connection.
2025/01/23 17:24:19 - ervu_person_registry - Commit on database connection [ervu_person_registry]
2025/01/23 17:24:19 - ervu_person_registry - Connection to database closed!
2025/01/23 17:24:19 - Table input.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:24:19 - Select values 4.0 - Got row from previous transform: [Евдокимов Вениамин Харламович], [Евдокимов], [Вениамин], [Харламович], [MALE], [2003/08/27 00:00:00.000], [21.0], [Россия, г. Пермь, Западная ул., д. 3], [null], [null], [Y], [Y], [N], [Состоит на воинском учете], [Не указано], [null], [0], [0], [null], [null], [null], [e2292c61-933a-427d-ba2e-832c1a681521], [1d31138e-0f5c-45b7-b87b-1c97de07beb8], [Приобретение гражданства Российской Федерации], [null], [Нет информации], [Нет информации об инвалидности], [null], [null], [Нет информации], [2024/12/07 08:55:45.592540000]
2025/01/23 17:24:19 - Select values 4.0 - Wrote row to next transform: [Евдокимов Вениамин Харламович], [Евдокимов], [Вениамин], [Харламович], [MALE], [2003/08/27 00:00:00.000], [21.0], [Россия, г. Пермь, Западная ул., д. 3], [null], [null], [Y], [Y], [N], [Состоит на воинском учете], [Не указано], [null], [0], [0], [null], [null], [null], [e2292c61-933a-427d-ba2e-832c1a681521], [1d31138e-0f5c-45b7-b87b-1c97de07beb8], [Приобретение гражданства Российской Федерации], [null], [Нет информации], [Нет информации об инвалидности], [null], [null], [Нет информации], [2024/12/07 08:55:45.592540000]
2025/01/23 17:24:19 - Insert / update.0 - Checking row: [Евдокимов Вениамин Харламович], [Евдокимов], [Вениамин], [Харламович], [MALE], [2003/08/27 00:00:00.000], [21.0], [Россия, г. Пермь, Западная ул., д. 3], [null], [null], [Y], [Y], [N], [Состоит на воинском учете], [Не указано], [null], [0], [0], [null], [null], [null], [e2292c61-933a-427d-ba2e-832c1a681521], [1d31138e-0f5c-45b7-b87b-1c97de07beb8], [Приобретение гражданства Российской Федерации], [null], [Нет информации], [Нет информации об инвалидности], [null], [null], [Нет информации], [2024/12/07 08:55:45.592540000]
2025/01/23 17:24:19 - Insert / update.0 - Field [recruit_id] has nr. 21
2025/01/23 17:24:19 - Insert / update.0 - Field [recruit_id] has nr. 21
2025/01/23 17:24:19 - Insert / update.0 - Field [age] has nr. 6
2025/01/23 17:24:19 - Insert / update.0 - Field [birth_date] has nr. 5
2025/01/23 17:24:19 - Insert / update.0 - Field [birth_place] has nr. 7
2025/01/23 17:24:19 - Insert / update.0 - Field [contract_service] has nr. 12
2025/01/23 17:24:19 - Insert / update.0 - Field [deferment_liberation] has nr. 9
2025/01/23 17:24:19 - Insert / update.0 - Field [disability_group] has nr. 26
2025/01/23 17:24:19 - Insert / update.0 - Field [driver_license] has nr. 25
2025/01/23 17:24:19 - Insert / update.0 - Field [education] has nr. 14
2025/01/23 17:24:19 - Insert / update.0 - Field [employment] has nr. 29
2025/01/23 17:24:19 - Insert / update.0 - Field [first_name] has nr. 2
2025/01/23 17:24:19 - Insert / update.0 - Field [full_name] has nr. 0
2025/01/23 17:24:19 - Insert / update.0 - Field [gender] has nr. 4
2025/01/23 17:24:19 - Insert / update.0 - Field [is_registered] has nr. 13
2025/01/23 17:24:19 - Insert / update.0 - Field [is_wanted] has nr. 28
2025/01/23 17:24:19 - Insert / update.0 - Field [issue_date] has nr. 20
2025/01/23 17:24:19 - Insert / update.0 - Field [last_name] has nr. 1
2025/01/23 17:24:19 - Insert / update.0 - Field [marital_status] has nr. 15
2025/01/23 17:24:19 - Insert / update.0 - Field [middle_name] has nr. 3
2025/01/23 17:24:19 - Insert / update.0 - Field [mobilization] has nr. 10
2025/01/23 17:24:19 - Insert / update.0 - Field [number_children] has nr. 16
2025/01/23 17:24:19 - Insert / update.0 - Field [number_children_18_old] has nr. 17
2025/01/23 17:24:19 - Insert / update.0 - Field [passport_number] has nr. 18
2025/01/23 17:24:19 - Insert / update.0 - Field [passport_series] has nr. 19
2025/01/23 17:24:19 - Insert / update.0 - Field [phone] has nr. 8
2025/01/23 17:24:19 - Insert / update.0 - Field [reason_registration] has nr. 23
2025/01/23 17:24:19 - Insert / update.0 - Field [recruitment_id] has nr. 22
2025/01/23 17:24:19 - Insert / update.0 - Field [sports_category] has nr. 24
2025/01/23 17:24:19 - Insert / update.0 - Field [tractor_license] has nr. 27
2025/01/23 17:24:19 - Insert / update.0 - Field [update_date] has nr. 30
2025/01/23 17:24:19 - Insert / update.0 - Field [urgent_service] has nr. 11
2025/01/23 17:24:19 - Select values 4.0 - Signaling 'output done' to 1 output rowsets.
2025/01/23 17:24:19 - Select values 4.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:24:19 - Insert / update.0 - Setting preparedStatement to [SELECT recruit_id, age, birth_date, birth_place, contract_service, deferment_liberation, disability_group, driver_license, education, employment, first_name, full_name, gender, is_registered, is_wanted, issue_date, last_name, marital_status, middle_name, mobilization, number_children, number_children_18_old, passport_number, passport_series, phone, reason_registration, recruitment_id, sports_category, tractor_license, update_date, urgent_service FROM ervu_dashboard.citizen WHERE ( ( recruit_id = ? ) ) ]
2025/01/23 17:24:19 - ervu-dashboard - Preparing statement:
2025/01/23 17:24:19 - ervu-dashboard - INSERT INTO ervu_dashboard.citizen (recruit_id, age, birth_date, birth_place, contract_service, deferment_liberation, disability_group, driver_license, education, employment, first_name, full_name, gender, is_registered, is_wanted, issue_date, last_name, marital_status, middle_name, mobilization, number_children, number_children_18_old, passport_number, passport_series, phone, reason_registration, recruitment_id, sports_category, tractor_license, update_date, urgent_service) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2025/01/23 17:24:19 - Insert / update.0 - Setting update preparedStatement to [UPDATE ervu_dashboard.citizen
2025/01/23 17:24:19 - Insert / update.0 - SET age = ?
2025/01/23 17:24:19 - Insert / update.0 - , birth_date = ?
2025/01/23 17:24:19 - Insert / update.0 - , birth_place = ?
2025/01/23 17:24:19 - Insert / update.0 - , contract_service = ?
2025/01/23 17:24:19 - Insert / update.0 - , deferment_liberation = ?
2025/01/23 17:24:19 - Insert / update.0 - , disability_group = ?
2025/01/23 17:24:19 - Insert / update.0 - , driver_license = ?
2025/01/23 17:24:19 - Insert / update.0 - , education = ?
2025/01/23 17:24:19 - Insert / update.0 - , employment = ?
2025/01/23 17:24:19 - Insert / update.0 - , first_name = ?
2025/01/23 17:24:19 - Insert / update.0 - , full_name = ?
2025/01/23 17:24:19 - Insert / update.0 - , gender = ?
2025/01/23 17:24:19 - Insert / update.0 - , is_registered = ?
2025/01/23 17:24:19 - Insert / update.0 - , is_wanted = ?
2025/01/23 17:24:19 - Insert / update.0 - , issue_date = ?
2025/01/23 17:24:19 - Insert / update.0 - , last_name = ?
2025/01/23 17:24:19 - Insert / update.0 - , marital_status = ?
2025/01/23 17:24:19 - Insert / update.0 - , middle_name = ?
2025/01/23 17:24:19 - Insert / update.0 - , mobilization = ?
2025/01/23 17:24:19 - Insert / update.0 - , number_children = ?
2025/01/23 17:24:19 - Insert / update.0 - , number_children_18_old = ?
2025/01/23 17:24:19 - Insert / update.0 - , passport_number = ?
2025/01/23 17:24:19 - Insert / update.0 - , passport_series = ?
2025/01/23 17:24:19 - Insert / update.0 - , phone = ?
2025/01/23 17:24:19 - Insert / update.0 - , reason_registration = ?
2025/01/23 17:24:19 - Insert / update.0 - , recruitment_id = ?
2025/01/23 17:24:19 - Insert / update.0 - , sports_category = ?
2025/01/23 17:24:19 - Insert / update.0 - , tractor_license = ?
2025/01/23 17:24:19 - Insert / update.0 - , update_date = ?
2025/01/23 17:24:19 - Insert / update.0 - , urgent_service = ?
2025/01/23 17:24:19 - Insert / update.0 - WHERE ( ( recruit_id = ? ) ) ]
2025/01/23 17:24:19 - Insert / update.0 - Values set for lookup: [e2292c61-933a-427d-ba2e-832c1a681521]
2025/01/23 17:24:19 - Insert / update.0 - Found row for update: ![Евдокимов Вениамин Харламович], [Евдокимов], [Вениамин], [Харламович], [MALE], [2003/08/27 00:00:00.000], [21.0], [Россия, г. Пермь, Западная ул., д. 3], [null], [null], [Y], [Y], [N], [Состоит на воинском учете], [Не указано], [null], [0], [0], [null], [null], [null], [e2292c61-933a-427d-ba2e-832c1a681521], [1d31138e-0f5c-45b7-b87b-1c97de07beb8], [Приобретение гражданства Российской Федерации], [null], [Нет информации], [Нет информации об инвалидности], [null], [null], [Нет информации], [2024/12/07 08:55:45.592540000]
2025/01/23 17:24:19 - Insert / update.0 - Signaling 'output done' to 0 output rowsets.
2025/01/23 17:24:19 - ervu-dashboard - Commit on database connection [ervu-dashboard]
2025/01/23 17:24:19 - ervu-dashboard - Commit on database connection [ervu-dashboard]
2025/01/23 17:24:19 - ervu-dashboard - Connection to database closed!
2025/01/23 17:24:19 - Insert / update.0 - Finished processing (I=1, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:24:19 - info_recruits - Pipeline duration : 1.736 seconds [ 1.736" ]
2025/01/23 17:24:19 - info_recruits - Execution finished on a local pipeline engine with run configuration 'local'

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,406 @@
2025/01/23 17:17:11 - job_recruitments_all - Start of workflow execution
2025/01/23 17:17:11 - job_recruitments_all - Starting action [job_recruitments_milcom.hwf]
2025/01/23 17:18:23 - job_recruitments_all - Starting action [add_schema.hpl]
2025/01/23 17:18:23 - add_schema.hpl - Using run configuration [local]
2025/01/23 17:18:23 - add_schema - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:18:23 - add_schema - Execution started for pipeline [add_schema]
2025/01/23 17:18:23 - Table input.0 - Finished reading query, closing connection.
2025/01/23 17:18:23 - Table input.0 - Finished processing (I=158, O=0, R=0, W=1896, U=0, E=0)
2025/01/23 17:18:24 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=158, O=158, R=158, W=158, U=0, E=0)
2025/01/23 17:18:24 - Insert / update (main_dashboard.waiting_registration).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.removed_registry).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.marital_status).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (main_dashboard.total_registered).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.child_minor).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.education_level).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.subpoenas).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:24 - Insert / update (total_registered.driver_license).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:25 - Insert / update (total_registered.age).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:25 - Insert / update (total_registered.busyness).0 - Finished processing (I=158, O=0, R=158, W=158, U=158, E=0)
2025/01/23 17:18:25 - add_schema - Pipeline duration : 1.53 seconds [ 1.530" ]
2025/01/23 17:18:25 - add_schema - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:18:25 - job_recruitments_all - Starting action [job_recruitments_region.hwf]
2025/01/23 17:22:33 - job_recruitments_all - Starting action [job_recruitments_mildis.hwf]
2025/01/23 17:23:07 - job_recruitments_all - Starting action [job_recruitments_country.hwf]
2025/01/23 17:23:07 - job_recruitments_country - Start of workflow execution
2025/01/23 17:23:07 - job_recruitments_country - Starting action [select_recruitments_country]
2025/01/23 17:23:07 - select_recruitments_country - Using run configuration [local]
2025/01/23 17:23:07 - select_recruitments_country - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:07 - select_recruitments_country - Execution started for pipeline [select_recruitments_country]
2025/01/23 17:23:07 - Table input/регион.0 - Finished reading query, closing connection.
2025/01/23 17:23:07 - Table input/регион.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:07 - Copy rows to result.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:07 - select_recruitments_country - Pipeline duration : 0.093 seconds [ 0.093" ]
2025/01/23 17:23:07 - select_recruitments_country - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:07 - job_recruitments_country - Starting action [main_dashboard.appeals]
2025/01/23 17:23:07 - main_dashboard.appeals - Using run configuration [local]
2025/01/23 17:23:07 - main_dashboard.appeals - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:07 - main_dashboard.appeals - Execution started for pipeline [main_dashboard.appeals]
2025/01/23 17:23:08 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Table input (appeal_document) РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Get variables 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Table input (appeal_document) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Select values 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - main_dashboard.appeals - Pipeline duration : 0.242 seconds [ 0.242" ]
2025/01/23 17:23:08 - main_dashboard.appeals - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:08 - job_recruitments_country - Starting action [Success]
2025/01/23 17:23:08 - job_recruitments_country - Finished action [Success] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Finished action [main_dashboard.appeals] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Starting action [main_dashboard.recruitment_campaign]
2025/01/23 17:23:08 - main_dashboard.recruitment_campaign - Using run configuration [local]
2025/01/23 17:23:08 - main_dashboard.recruitment_campaign - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:08 - main_dashboard.recruitment_campaign - Execution started for pipeline [main_dashboard.recruitment_campaign]
2025/01/23 17:23:08 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=2, U=0, E=0)
2025/01/23 17:23:08 - Table input (subpoena) РФ/осень.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Table input (subpoena) РФ/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Table input (subpoena) РФ/весна.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Table input (subpoena) РФ/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Insert / update (main_dashboard.recruitment_campaign) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Insert / update (main_dashboard.recruitment_campaign).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - main_dashboard.recruitment_campaign - Pipeline duration : 0.309 seconds [ 0.309" ]
2025/01/23 17:23:08 - main_dashboard.recruitment_campaign - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:08 - job_recruitments_country - Starting action [Success 2]
2025/01/23 17:23:08 - job_recruitments_country - Finished action [Success 2] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Finished action [main_dashboard.recruitment_campaign] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Starting action [main_dashboard.total_registered]
2025/01/23 17:23:08 - main_dashboard.total_registered - Using run configuration [local]
2025/01/23 17:23:08 - main_dashboard.total_registered - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:08 - main_dashboard.total_registered - Execution started for pipeline [main_dashboard.total_registered]
2025/01/23 17:23:08 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Table input (person_registry) РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Table input (person_registry) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Insert / update (main_dashboard.total_registered).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - main_dashboard.total_registered - Pipeline duration : 0.202 seconds [ 0.202" ]
2025/01/23 17:23:08 - main_dashboard.total_registered - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:08 - job_recruitments_country - Starting action [Success 3]
2025/01/23 17:23:08 - job_recruitments_country - Finished action [Success 3] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Finished action [main_dashboard.total_registered] (result=[true])
2025/01/23 17:23:08 - job_recruitments_country - Starting action [main_dashboard.waiting_registration]
2025/01/23 17:23:08 - main_dashboard.waiting_registration - Using run configuration [local]
2025/01/23 17:23:08 - main_dashboard.waiting_registration - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:08 - main_dashboard.waiting_registration - Execution started for pipeline [main_dashboard.waiting_registration]
2025/01/23 17:23:08 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Table input 2 (person_registry) РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:08 - Table input 2 (person_registry) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:08 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - Insert / update (main_dashboard.waiting_registration).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:08 - main_dashboard.waiting_registration - Pipeline duration : 0.253 seconds [ 0.253" ]
2025/01/23 17:23:08 - main_dashboard.waiting_registration - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:08 - job_recruitments_country - Starting action [Success 4]
2025/01/23 17:23:09 - job_recruitments_country - Finished action [Success 4] (result=[true])
2025/01/23 17:23:09 - job_recruitments_country - Finished action [main_dashboard.waiting_registration] (result=[true])
2025/01/23 17:23:09 - job_recruitments_country - Starting action [recruitment_campaign.subpoenas]
2025/01/23 17:23:09 - recruitment_campaign.subpoenas - Using run configuration [local]
2025/01/23 17:23:09 - recruitment_campaign.subpoenas - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:09 - recruitment_campaign.subpoenas - Execution started for pipeline [recruitment_campaign.subpoenas]
2025/01/23 17:23:09 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=2, U=0, E=0)
2025/01/23 17:23:09 - Table input (subpoena) осень/РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Table input (subpoena) Весна/РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Table input (subpoena) осень/РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:09 - Table input (subpoena) Весна/РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:09 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Insert / update (recruitment_campaign.subpoenas) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Insert / update (recruitment_campaign.subpoenas).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - recruitment_campaign.subpoenas - Pipeline duration : 0.561 seconds [ 0.561" ]
2025/01/23 17:23:09 - recruitment_campaign.subpoenas - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:09 - job_recruitments_country - Starting action [Success 6]
2025/01/23 17:23:09 - job_recruitments_country - Finished action [Success 6] (result=[true])
2025/01/23 17:23:09 - job_recruitments_country - Finished action [recruitment_campaign.subpoenas] (result=[true])
2025/01/23 17:23:09 - job_recruitments_country - Starting action [total_registered.reg_mil_cat]
2025/01/23 17:23:09 - total_registered.reg_mil_cat - Using run configuration [local]
2025/01/23 17:23:09 - total_registered.reg_mil_cat - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:09 - total_registered.reg_mil_cat - Execution started for pipeline [total_registered.reg_mil_cat]
2025/01/23 17:23:09 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=2, U=0, E=0)
2025/01/23 17:23:09 - Table input (person_registry) РФ/не на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Table input (person_registry) РФ/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:09 - Table input (person_registry) РФ/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:09 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Table input (person_registry) РФ/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:09 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Insert / update (total_registered.reg_mil_cat) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - Insert / update (total_registered.reg_mil_cat).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:09 - total_registered.reg_mil_cat - Pipeline duration : 0.324 seconds [ 0.324" ]
2025/01/23 17:23:09 - total_registered.reg_mil_cat - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:09 - job_recruitments_country - Starting action [Success 7]
2025/01/23 17:23:10 - job_recruitments_country - Finished action [Success 7] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Finished action [total_registered.reg_mil_cat] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Starting action [total_registered.removed_registry]
2025/01/23 17:23:10 - total_registered.removed_registry - Using run configuration [local]
2025/01/23 17:23:10 - total_registered.removed_registry - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:10 - total_registered.removed_registry - Execution started for pipeline [total_registered.removed_registry]
2025/01/23 17:23:10 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:10 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:10 - Table input (decision-document-service) РФ.0 - Finished reading query, closing connection.
2025/01/23 17:23:10 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Table input (decision-document-service) РФ.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:10 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Insert / update (total_registered.removed_registry).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - total_registered.removed_registry - Pipeline duration : 0.212 seconds [ 0.212" ]
2025/01/23 17:23:10 - total_registered.removed_registry - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:10 - job_recruitments_country - Starting action [Success 8]
2025/01/23 17:23:10 - job_recruitments_country - Finished action [Success 8] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Finished action [total_registered.removed_registry] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Starting action [total_registered.subpoenas]
2025/01/23 17:23:10 - total_registered.subpoenas - Using run configuration [local]
2025/01/23 17:23:10 - total_registered.subpoenas - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:10 - total_registered.subpoenas - Execution started for pipeline [total_registered.subpoenas]
2025/01/23 17:23:10 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:10 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=2, U=0, E=0)
2025/01/23 17:23:10 - Table input (subpoena)РФ/рег.0 - Finished reading query, closing connection.
2025/01/23 17:23:10 - Table input (subpoena) РФ/не рег.0 - Finished reading query, closing connection.
2025/01/23 17:23:10 - Table input (subpoena)РФ/рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:10 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Table input (subpoena) РФ/не рег.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:10 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Insert / update (total_registered.subpoenas).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - Insert / update (total_registered.subpoenas) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:10 - total_registered.subpoenas - Pipeline duration : 0.285 seconds [ 0.285" ]
2025/01/23 17:23:10 - total_registered.subpoenas - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:10 - job_recruitments_country - Starting action [Success 9]
2025/01/23 17:23:10 - job_recruitments_country - Finished action [Success 9] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Finished action [total_registered.subpoenas] (result=[true])
2025/01/23 17:23:10 - job_recruitments_country - Starting action [total_registered.driver_license]
2025/01/23 17:23:10 - total_registered.driver_license - Using run configuration [local]
2025/01/23 17:23:10 - total_registered.driver_license - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:10 - total_registered.driver_license - Execution started for pipeline [total_registered.driver_license]
2025/01/23 17:23:10 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=3, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.driver_license) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.driver_license) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.driver_license) 2 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - total_registered.driver_license - Pipeline duration : 0.407 seconds [ 0.407" ]
2025/01/23 17:23:11 - total_registered.driver_license - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:11 - job_recruitments_country - Starting action [Success 10]
2025/01/23 17:23:11 - job_recruitments_country - Finished action [Success 10] (result=[true])
2025/01/23 17:23:11 - job_recruitments_country - Finished action [total_registered.driver_license] (result=[true])
2025/01/23 17:23:11 - job_recruitments_country - Starting action [total_registered.child_minor]
2025/01/23 17:23:11 - total_registered.child_minor - Using run configuration [local]
2025/01/23 17:23:11 - total_registered.child_minor - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:11 - total_registered.child_minor - Execution started for pipeline [total_registered.child_minor]
2025/01/23 17:23:11 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=3, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry)РФ/женщины.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Table input (person_registry)РФ/мужчины.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Table input (person_registry)РФ/все.0 - Finished reading query, closing connection.
2025/01/23 17:23:11 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry)РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry)РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Table input (person_registry)РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:11 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.child_minor) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.child_minor).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - Insert / update (total_registered.child_minor) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:11 - total_registered.child_minor - Pipeline duration : 0.519 seconds [ 0.519" ]
2025/01/23 17:23:11 - total_registered.child_minor - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:11 - job_recruitments_country - Starting action [Success 11]
2025/01/23 17:23:11 - job_recruitments_country - Finished action [Success 11] (result=[true])
2025/01/23 17:23:11 - job_recruitments_country - Finished action [total_registered.child_minor] (result=[true])
2025/01/23 17:23:11 - job_recruitments_country - Starting action [total_registered.age]
2025/01/23 17:23:11 - total_registered.age - Using run configuration [local]
2025/01/23 17:23:11 - total_registered.age - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:11 - total_registered.age - Execution started for pipeline [total_registered.age]
2025/01/23 17:23:12 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=6, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/все/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/все/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2 5.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/все/не на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2 6.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2 4.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Select values 2 2 6.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2 4.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/все/не на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.age) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - total_registered.age - Pipeline duration : 0.692 seconds [ 0.692" ]
2025/01/23 17:23:12 - total_registered.age - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:12 - job_recruitments_country - Starting action [Success 12]
2025/01/23 17:23:12 - job_recruitments_country - Finished action [Success 12] (result=[true])
2025/01/23 17:23:12 - job_recruitments_country - Finished action [total_registered.age] (result=[true])
2025/01/23 17:23:12 - job_recruitments_country - Starting action [total_registered.marital_status]
2025/01/23 17:23:12 - total_registered.marital_status - Using run configuration [local]
2025/01/23 17:23:12 - total_registered.marital_status - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:12 - total_registered.marital_status - Execution started for pipeline [total_registered.marital_status]
2025/01/23 17:23:12 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=3, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection.
2025/01/23 17:23:12 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.marital_status) .0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.marital_status) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - Insert / update (total_registered.marital_status) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:12 - total_registered.marital_status - Pipeline duration : 0.401 seconds [ 0.401" ]
2025/01/23 17:23:12 - total_registered.marital_status - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:12 - job_recruitments_country - Starting action [Success 13]
2025/01/23 17:23:12 - job_recruitments_country - Finished action [Success 13] (result=[true])
2025/01/23 17:23:12 - job_recruitments_country - Finished action [total_registered.marital_status] (result=[true])
2025/01/23 17:23:12 - job_recruitments_country - Starting action [total_registered.education_level]
2025/01/23 17:23:12 - total_registered.education_level - Using run configuration [local]
2025/01/23 17:23:12 - total_registered.education_level - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:12 - total_registered.education_level - Execution started for pipeline [total_registered.education_level]
2025/01/23 17:23:13 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:13 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=3, U=0, E=0)
2025/01/23 17:23:13 - Table input (person_registry) РФ/все.0 - Finished reading query, closing connection.
2025/01/23 17:23:13 - Table input (person_registry) РФ/женщины.0 - Finished reading query, closing connection.
2025/01/23 17:23:13 - Table input (person_registry) РФ/все.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:13 - Table input (person_registry) РФ/мужчины.0 - Finished reading query, closing connection.
2025/01/23 17:23:13 - Table input (person_registry) РФ/мужчины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:13 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Table input (person_registry) РФ/женщины.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:13 - Insert / update (total_registered.education_level) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Insert / update (total_registered.education_level).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - Insert / update (total_registered.education_level) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:13 - total_registered.education_level - Pipeline duration : 0.45 seconds [ 0.450" ]
2025/01/23 17:23:13 - total_registered.education_level - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:13 - job_recruitments_country - Starting action [Success 14]
2025/01/23 17:23:13 - job_recruitments_country - Finished action [Success 14] (result=[true])
2025/01/23 17:23:13 - job_recruitments_country - Finished action [total_registered.education_level] (result=[true])
2025/01/23 17:23:13 - job_recruitments_country - Starting action [total_registered.busyness]
2025/01/23 17:23:13 - total_registered.busyness - Using run configuration [local]
2025/01/23 17:23:13 - total_registered.busyness - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:13 - total_registered.busyness - Execution started for pipeline [total_registered.busyness]
2025/01/23 17:23:14 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=6, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (person_registry) РФ/женщины/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (person_registry) РФ/женщины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/мужчины/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/все/на учете.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/все/на учете.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/все/на учете 2.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (person_registry) РФ/мужчины/на учете 2.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (person_registry) РФ/все/на учете 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2 4.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/женщины/на учете 2.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (person_registry) РФ/женщины/на учете 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 4.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (person_registry) РФ/мужчины/на учете 2.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 3 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness) 2 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness) 4.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness) 3.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (total_registered.busyness) 3 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - total_registered.busyness - Pipeline duration : 0.693 seconds [ 0.693" ]
2025/01/23 17:23:14 - total_registered.busyness - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:14 - job_recruitments_country - Starting action [Success 15]
2025/01/23 17:23:14 - job_recruitments_country - Finished action [Success 15] (result=[true])
2025/01/23 17:23:14 - job_recruitments_country - Finished action [total_registered.busyness] (result=[true])
2025/01/23 17:23:14 - job_recruitments_country - Starting action [recruitment_campaign.appeals]
2025/01/23 17:23:14 - recruitment_campaign.appeals - Using run configuration [local]
2025/01/23 17:23:14 - recruitment_campaign.appeals - Executing this pipeline using the Local Pipeline Engine with run configuration 'local'
2025/01/23 17:23:14 - recruitment_campaign.appeals - Execution started for pipeline [recruitment_campaign.appeals]
2025/01/23 17:23:14 - Execute SQL script.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Execute SQL script.0 - Finished processing (I=0, O=0, R=0, W=2, U=0, E=0)
2025/01/23 17:23:14 - Table input (appeal_document) РФ/весна.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Table input (appeal_document) РФ/осень.0 - Finished reading query, closing connection.
2025/01/23 17:23:14 - Get variables 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (appeal_document) РФ/весна.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Table input (appeal_document) РФ/осень.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2025/01/23 17:23:14 - Get variables 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Select values 2 2 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (main_dashboard.appeals) 2.0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - Insert / update (main_dashboard.appeals).0 - Finished processing (I=1, O=1, R=1, W=1, U=0, E=0)
2025/01/23 17:23:14 - recruitment_campaign.appeals - Pipeline duration : 0.286 seconds [ 0.286" ]
2025/01/23 17:23:14 - recruitment_campaign.appeals - Execution finished on a local pipeline engine with run configuration 'local'
2025/01/23 17:23:14 - job_recruitments_country - Starting action [Success 16]
2025/01/23 17:23:14 - job_recruitments_country - Finished action [Success 16] (result=[true])
2025/01/23 17:23:14 - job_recruitments_country - Finished action [recruitment_campaign.appeals] (result=[true])
2025/01/23 17:23:14 - job_recruitments_country - Finished action [select_recruitments_country] (result=[true])
2025/01/23 17:23:14 - job_recruitments_country - Workflow execution finished
2025/01/23 17:23:14 - job_recruitments_country - Workflow duration : 6.854 seconds [ 6.854" ]
2025/01/23 17:23:14 - job_recruitments_all - Starting action [Success 2]
2025/01/23 17:23:14 - job_recruitments_all - Finished action [Success 2] (result=[true])
2025/01/23 17:23:14 - job_recruitments_all - Finished action [job_recruitments_country.hwf] (result=[true])
2025/01/23 17:23:14 - job_recruitments_all - Finished action [job_recruitments_mildis.hwf] (result=[true])
2025/01/23 17:23:14 - job_recruitments_all - Starting action [job_ratings.hwf]
2025/01/23 17:23:37 - job_recruitments_all - Starting action [Success 3]
2025/01/23 17:23:37 - job_recruitments_all - Finished action [Success 3] (result=[true])
2025/01/23 17:23:37 - job_recruitments_all - Finished action [job_ratings.hwf] (result=[true])
2025/01/23 17:23:37 - job_recruitments_all - Finished action [job_recruitments_region.hwf] (result=[true])
2025/01/23 17:23:37 - job_recruitments_all - Finished action [add_schema.hpl] (result=[true])
2025/01/23 17:23:37 - job_recruitments_all - Finished action [job_recruitments_milcom.hwf] (result=[true])
2025/01/23 17:23:37 - job_recruitments_all - Workflow execution finished
2025/01/23 17:23:37 - job_recruitments_all - Workflow duration : 386.08 seconds [ 6' 26" ]

View file

@ -469,10 +469,10 @@
<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>1360</xloc>
<xloc>1088</xloc>
<yloc>640</yloc>
<attributes_hac/>
</action>
@ -482,7 +482,7 @@
<type>SUCCESS</type>
<attributes/>
<parallel>N</parallel>
<xloc>1568</xloc>
<xloc>1296</xloc>
<yloc>640</yloc>
<attributes_hac/>
</action>
@ -581,12 +581,8 @@
<loglevel>Basic</loglevel>
<parameters>
<parameter>
<name>SCM</name>
<stream_name>SCHEMA</stream_name>
</parameter>
<parameter>
<name>REC_ID</name>
<stream_name>RECRUITMENT_ID</stream_name>
<name>ARR_MC</name>
<stream_name>ARRAY_MIL_COM</stream_name>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
@ -597,7 +593,7 @@
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1088</xloc>
<yloc>2000</yloc>
<yloc>832</yloc>
<attributes_hac/>
</action>
<action>
@ -607,7 +603,7 @@
<attributes/>
<parallel>N</parallel>
<xloc>1296</xloc>
<yloc>2000</yloc>
<yloc>832</yloc>
<attributes_hac/>
</action>
<action>
@ -625,12 +621,8 @@
<loglevel>Basic</loglevel>
<parameters>
<parameter>
<name>SCM</name>
<stream_name>SCHEMA</stream_name>
</parameter>
<parameter>
<name>REC_ID</name>
<stream_name>RECRUITMENT_ID</stream_name>
<name>ARR_MC</name>
<stream_name>ARRAY_MIL_COM</stream_name>
</parameter>
<pass_all_parameters>Y</pass_all_parameters>
</parameters>
@ -641,7 +633,7 @@
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1088</xloc>
<yloc>2080</yloc>
<yloc>896</yloc>
<attributes_hac/>
</action>
<action>
@ -651,7 +643,7 @@
<attributes/>
<parallel>N</parallel>
<xloc>1296</xloc>
<yloc>2080</yloc>
<yloc>896</yloc>
<attributes_hac/>
</action>
<action>
@ -685,7 +677,7 @@
<wait_until_finished>Y</wait_until_finished>
<parallel>N</parallel>
<xloc>1088</xloc>
<yloc>2160</yloc>
<yloc>1728</yloc>
<attributes_hac/>
</action>
<action>
@ -695,7 +687,7 @@
<attributes/>
<parallel>N</parallel>
<xloc>1296</xloc>
<yloc>2160</yloc>
<yloc>1728</yloc>
<attributes_hac/>
</action>
<action>
@ -827,105 +819,28 @@
<hop>
<from>Start</from>
<to>select_recruitments_milcom(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>Y</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>main_dashboard.recruitment_campaign(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>main_dashboard.total_registered(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>main_dashboard.waiting_registration(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>recruitment_campaign.subpoenas(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.reg_mil_cat(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.removed_registry(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.subpoenas(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.driver_license(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.child_minor(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.age(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.marital_status(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.education_level(m_c).hpl</to>
<enabled>N</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>total_registered.busyness(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>select_recruitments_milcom(m_c).hpl</from>
<to>recruitment_campaign.appeals(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -946,49 +861,49 @@
<hop>
<from>array_recruitments.hpl</from>
<to>main_dashboard.appeals(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>main_dashboard.total_registered(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>main_dashboard.waiting_registration(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.reg_mil_cat(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.removed_registry(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.subpoenas(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.driver_license(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -1002,7 +917,28 @@
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.age(m_c).hpl</to>
<enabled>N</enabled>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.education_level(m_c).hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.child_minor(m_c).hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
<hop>
<from>array_recruitments.hpl</from>
<to>total_registered.busyness(m_c).hpl</to>
<enabled>Y</enabled>
<evaluation>Y</evaluation>
<unconditional>N</unconditional>
</hop>
@ -1029,15 +965,11 @@
<fontitalic>N</fontitalic>
<fontname>Segoe UI</fontname>
<fontsize>9</fontsize>
<height>137</height>
<height>73</height>
<xloc>1488</xloc>
<yloc>1072</yloc>
<note>total_registered.child_minor - доработать (отложил)
total_registered.marital_status - доработать (в процессе)
main_dashboard.recruitment_campaign - продумать разделение весна /осень, доработать под массивы и обьединить
<note>main_dashboard.recruitment_campaign - продумать разделение весна /осень, доработать под массивы и обьединить
recruitment_campaign.subpoena - продумать разделение весна /осень, доработать под массивы и обьединить
total_registered.education_level - доработать под массивы и обьединить
total_registered.busyness - доработать под массивы и обьединить
recruitment_campaign.appeals - продумать разделение весна /осень, доработать под массивы и обьединить
</note>
<width>652</width>

View file

@ -58,13 +58,28 @@
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.child_minor)</to>
<enabled>N</enabled>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Insert / update (total_registered.age)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input</from>
<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>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update (main_dashboard.appeals)</name>
@ -262,6 +277,55 @@
<yloc>688</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.busyness)</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>
<schema>total_registered</schema>
<table>busyness</table>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>Y</update>
</value>
<value>
<name>recording_date</name>
<rename>recording_date</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>848</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.child_minor)</name>
<type>InsertUpdate</type>
@ -360,6 +424,104 @@
<yloc>528</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level)</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>
<schema>total_registered</schema>
<table>education_level</table>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>Y</update>
</value>
<value>
<name>recording_date</name>
<rename>recording_date</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>928</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.marital_status)</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>
<schema>total_registered</schema>
<table>marital_status</table>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>Y</update>
</value>
<value>
<name>recording_date</name>
<rename>recording_date</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>768</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.reg_mil_cat)</name>
<type>InsertUpdate</type>

View file

@ -31,51 +31,11 @@
<to>Get variables 4 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Get variables 4 2 2</from>
<to>Select values 4 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 4 2 2</from>
<to>Insert / update (total_registered.child_minor) 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Get variables 4 2 2 2</from>
<to>Select values 4 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 4 2 2 2</from>
<to>Insert / update (total_registered.child_minor) 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry)РФ/мужчины</from>
<to>Get variables 4 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry)РФ/женщины</from>
<to>Get variables 4 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry)регион/все</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry)РФ/мужчины</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry)РФ/женщины</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 4 2</from>
<to>Insert / update (total_registered.child_minor) 3</to>
@ -108,7 +68,7 @@
<single_statement>N</single_statement>
<sql>DELETE FROM total_registered.child_minor
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL')
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')
</sql>
<attributes/>
<GUI>
@ -149,280 +109,6 @@ WHERE recording_date = current_date
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 4 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>1056</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 4 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>1056</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.child_minor) 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>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</name>
</key>
<schema>total_registered</schema>
<table>child_minor</table>
<value>
<name>no_child</name>
<rename>no_children</rename>
<update>Y</update>
</value>
<value>
<name>"1_child"</name>
<rename>one_child</rename>
<update>Y</update>
</value>
<value>
<name>"2_child"</name>
<rename>two_children</rename>
<update>Y</update>
</value>
<value>
<name>"3_child"</name>
<rename>three_children</rename>
<update>Y</update>
</value>
<value>
<name>"4_more_child"</name>
<rename>four_or_more_children</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>no_child_percent</name>
<rename>no_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"1_child_percent"</name>
<rename>one_child_percent</rename>
<update>Y</update>
</value>
<value>
<name>"2_child_percent"</name>
<rename>two_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"3_child_percent"</name>
<rename>three_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"4_more_child_percent"</name>
<rename>four_or_more_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
<value>
<name>total_count</name>
<rename>total_count</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.child_minor) 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>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</name>
</key>
<schema>total_registered</schema>
<table>child_minor</table>
<value>
<name>no_child</name>
<rename>no_children</rename>
<update>Y</update>
</value>
<value>
<name>"1_child"</name>
<rename>one_child</rename>
<update>Y</update>
</value>
<value>
<name>"2_child"</name>
<rename>two_children</rename>
<update>Y</update>
</value>
<value>
<name>"3_child"</name>
<rename>three_children</rename>
<update>Y</update>
</value>
<value>
<name>"4_more_child"</name>
<rename>four_or_more_children</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>no_child_percent</name>
<rename>no_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"1_child_percent"</name>
<rename>one_child_percent</rename>
<update>Y</update>
</value>
<value>
<name>"2_child_percent"</name>
<rename>two_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"3_child_percent"</name>
<rename>three_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>"4_more_child_percent"</name>
<rename>four_or_more_children_percent</rename>
<update>Y</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
<value>
<name>total_count</name>
<rename>total_count</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1504</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.child_minor) 3</name>
<type>InsertUpdate</type>
@ -447,6 +133,11 @@ WHERE recording_date = current_date
<field>recording_date</field>
<name>recording_date</name>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
</key>
<schema>total_registered</schema>
<table>child_minor</table>
<value>
@ -576,316 +267,6 @@ WHERE recording_date = current_date
<yloc>480</yloc>
</GUI>
</transform>
<transform>
<name>Select values 4 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>1248</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Select values 4 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>1248</xloc>
<yloc>704</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 extracted_children AS (
SELECT
ri.recruit_id,
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM
public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
children_birth_dates AS (
SELECT
recruit_id,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
FROM
extracted_children
),
children_count AS (
SELECT
recruit_id,
COUNT(*) AS children_under_18
FROM
children_birth_dates
WHERE
make_date(year, month, day) > CURRENT_DATE - INTERVAL '18 years'
GROUP BY
recruit_id
),
final_counts AS (
SELECT
COALESCE(children_under_18, 0) AS children_count,
COUNT(*) AS num_people
FROM
public.recruits_info ri
LEFT JOIN
children_count cc ON ri.recruit_id = cc.recruit_id
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
GROUP BY
COALESCE(children_under_18, 0)
),
total_women AS (
SELECT
COUNT(*) AS total_women_count
FROM
public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
)
SELECT
'W' AS gender,
'${REC_ID}' AS recruitment_id,
'${SCM}' AS schema,
(SELECT total_women_count FROM total_women) AS total_count,
COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) AS no_children,
COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) AS one_child,
COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) AS two_children,
COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) AS three_children,
COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) AS four_or_more_children,
ROUND(COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_women_count FROM total_women), 0), 2) AS no_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_women_count FROM total_women), 0), 2) AS one_child_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_women_count FROM total_women), 0), 2) AS two_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_women_count FROM total_women), 0), 2) AS three_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_women_count FROM total_women), 0), 2) AS four_or_more_children_percent
FROM
final_counts;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>816</xloc>
<yloc>704</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 extracted_children AS (
SELECT
ri.recruit_id,
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM
public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'MALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
children_birth_dates AS (
SELECT
recruit_id,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
FROM
extracted_children
),
children_count AS (
SELECT
recruit_id,
COUNT(*) AS children_under_18
FROM
children_birth_dates
WHERE
make_date(year, month, day) > CURRENT_DATE - INTERVAL '18 years'
GROUP BY
recruit_id
),
final_counts AS (
SELECT
COALESCE(children_under_18, 0) AS children_count,
COUNT(*) AS num_people
FROM
public.recruits_info ri
LEFT JOIN
children_count cc ON ri.recruit_id = cc.recruit_id
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'MALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
GROUP BY
COALESCE(children_under_18, 0)
),
total_men AS (
SELECT
COUNT(*) AS total_men_count
FROM
public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'MALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
)
SELECT
'M' AS gender,
'${REC_ID}' AS recruitment_id,
'${SCM}' AS schema,
(SELECT total_men_count FROM total_men) AS total_count,
COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) AS no_children,
COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) AS one_child,
COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) AS two_children,
COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) AS three_children,
COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) AS four_or_more_children,
ROUND(COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_men_count FROM total_men), 0), 2) AS no_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_men_count FROM total_men), 0), 2) AS one_child_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_men_count FROM total_men), 0), 2) AS two_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_men_count FROM total_men), 0), 2) AS three_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_men_count FROM total_men), 0), 2) AS four_or_more_children_percent
FROM
final_counts;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>816</xloc>
<yloc>608</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry)регион/все</name>
<type>TableInput</type>
@ -900,7 +281,7 @@ FROM
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH
<sql>WITH
ids AS (
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
),
@ -910,167 +291,114 @@ gender_separations AS (
SELECT 'FEMALE' AS gender
),
data_combinations AS (
-- Создаём все комбинации target_recruitment_id и gender
SELECT
i.recruitment_id AS recruitment_id,
gs.gender
g.gender
FROM ids i
CROSS JOIN gender_separations gs
),
base_data AS (
SELECT
ri.recruit_id,
r.target_recruitment_id AS recruitment_id,
r.gender,
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM public.recruits r
JOIN public.recruits_info ri ON ri.recruit_id = r.id
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
AND r.gender IN ('MALE', 'FEMALE')
order by ri.recruit_id, r.gender, ri.info
CROSS JOIN gender_separations g
),
extracted_children AS (
SELECT
ri.recruit_id,
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
FROM public.recruits r
JOIN public.recruits_info ri ON ri.recruit_id = r.id
FROM
public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND (r.gender = 'MALE' OR r.gender = 'FEMALE')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id IS NOT NULL
AND r.gender IN ('MALE', 'FEMALE')
),
children_birth_dates AS (
SELECT
recruit_id,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
FROM
extracted_children
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
),
children_count AS (
SELECT
recruit_id,
COUNT(*) AS children_under_18
COUNT(*) FILTER (
WHERE make_date(
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int,
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int
) > CURRENT_DATE - INTERVAL '18 years'
) AS children_under_18
FROM
children_birth_dates
WHERE
make_date(year, month, day) > CURRENT_DATE - INTERVAL '18 years'
GROUP BY recruit_id
extracted_children
GROUP BY
recruit_id
),
final_counts AS (
gender_and_recruitment_data AS (
SELECT
dc.recruitment_id,
current_date AS recording_date,
CASE
WHEN dc.gender = 'MALE' THEN 'M'
WHEN dc.gender = 'FEMALE' THEN 'W'
ELSE NULL
END AS gender,
COALESCE(children_under_18, 0) AS children_count,
COUNT(*) AS num_people
FROM data_combinations dc
LEFT JOIN base_data bd ON bd.recruitment_id = dc.recruitment_id AND bd.gender = dc.gender
LEFT JOIN children_count cc ON bd.recruit_id = cc.recruit_id
GROUP BY
dc.recruitment_id, dc.gender, COALESCE(children_under_18, 0)
),
final_counts_all AS (
SELECT
END gender,
dc.recruitment_id,
'ALL' AS gender,
COALESCE(children_under_18, 0) AS children_count,
COUNT(*) AS num_people
FROM data_combinations dc
LEFT JOIN base_data bd ON bd.recruitment_id = dc.recruitment_id AND bd.gender = dc.gender
LEFT JOIN children_count cc ON bd.recruit_id = cc.recruit_id
GROUP BY
dc.recruitment_id, COALESCE(children_under_18, 0)
),
total_count AS (
SELECT
CASE
WHEN dc.gender = 'MALE' THEN 'M'
WHEN dc.gender = 'FEMALE' THEN 'W'
ELSE NULL
END AS gender,
dc.recruitment_id,
COUNT(*) AS total_count
FROM data_combinations dc
LEFT JOIN base_data bd ON bd.recruitment_id = dc.recruitment_id AND bd.gender = dc.gender
LEFT JOIN children_count cc ON bd.recruit_id = cc.recruit_id
GROUP BY dc.gender, dc.recruitment_id
),
total_count_all AS (
SELECT
'ALL' AS gender,
dc.recruitment_id,
COUNT(*) AS total_count
FROM data_combinations dc
LEFT JOIN base_data bd ON bd.recruitment_id = dc.recruitment_id AND bd.gender = dc.gender
LEFT JOIN children_count cc ON bd.recruit_id = cc.recruit_id
GROUP BY dc.recruitment_id
),
final_data AS (
SELECT
fc.gender,
fc.recruitment_id,
tc.total_count,
fc.children_count,
fc.num_people
COUNT(r.id) AS total_count,
COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) AS no_children,
COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) AS one_child,
COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) AS two_children,
COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) AS three_children,
COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) AS four_or_more_children,
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 0) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS no_children_percent,
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 1) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS one_child_percent,
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 2) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS two_children_percent,
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) = 3) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS three_children_percent,
ROUND(COUNT(r.id) FILTER (WHERE COALESCE(children_under_18, 0) >= 4) * 100.0 / NULLIF(COUNT(r.id), 0), 2) AS four_or_more_children_percent
FROM
final_counts fc
JOIN total_count tc ON fc.recruitment_id = tc.recruitment_id AND fc.gender = tc.gender
WHERE fc.gender = 'M'
UNION ALL
SELECT
fc.gender,
fc.recruitment_id,
tc.total_count,
fc.children_count,
fc.num_people
FROM
final_counts fc
JOIN total_count tc ON fc.recruitment_id = tc.recruitment_id AND fc.gender = tc.gender
WHERE fc.gender = 'W'
UNION ALL
SELECT
'ALL' AS gender,
fca.recruitment_id,
tca.total_count,
fca.children_count,
fca.num_people
FROM
final_counts_all fca
JOIN total_count_all tca ON fca.recruitment_id = tca.recruitment_id
data_combinations dc
LEFT JOIN public.recruits r
ON r.gender = dc.gender
AND r.target_recruitment_id::uuid = dc.recruitment_id
AND r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.current_recruitment_id IS NOT NULL
LEFT JOIN children_count cc
ON r.id = cc.recruit_id
GROUP BY
dc.gender,
dc.recruitment_id
)
SELECT
current_date AS recording_date,
recording_date,
gender,
recruitment_id,
total_count,
COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) AS no_children,
COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) AS one_child,
COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) AS two_children,
COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) AS three_children,
COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) AS four_or_more_children,
ROUND(COALESCE(SUM(CASE WHEN children_count = 0 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_count FROM final_data), 0), 2) AS no_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 1 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_count FROM final_data), 0), 2) AS one_child_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 2 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_count FROM final_data), 0), 2) AS two_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count = 3 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_count FROM final_data), 0), 2) AS three_children_percent,
ROUND(COALESCE(SUM(CASE WHEN children_count >= 4 THEN num_people ELSE 0 END), 0) * 100.0 / NULLIF((SELECT total_count FROM final_data), 0), 2) AS four_or_more_children_percent
FROM
final_data
GROUP BY gender, recruitment_id, total_count
no_children,
one_child,
two_children,
three_children,
four_or_more_children,
ROUND(no_children * 100.0 / NULLIF(total_count, 0), 2) AS no_children_percent,
ROUND(one_child * 100.0 / NULLIF(total_count, 0), 2) AS one_child_percent,
ROUND(two_children * 100.0 / NULLIF(total_count, 0), 2) AS two_children_percent,
ROUND(three_children * 100.0 / NULLIF(total_count, 0), 2) AS three_children_percent,
ROUND(four_or_more_children * 100.0 / NULLIF(total_count, 0), 2) AS four_or_more_children_percent
FROM
gender_and_recruitment_data
</sql>
UNION ALL
SELECT
recording_date,
'ALL' AS gender,
recruitment_id,
SUM(total_count) AS total_count,
SUM(no_children) AS no_children,
SUM(one_child) AS one_child,
SUM(two_children) AS two_children,
SUM(three_children) AS three_children,
SUM(four_or_more_children) AS four_or_more_children,
ROUND(SUM(no_children) * 100.0 / NULLIF(SUM(total_count), 0), 2) AS no_children_percent,
ROUND(SUM(one_child) * 100.0 / NULLIF(SUM(total_count), 0), 2) AS one_child_percent,
ROUND(SUM(two_children) * 100.0 / NULLIF(SUM(total_count), 0), 2) AS two_children_percent,
ROUND(SUM(three_children) * 100.0 / NULLIF(SUM(total_count), 0), 2) AS three_children_percent,
ROUND(SUM(four_or_more_children) * 100.0 / NULLIF(SUM(total_count), 0), 2) AS four_or_more_children_percent
FROM
gender_and_recruitment_data
GROUP BY
recording_date,
recruitment_id;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>

View file

@ -21,98 +21,53 @@
<notepads>
</notepads>
<order>
<hop>
<from>Get variables 3 2</from>
<to>Select values 3 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get variables 3 2 2</from>
<to>Select values 3 2 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Get variables 3 2 2 2</from>
<to>Select values 3 2 2 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Select values 3 2</from>
<to>Insert / update (total_registered.education_level)</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input (person_registry) РФ/все</from>
<to>Get variables 3 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input (person_registry) РФ/мужчины</from>
<to>Get variables 3 2 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input (person_registry) РФ/женщины</from>
<to>Get variables 3 2 2 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Select values 3 2 2</from>
<to>Insert / update (total_registered.education_level) 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Select values 3 2 2 2</from>
<to>Insert / update (total_registered.education_level) 3</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) РФ/все</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) РФ/мужчины</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) РФ/женщины</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Get variables 3 2</name>
<type>GetVariable</type>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<distribute>N</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>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>N</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>DELETE FROM total_registered.education_level
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL', 'empty')</sql>
<attributes/>
<GUI>
<xloc>1328</xloc>
<yloc>336</yloc>
<xloc>768</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
@ -148,133 +103,6 @@
<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>656</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level)</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>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</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>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>336</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level) 2</name>
<type>InsertUpdate</type>
@ -292,12 +120,17 @@
<key>
<condition>=</condition>
<field>recruitment_id</field>
<name>REC_ID</name>
<name>recruitment_id</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</name>
<field>recording_date</field>
<name>recording_date</name>
</key>
<key>
<condition>=</condition>
<field>"all_M_W"</field>
<name>gender</name>
</key>
<schema>total_registered</schema>
<table>education_level</table>
@ -356,11 +189,6 @@
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -369,154 +197,6 @@
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.education_level) 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>recruitment_id</field>
<name>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</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>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1728</xloc>
<yloc>656</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 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>336</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2</name>
<type>SelectValues</type>
@ -571,314 +251,6 @@
<yloc>496</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>656</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 total_count AS (
SELECT
COUNT(*) AS total
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
education_status AS (
SELECT
ri.id,
-- Высшее образование (российское или иностранное)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
)
) AS has_higher,
-- Среднее профессиональное образование (если нет высшего)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' = '10'
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' = '10'
)
) AS has_average_prof,
-- Общее образование (если нет высшего и среднего)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('7', '9')
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('7', '9')
)
) AS has_only_general,
-- Нет данных об образовании (российское или иностранное)
(
NOT (
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
)
)
) AND (
ri.info->'svedRObr'->>'prOtsRObr' = '1'
OR ri.info->'svedInObr'->>'prOtsInObr' = '1'
)
) AS has_no_data
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
final_counts AS (
SELECT
COUNT(DISTINCT CASE WHEN has_higher THEN id END) AS higher,
COUNT(DISTINCT CASE WHEN NOT has_higher AND has_average_prof THEN id END) AS average_prof,
COUNT(DISTINCT CASE WHEN NOT has_higher AND NOT has_average_prof AND has_only_general THEN id END) AS only_general,
COUNT(DISTINCT CASE WHEN has_no_data THEN id END) AS count_nodata
FROM education_status
)
SELECT
'ALL' AS gender,
'${REC_ID}' AS recruitment_id,
'${SCM}' AS schema,
higher AS higher,
average_prof AS average_prof,
only_general AS only_general,
count_nodata AS count_nodata,
total_count.total,
ROUND(higher * 100.0 / NULLIF(total_count.total, 0), 2) AS higher_percentage,
ROUND(average_prof * 100.0 / NULLIF(total_count.total, 0), 2) AS average_prof_percentage,
ROUND(only_general * 100.0 / NULLIF(total_count.total, 0), 2) AS only_general_percentage,
ROUND(count_nodata * 100.0 / NULLIF(total_count.total, 0), 2) AS count_nodata_percentage
FROM final_counts, total_count;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>336</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 total_count AS (
SELECT
COUNT(*) AS total
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true' AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
education_status AS (
SELECT
ri.id,
-- Высшее образование (российское или иностранное)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
)
) AS has_higher,
-- Среднее профессиональное образование (если нет высшего)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' = '10'
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' = '10'
)
) AS has_average_prof,
-- Общее образование (если нет высшего и среднего)
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
AND education->>'kodUrObr' IN ('7', '9')
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
AND education->>'kodUrObr' IN ('7', '9')
)
) AS has_only_general,
-- Нет данных об образовании (российское или иностранное)
(
NOT (
(
EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
)
)
) AND (
ri.info->'svedRObr'->>'prOtsRObr' = '1'
OR ri.info->'svedInObr'->>'prOtsInObr' = '1'
)
) AS has_no_data
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true' AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
),
final_counts AS (
SELECT
COUNT(DISTINCT CASE WHEN has_higher THEN id END) AS higher,
COUNT(DISTINCT CASE WHEN NOT has_higher AND has_average_prof THEN id END) AS average_prof,
COUNT(DISTINCT CASE WHEN NOT has_higher AND NOT has_average_prof AND has_only_general THEN id END) AS only_general,
COUNT(DISTINCT CASE WHEN has_no_data THEN id END) AS count_nodata
FROM education_status
)
SELECT
'W' AS gender,
'${REC_ID}' AS recruitment_id,
'${SCM}' AS schema,
higher AS higher,
average_prof AS average_prof,
only_general AS only_general,
count_nodata AS count_nodata,
total_count.total,
ROUND(higher * 100.0 / NULLIF(total_count.total, 0), 2) AS higher_percentage,
ROUND(average_prof * 100.0 / NULLIF(total_count.total, 0), 2) AS average_prof_percentage,
ROUND(only_general * 100.0 / NULLIF(total_count.total, 0), 2) AS only_general_percentage,
ROUND(count_nodata * 100.0 / NULLIF(total_count.total, 0), 2) AS count_nodata_percentage
FROM final_counts, total_count;</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1088</xloc>
<yloc>656</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) РФ/мужчины</name>
<type>TableInput</type>
@ -893,19 +265,27 @@ FROM final_counts, total_count;</sql>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>WITH total_count AS (
SELECT
COUNT(*) AS total
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true' AND r.gender = 'MALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
<sql>WITH
ids AS (
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_MC}'), ','))::uuid AS recruitment_id
),
gender_separations AS (
SELECT 'MALE' AS gender
UNION ALL
SELECT 'FEMALE' AS gender
),
data_combinations AS (
SELECT
i.recruitment_id AS recruitment_id,
gs.gender
FROM ids i
CROSS JOIN gender_separations gs
),
education_status AS (
SELECT
ri.id,
r.target_recruitment_id AS recruitment_id,
r.gender,
-- Высшее образование (российское или иностранное)
(
EXISTS (
@ -916,7 +296,7 @@ education_status AS (
) OR EXISTS (
SELECT 1
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
WHERE jsonb_typeof(ri.info->'svedInObr'-&gt;'inObr') = 'array'
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
)
) AS has_higher,
@ -973,32 +353,71 @@ education_status AS (
FROM public.recruits_info ri
JOIN public.recruits r ON ri.recruit_id = r.id
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true' AND r.gender = 'MALE'
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND (r.gender = 'MALE' OR r.gender = 'FEMALE')
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
AND r.target_recruitment_id::uuid IN (SELECT recruitment_id FROM ids)
),
final_counts AS (
SELECT
COUNT(DISTINCT CASE WHEN has_higher THEN id END) AS higher,
COUNT(DISTINCT CASE WHEN NOT has_higher AND has_average_prof THEN id END) AS average_prof,
COUNT(DISTINCT CASE WHEN NOT has_higher AND NOT has_average_prof AND has_only_general THEN id END) AS only_general,
COUNT(DISTINCT CASE WHEN has_no_data THEN id END) AS count_nodata
FROM education_status
dc.gender,
dc.recruitment_id,
COUNT(DISTINCT es.id) AS total,
COUNT(DISTINCT CASE WHEN es.has_higher THEN es.id END) AS higher,
COUNT(DISTINCT CASE WHEN NOT es.has_higher AND es.has_average_prof THEN es.id END) AS average_prof,
COUNT(DISTINCT CASE WHEN NOT es.has_higher AND NOT es.has_average_prof AND es.has_only_general THEN es.id END) AS only_general,
COUNT(DISTINCT CASE WHEN es.has_no_data THEN es.id END) AS count_nodata
FROM data_combinations dc
LEFT JOIN education_status es
ON dc.recruitment_id = es.recruitment_id
AND dc.gender = es.gender
GROUP BY dc.recruitment_id, dc.gender
),
final_counts_all AS (
SELECT
'ALL' AS gender,
recruitment_id,
SUM(total) AS total,
SUM(higher) AS higher,
SUM(average_prof) AS average_prof,
SUM(only_general) AS only_general,
SUM(count_nodata) AS count_nodata
FROM final_counts
GROUP BY recruitment_id
)
SELECT
'M' AS gender,
'${REC_ID}' AS recruitment_id,
'${SCM}' AS schema,
higher AS higher,
average_prof AS average_prof,
only_general AS only_general,
count_nodata AS count_nodata,
total_count.total,
ROUND(higher * 100.0 / NULLIF(total_count.total, 0), 2) AS higher_percentage,
ROUND(average_prof * 100.0 / NULLIF(total_count.total, 0), 2) AS average_prof_percentage,
ROUND(only_general * 100.0 / NULLIF(total_count.total, 0), 2) AS only_general_percentage,
ROUND(count_nodata * 100.0 / NULLIF(total_count.total, 0), 2) AS count_nodata_percentage
FROM final_counts, total_count;</sql>
current_date AS recording_date,
CASE
WHEN fc.gender = 'MALE' THEN 'M'
WHEN fc.gender = 'FEMALE' THEN 'W'
ELSE NULL
END AS gender,
fc.recruitment_id,
fc.higher,
fc.average_prof,
fc.only_general,
fc.count_nodata,
fc.total,
ROUND(fc.higher * 100.0 / NULLIF(fc.total, 0), 2) AS higher_percentage,
ROUND(fc.average_prof * 100.0 / NULLIF(fc.total, 0), 2) AS average_prof_percentage,
ROUND(fc.only_general * 100.0 / NULLIF(fc.total, 0), 2) AS only_general_percentage,
ROUND(fc.count_nodata * 100.0 / NULLIF(fc.total, 0), 2) AS count_nodata_percentage
FROM final_counts fc
UNION ALL
SELECT
current_date AS recording_date,
fca.gender,
fca.recruitment_id,
fca.higher,
fca.average_prof,
fca.only_general,
fca.count_nodata,
fca.total,
ROUND(fca.higher * 100.0 / NULLIF(fca.total, 0), 2) AS higher_percentage,
ROUND(fca.average_prof * 100.0 / NULLIF(fca.total, 0), 2) AS average_prof_percentage,
ROUND(fca.only_general * 100.0 / NULLIF(fca.total, 0), 2) AS only_general_percentage,
ROUND(fca.count_nodata * 100.0 / NULLIF(fca.total, 0), 2) AS count_nodata_percentage
FROM final_counts_all fca</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
@ -1006,39 +425,6 @@ FROM final_counts, total_count;</sql>
<yloc>496</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>N</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>Y</replace_variables>
<set_params>N</set_params>
<single_statement>N</single_statement>
<sql>DELETE FROM total_registered.education_level
WHERE recording_date = current_date
AND schema IN ('Department', 'MD_LVL', 'REG_LVL')
AND recruitment_id = '${REC_ID}'</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>768</xloc>
<yloc>496</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -21,66 +21,26 @@
<notepads>
</notepads>
<order>
<hop>
<from>Get variables 3 2</from>
<to>Select values 3 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Get variables 3 2 2</from>
<to>Select values 3 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry) регионы/все</from>
<to>Get variables 3 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Get variables 3 2 2 2</from>
<to>Select values 3 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry) регионы/мужчины</from>
<to>Get variables 3 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry) регионы/женщины</from>
<to>Get variables 3 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 3 2</from>
<to>Insert / update (total_registered.marital_status) </to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 3 2 2</from>
<to>Insert / update (total_registered.marital_status) 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Select values 3 2 2 2</from>
<to>Insert / update (total_registered.marital_status) 3</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) регионы/все</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) регионы/мужчины</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Execute SQL script</from>
<to>Table input (person_registry) регионы/женщины</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input (person_registry) регионы/мужчины</from>
<to>Insert / update (total_registered.marital_status) 2</to>
@ -116,39 +76,6 @@ WHERE recording_date = current_date
<yloc>544</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 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>1280</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>Get variables 3 2 2</name>
<type>GetVariable</type>
@ -182,113 +109,6 @@ WHERE recording_date = current_date
<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>1280</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.marital_status) </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>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</name>
</key>
<schema>total_registered</schema>
<table>marital_status</table>
<value>
<name>married</name>
<rename>married</rename>
<update>Y</update>
</value>
<value>
<name>not_married</name>
<rename>not_married</rename>
<update>Y</update>
</value>
<value>
<name>married_percent</name>
<rename>married_percent</rename>
<update>Y</update>
</value>
<value>
<name>not_married_percent</name>
<rename>not_married_percent</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>marital_status</name>
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.marital_status) 2</name>
<type>InsertUpdate</type>
@ -355,6 +175,16 @@ WHERE recording_date = current_date
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>other</name>
<rename>other</rename>
<update>Y</update>
</value>
<value>
<name>other_percent</name>
<rename>other_percent</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
@ -363,134 +193,6 @@ WHERE recording_date = current_date
<yloc>544</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update (total_registered.marital_status) 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>recruitment_id</field>
<name>REC_ID</name>
</key>
<key>
<condition>=</condition>
<field>schema</field>
<name>SCM</name>
</key>
<schema>total_registered</schema>
<table>marital_status</table>
<value>
<name>married</name>
<rename>married</rename>
<update>Y</update>
</value>
<value>
<name>not_married</name>
<rename>not_married</rename>
<update>Y</update>
</value>
<value>
<name>married_percent</name>
<rename>married_percent</rename>
<update>Y</update>
</value>
<value>
<name>not_married_percent</name>
<rename>not_married_percent</rename>
<update>Y</update>
</value>
<value>
<name>"all_M_W"</name>
<rename>gender</rename>
<update>N</update>
</value>
<value>
<name>recruitment_id</name>
<rename>recruitment_id</rename>
<update>N</update>
</value>
<value>
<name>marital_status</name>
<rename>total</rename>
<update>Y</update>
</value>
<value>
<name>schema</name>
<rename>schema</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>Y</update_bypassed>
<attributes/>
<GUI>
<xloc>1680</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 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>1424</xloc>
<yloc>384</yloc>
</GUI>
</transform>
<transform>
<name>Select values 3 2 2</name>
<type>SelectValues</type>
@ -545,140 +247,6 @@ WHERE recording_date = current_date
<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>1424</xloc>
<yloc>704</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>SELECT
COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе') OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL) AS not_married,
COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')) AS married,
COUNT(*) AS total,
ROUND(COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе') OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL) * 100.0 / NULLIF(COUNT(*), 0), 2) AS not_married_percent,
ROUND(COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS married_percent,
'ALL' AS gender,
'${SCM}' AS schema,
'${REC_ID}' AS recruitment_id
FROM
public.recruits r
JOIN
public.recruits_info ri ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1056</xloc>
<yloc>384</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>SELECT
COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе') OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL) AS not_married,
COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')) AS married,
COUNT(*) AS total,
ROUND(COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе') OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL) * 100.0 / NULLIF(COUNT(*), 0), 2) AS not_married_percent,
ROUND(COUNT(*) FILTER (WHERE ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')) * 100.0 / NULLIF(COUNT(*), 0), 2) AS married_percent,
'W' AS gender,
'${SCM}' AS schema,
'${REC_ID}' AS recruitment_id
FROM
public.recruits r
JOIN
public.recruits_info ri ON ri.recruit_id = r.id
WHERE
r.vu_current_info->>'isMilitaryRegistered' = 'true'
AND r.gender = 'FEMALE'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id = '${REC_ID}'
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>1040</xloc>
<yloc>704</yloc>
</GUI>
</transform>
<transform>
<name>Table input (person_registry) регионы/мужчины</name>
<type>TableInput</type>
@ -726,8 +294,9 @@ married_counts AS (
SELECT
dc.recruitment_id,
dc.gender,
COUNT(*) FILTER (WHERE rd.sem_pol IN ('Вдова/Вдовец', 'В разводе') OR rd.sem_pol IS NULL) AS not_married,
COUNT(*) FILTER (WHERE rd.sem_pol IN ('Вдова/Вдовец', 'В разводе', 'Вдовец', 'Холост')) AS not_married,
COUNT(*) FILTER (WHERE rd.sem_pol = 'В браке') AS married,
COUNT(*) FILTER (WHERE rd.sem_pol IS NULL OR rd.sem_pol = 'Отсутствуют сведения о семейном положении') AS other,
COUNT(*) AS total
FROM data_combinations dc
LEFT JOIN recruit_data rd
@ -742,6 +311,7 @@ all_counts AS (
'ALL' AS gender,
SUM(not_married) AS not_married,
SUM(married) AS married,
SUM(other) AS other,
SUM(total) AS total
FROM married_counts
GROUP BY recruitment_id
@ -751,9 +321,15 @@ SELECT
mc.not_married,
mc.married,
mc.total,
mc.other,
ROUND(mc.not_married * 100.0 / NULLIF(mc.total, 0), 2) AS not_married_percent,
ROUND(mc.married * 100.0 / NULLIF(mc.total, 0), 2) AS married_percent,
mc.gender,
ROUND(mc.other * 100.0 / NULLIF(mc.total, 0), 2) AS other_percent,
CASE
WHEN mc.gender = 'MALE' THEN 'M'
WHEN mc.gender = 'FEMALE' THEN 'W'
ELSE NULL
END AS gender,
current_date AS recording_date,
mc.recruitment_id
FROM married_counts mc
@ -762,8 +338,10 @@ SELECT
ac.not_married,
ac.married,
ac.total,
ac.other,
ROUND(ac.not_married * 100.0 / NULLIF(ac.total, 0), 2) AS not_married_percent,
ROUND(ac.married * 100.0 / NULLIF(ac.total, 0), 2) AS married_percent,
ROUND(ac.other * 100.0 / NULLIF(ac.total, 0), 2) AS other_percent,
ac.gender,
current_date AS recording_date,
ac.recruitment_id