211 lines
7 KiB
Text
211 lines
7 KiB
Text
|
|
<pipeline>
|
||
|
|
<info>
|
||
|
|
<name>info_recruits</name>
|
||
|
|
<name_sync_with_filename>Y</name_sync_with_filename>
|
||
|
|
<description/>
|
||
|
|
<extended_description/>
|
||
|
|
<pipeline_version/>
|
||
|
|
<pipeline_type>Normal</pipeline_type>
|
||
|
|
<directory>/</directory>
|
||
|
|
<parameters>
|
||
|
|
</parameters>
|
||
|
|
<capture_transform_performance>N</capture_transform_performance>
|
||
|
|
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||
|
|
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||
|
|
<created_user>-</created_user>
|
||
|
|
<created_date>2024/08/15 14:02:51.713</created_date>
|
||
|
|
<modified_user>-</modified_user>
|
||
|
|
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||
|
|
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||
|
|
<is_key_private>N</is_key_private>
|
||
|
|
</info>
|
||
|
|
<notepads>
|
||
|
|
</notepads>
|
||
|
|
<order>
|
||
|
|
<hop>
|
||
|
|
<from>Select values 4</from>
|
||
|
|
<to>Table output</to>
|
||
|
|
<enabled>Y</enabled>
|
||
|
|
</hop>
|
||
|
|
<hop>
|
||
|
|
<from>Table input</from>
|
||
|
|
<to>Select values 4</to>
|
||
|
|
<enabled>Y</enabled>
|
||
|
|
</hop>
|
||
|
|
</order>
|
||
|
|
<transform>
|
||
|
|
<name>Select values 4</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>issue_date</name>
|
||
|
|
<rename>issue_date</rename>
|
||
|
|
<type>Date</type>
|
||
|
|
<length>-2</length>
|
||
|
|
<precision>-2</precision>
|
||
|
|
<conversion_mask>yyyy-MM-dd</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/>
|
||
|
|
<cluster_schema/>
|
||
|
|
<GUI>
|
||
|
|
<xloc>448</xloc>
|
||
|
|
<yloc>208</yloc>
|
||
|
|
<draw>Y</draw>
|
||
|
|
</GUI>
|
||
|
|
</transform>
|
||
|
|
<transform>
|
||
|
|
<name>Table input</name>
|
||
|
|
<type>TableInput</type>
|
||
|
|
<description/>
|
||
|
|
<distribute>Y</distribute>
|
||
|
|
<custom_distribution/>
|
||
|
|
<copies>1</copies>
|
||
|
|
<partitioning>
|
||
|
|
<method>none</method>
|
||
|
|
<schema_name/>
|
||
|
|
</partitioning>
|
||
|
|
<connection>ervu_person_registry</connection>
|
||
|
|
<sql>SELECT
|
||
|
|
full_name,
|
||
|
|
last_name,
|
||
|
|
first_name,
|
||
|
|
middle_name,
|
||
|
|
gender,
|
||
|
|
birth_date,
|
||
|
|
extract(year from age(birth_date)) age,
|
||
|
|
birth_place,
|
||
|
|
phone,
|
||
|
|
--system_id_ern,
|
||
|
|
|
||
|
|
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 'Нет данных'
|
||
|
|
END education,
|
||
|
|
ri.info->'svedSemPolozh'->>'semPolozhNaim' 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)
|
||
|
|
) 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)
|
||
|
|
) number_children_18_old,
|
||
|
|
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number,
|
||
|
|
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series,
|
||
|
|
ri.info->'svedVoin'->'voin'->>'dataReg' issue_date,
|
||
|
|
ri.recruit_id, --id рекрута
|
||
|
|
r.target_recruitment_id as recruitment_id
|
||
|
|
FROM public.recruits_info ri
|
||
|
|
JOIN public.recruits r ON ri.recruit_id = r.id</sql>
|
||
|
|
<limit>0</limit>
|
||
|
|
<lookup/>
|
||
|
|
<execute_each_row>N</execute_each_row>
|
||
|
|
<variables_active>N</variables_active>
|
||
|
|
<lazy_conversion_active>N</lazy_conversion_active>
|
||
|
|
<attributes/>
|
||
|
|
<cluster_schema/>
|
||
|
|
<GUI>
|
||
|
|
<xloc>208</xloc>
|
||
|
|
<yloc>208</yloc>
|
||
|
|
<draw>Y</draw>
|
||
|
|
</GUI>
|
||
|
|
</transform>
|
||
|
|
<transform>
|
||
|
|
<name>Table output</name>
|
||
|
|
<type>TableOutput</type>
|
||
|
|
<description/>
|
||
|
|
<distribute>Y</distribute>
|
||
|
|
<custom_distribution/>
|
||
|
|
<copies>1</copies>
|
||
|
|
<partitioning>
|
||
|
|
<method>none</method>
|
||
|
|
<schema_name/>
|
||
|
|
</partitioning>
|
||
|
|
<connection>ervu-dashboard</connection>
|
||
|
|
<schema>ervu_dashboard</schema>
|
||
|
|
<table>citizen</table>
|
||
|
|
<commit>1000</commit>
|
||
|
|
<truncate>N</truncate>
|
||
|
|
<ignore_errors>N</ignore_errors>
|
||
|
|
<use_batch>Y</use_batch>
|
||
|
|
<specify_fields>N</specify_fields>
|
||
|
|
<partitioning_enabled>N</partitioning_enabled>
|
||
|
|
<partitioning_field/>
|
||
|
|
<partitioning_daily>N</partitioning_daily>
|
||
|
|
<partitioning_monthly>Y</partitioning_monthly>
|
||
|
|
<tablename_in_field>N</tablename_in_field>
|
||
|
|
<tablename_field/>
|
||
|
|
<tablename_in_table>Y</tablename_in_table>
|
||
|
|
<return_keys>N</return_keys>
|
||
|
|
<return_field/>
|
||
|
|
<fields>
|
||
|
|
</fields>
|
||
|
|
<attributes/>
|
||
|
|
<cluster_schema/>
|
||
|
|
<GUI>
|
||
|
|
<xloc>672</xloc>
|
||
|
|
<yloc>208</yloc>
|
||
|
|
<draw>Y</draw>
|
||
|
|
</GUI>
|
||
|
|
</transform>
|
||
|
|
<transform_error_handling>
|
||
|
|
</transform_error_handling>
|
||
|
|
<attributes/>
|
||
|
|
</pipeline>
|