add new mappings
This commit is contained in:
commit
9019dc61e5
317 changed files with 89457 additions and 22 deletions
245
mappings_new/region/appeals.reasons_appeal(reg).hpl
Normal file
245
mappings_new/region/appeals.reasons_appeal(reg).hpl
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.reasons_appeal(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/27 11:51:55.468</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/27 11:51:55.468</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) регионы</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update (main_dashboard.appeals) 2</from>
|
||||
<to>Execute SQL script 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM appeals.reasons_appeal
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Organization'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Execute SQL script 2</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>
|
||||
<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 appeals.reasons_appeal
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'REG_LVL'
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1296</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals) 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<schema>appeals</schema>
|
||||
<table>reasons_appeal</table>
|
||||
<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>appeal</name>
|
||||
<rename>appeal</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>incorrect_inf</name>
|
||||
<rename>incorrect_inf</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>incorrect_inf_percent</name>
|
||||
<rename>incorrect_inf_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sending_documents</name>
|
||||
<rename>sending_documents</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sending_documents_percent</name>
|
||||
<rename>sending_documents_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_disagreement</name>
|
||||
<rename>decision_disagreement</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_disagreement_persent</name>
|
||||
<rename>decision_disagreement_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>complaint_withdrawal</name>
|
||||
<rename>complaint_withdrawal</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>complaint_withdrawal_percent</name>
|
||||
<rename>complaint_withdrawal_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
summary_counts AS (
|
||||
SELECT
|
||||
region_id AS recruitment_id,
|
||||
COUNT(*) AS total_appeals,
|
||||
COUNT(*) FILTER (WHERE fact ILIKE 'Внесли изменения%') AS incorrect_inf, -- Некорректные данные
|
||||
COUNT(*) FILTER (WHERE fact ILIKE 'Досыл%') AS sending_documents, -- Досыл документов
|
||||
COUNT(*) FILTER (WHERE fact ILIKE 'Не согласен%') AS decision_disagreement, -- Несогласие с решением
|
||||
COUNT(*) FILTER (WHERE fact ILIKE 'Прошу%') AS complaint_withdrawal -- Отзыв жалобы
|
||||
FROM appeals.appeals_list
|
||||
WHERE region_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
GROUP BY region_id
|
||||
)
|
||||
SELECT
|
||||
'Organization' AS schema,
|
||||
i.recruitment_id,
|
||||
current_date AS recording_date,
|
||||
COALESCE(sc.total_appeals, 0) AS appeal,
|
||||
COALESCE(sc.incorrect_inf, 0) AS incorrect_inf,
|
||||
COALESCE(sc.sending_documents, 0) AS sending_documents,
|
||||
COALESCE(sc.decision_disagreement, 0) AS decision_disagreement,
|
||||
COALESCE(sc.complaint_withdrawal, 0) AS complaint_withdrawal,
|
||||
COALESCE(ROUND(sc.incorrect_inf * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS incorrect_inf_percent,
|
||||
COALESCE(ROUND(sc.sending_documents * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS sending_documents_percent,
|
||||
COALESCE(ROUND(sc.decision_disagreement * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS decision_disagreement_percent,
|
||||
COALESCE(ROUND(sc.complaint_withdrawal * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS complaint_withdrawal_percent
|
||||
FROM ids i
|
||||
LEFT JOIN summary_counts sc ON sc.recruitment_id = i.recruitment_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
156
mappings_new/region/appeals.review_rating.hpl
Normal file
156
mappings_new/region/appeals.review_rating.hpl
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.review_rating</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/28 14:15:12.495</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/28 14:15:12.495</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<delete_field/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<insert_field/>
|
||||
<quoteString>N</quoteString>
|
||||
<read_field/>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM appeals.review_rating WHERE recording_date = current_date AND schema = 'Organization'</sql>
|
||||
<update_field/>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<schema>appeals</schema>
|
||||
<table>review_rating</table>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>speed</name>
|
||||
<rename>average_consideration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>rating</name>
|
||||
<rename>average_rating</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
current_date AS recording_date,
|
||||
'Organization' AS schema,
|
||||
ap.average_rating,
|
||||
ap.average_consideration,
|
||||
ap.recruitment_id
|
||||
FROM main_dashboard.appeals ap
|
||||
WHERE recording_date = current_date AND schema = 'Organization'
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
248
mappings_new/region/appeals.topic_appeal(reg).hpl
Normal file
248
mappings_new/region/appeals.topic_appeal(reg).hpl
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.topic_appeal(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/03/25 13:26:59.797</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/03/25 13:26:59.797</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) регионы</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update (main_dashboard.appeals) 2</from>
|
||||
<to>Execute SQL script 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM appeals.topic_appeal
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Organization'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Execute SQL script 2</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>
|
||||
<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 appeals.topic_appeal
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'REG_LVL'
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1312</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals) 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>appeals</schema>
|
||||
<table>topic_appeal</table>
|
||||
<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>registration</name>
|
||||
<rename>registration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>registration_percent</name>
|
||||
<rename>registration_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sabpoena</name>
|
||||
<rename>sabpoena</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sabpoena_percent</name>
|
||||
<rename>sabpoena_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>temporary_measures</name>
|
||||
<rename>temporary_measures</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>temporary_measures_percent</name>
|
||||
<rename>temporary_measures_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recording_date</name>
|
||||
<rename>recording_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appear</name>
|
||||
<rename>appeal</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
summary_counts AS (
|
||||
SELECT
|
||||
region_id AS recruitment_id,
|
||||
COUNT(*) AS total_appeals,
|
||||
SUM(
|
||||
CASE
|
||||
WHEN subcategory LIKE 'Решение о постановке на воинский учёт%'
|
||||
OR subcategory LIKE 'Отзыв ранее направленной жалобы по воинскому учету%'
|
||||
OR subcategory LIKE 'Досыл документов к ранее направленной жалобе по воинскому учету%'
|
||||
OR subcategory LIKE 'Решение об отказе во внесении изменений в Реестр воинского учёта%'
|
||||
THEN 1 ELSE 0
|
||||
END
|
||||
) AS registration, -- постановка на учет
|
||||
SUM(CASE WHEN subcategory LIKE 'Решение (заключение) призывной комиссии по призыву граждан на военную службу%' THEN 1 ELSE 0 END) AS sabpoena, -- повестки (призыв на службу)
|
||||
SUM(CASE WHEN subcategory LIKE 'Решение об установлении ограничительных мер%' THEN 1 ELSE 0 END) AS temporary_measures -- временные меры
|
||||
FROM appeals.appeals_list
|
||||
WHERE region_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
GROUP BY region_id
|
||||
)
|
||||
SELECT
|
||||
'Organization' AS schema,
|
||||
i.recruitment_id,
|
||||
current_date AS recording_date,
|
||||
COALESCE(sc.total_appeals, 0) AS appeal,
|
||||
COALESCE(sc.registration, 0) AS registration,
|
||||
COALESCE(sc.sabpoena, 0) AS sabpoena,
|
||||
COALESCE(sc.temporary_measures, 0) AS temporary_measures,
|
||||
COALESCE(ROUND(sc.registration * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS registration_percent,
|
||||
COALESCE(ROUND(sc.sabpoena * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS sabpoena_percent,
|
||||
COALESCE(ROUND(sc.temporary_measures * 100.0 / NULLIF(sc.total_appeals, 0), 2), 0) AS temporary_measures_percent
|
||||
FROM ids i
|
||||
LEFT JOIN summary_counts sc ON sc.recruitment_id = i.recruitment_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
157
mappings_new/region/array_reg.hwf
Normal file
157
mappings_new/region/array_reg.hwf
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>array_reg</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<workflow_status>0</workflow_status>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 09:44:55.162</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 09:44:55.162</modified_date>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>ORG_ROW</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start</name>
|
||||
<description/>
|
||||
<type>SPECIAL</type>
|
||||
<attributes/>
|
||||
<DayOfMonth>1</DayOfMonth>
|
||||
<hour>12</hour>
|
||||
<intervalMinutes>60</intervalMinutes>
|
||||
<intervalSeconds>0</intervalSeconds>
|
||||
<minutes>0</minutes>
|
||||
<repeat>N</repeat>
|
||||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>400</xloc>
|
||||
<yloc>304</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>304</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>select_recruitments_region(reg)rows.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/region/select_recruitments_region(reg)rows.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>720</xloc>
|
||||
<yloc>304</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>select_recruitments_region(reg).hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>Y</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/region/select_recruitments_region(reg).hpl</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>C:\Users\acer\Desktop\лог</logfile>
|
||||
<loglevel>Rowlevel</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>ORG_ROW</name>
|
||||
<stream_name>ORGANIZATION_ROW</stream_name>
|
||||
<value/>
|
||||
</parameter>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>Y</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>976</xloc>
|
||||
<yloc>304</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>delete from ervu_dashboard.array_reg</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>560</xloc>
|
||||
<yloc>304</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>select_recruitments_region(reg)rows.hpl</from>
|
||||
<to>select_recruitments_region(reg).hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_region(reg).hpl</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>SQL</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL</from>
|
||||
<to>select_recruitments_region(reg)rows.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
73
mappings_new/region/auxiliary/array_region.hpl
Normal file
73
mappings_new/region/auxiliary/array_region.hpl
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>array_region</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/27 17:33:33.546</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/27 17:33:33.546</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT ARRAY_AGG(idm_id) AS ARRAY_REGION
|
||||
FROM ervu_dashboard.recruitment
|
||||
WHERE schema = 'Organization'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
291
mappings_new/region/auxiliary/update_appeal_recruitments.hpl
Normal file
291
mappings_new/region/auxiliary/update_appeal_recruitments.hpl
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>update_appeal_recruitments</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/27 13:36:22.747</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/27 13:36:22.747</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>region</field>
|
||||
<name>region</name>
|
||||
</key>
|
||||
<schema>appeals</schema>
|
||||
<table>appeals_list</table>
|
||||
<value>
|
||||
<name>region</name>
|
||||
<rename>region</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>region_id</name>
|
||||
<rename>idm_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>144</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ranked_recruitment AS (
|
||||
SELECT
|
||||
rt.idm_id,
|
||||
rt.shortname,
|
||||
al.region,
|
||||
row_number() OVER (PARTITION BY al.region ORDER BY rt.shortname) AS rn
|
||||
FROM
|
||||
appeals.appeals_list al
|
||||
JOIN
|
||||
ervu_dashboard.recruitment rt
|
||||
ON
|
||||
(al.region ILIKE '%Адыге%' AND rt.shortname ILIKE '%Адыге%')
|
||||
OR (al.region ILIKE '%Республик%Башк%р%' AND rt.shortname ILIKE '%Республик%Башк%р%')
|
||||
OR (al.region ILIKE '%Республик%Бурят%' AND rt.shortname ILIKE '%Республик%Бурят%')
|
||||
OR (al.region ILIKE '%Республик%Алтай%' AND rt.shortname ILIKE '%Республик%Алтай%')
|
||||
OR (al.region ILIKE '%Дагест%' AND rt.shortname ILIKE '%Дагест%')
|
||||
OR (al.region ILIKE '%Ингушет%' AND rt.shortname ILIKE '%Ингушет%')
|
||||
OR (al.region ILIKE '%Кабардино-Балкар%' AND rt.shortname ILIKE '%Кабардино-Балкар%')
|
||||
OR (al.region ILIKE '%Республик%Калмыки%' AND rt.shortname ILIKE '%Республик%Калмыки%')
|
||||
OR (al.region ILIKE '%Карачаево-Черкесс%Республик%' AND rt.shortname ILIKE '%Карачаево-Черкесс%Республик%')
|
||||
OR (al.region ILIKE '%Карел%' AND rt.shortname ILIKE '%Карел%')
|
||||
OR (al.region ILIKE '%Коми%' AND rt.shortname ILIKE '%Коми%')
|
||||
OR (al.region ILIKE '%Марий%Эл%' AND rt.shortname ILIKE '%Марий%Эл%')
|
||||
OR (al.region ILIKE '%Мордови%' AND rt.shortname ILIKE '%Мордови%')
|
||||
OR (al.region ILIKE '%Саха%(Якутия)%' AND rt.shortname ILIKE '%Саха%(Якутия)%')
|
||||
OR (al.region ILIKE '%Северн%Осети%Алан%' AND rt.shortname ILIKE '%Северн%Осети%Алан%')
|
||||
OR (al.region ILIKE '%Татарстан%' AND rt.shortname ILIKE '%Татарстан%')
|
||||
OR (al.region ILIKE '%Тыва%' AND rt.shortname ILIKE '%Тыва%')
|
||||
OR (al.region ILIKE '%Удмуртск%' AND rt.shortname ILIKE '%Удмуртск%')
|
||||
OR (al.region ILIKE '%Хакас%' AND rt.shortname ILIKE '%Хакас%')
|
||||
OR (al.region ILIKE '%Чеченск%' AND rt.shortname ILIKE '%Чеченск%')
|
||||
OR (al.region ILIKE '%Чуваш%' AND rt.shortname ILIKE '%Чуваш%')
|
||||
OR (al.region ILIKE '%Алтайск%кра%' AND rt.shortname ILIKE '%Алтайск%кра%')
|
||||
OR (al.region ILIKE '%Краснодарск%' AND rt.shortname ILIKE '%Краснодарск%')
|
||||
OR (al.region ILIKE '%Красноярск%' AND rt.shortname ILIKE '%Красноярск%')
|
||||
OR (al.region ILIKE '%Приморск%' AND rt.shortname ILIKE '%Приморск%')
|
||||
OR (al.region ILIKE '%Ставропольск%' AND rt.shortname ILIKE '%Ставропольск%')
|
||||
OR (al.region ILIKE '%Хабаровск%' AND rt.shortname ILIKE '%Хабаровск%')
|
||||
OR (al.region ILIKE '%Амурск%' AND rt.shortname ILIKE '%Амурск%')
|
||||
OR (al.region ILIKE '%Архангельск%' AND rt.shortname ILIKE '%Архангельск%')
|
||||
OR (al.region ILIKE '%Астраханск%' AND rt.shortname ILIKE '%Астраханск%')
|
||||
OR (al.region ILIKE '%Белгородск%' AND rt.shortname ILIKE '%Белгородск%')
|
||||
OR (al.region ILIKE '%Брянск%' AND rt.shortname ILIKE '%Брянск%')
|
||||
OR (al.region ILIKE '%Владимирск%' AND rt.shortname ILIKE '%Владимирск%')
|
||||
OR (al.region ILIKE '%Волгоградск%' AND rt.shortname ILIKE '%Волгоградск%')
|
||||
OR (al.region ILIKE '%Вологодск%' AND rt.shortname ILIKE '%Вологодск%')
|
||||
OR (al.region ILIKE '%Воронежск%' AND rt.shortname ILIKE '%Воронежск%')
|
||||
OR (al.region ILIKE '%Ивановск%' AND rt.shortname ILIKE '%Ивановск%')
|
||||
OR (al.region ILIKE '%Иркутск%' AND rt.shortname ILIKE '%Иркутск%')
|
||||
OR (al.region ILIKE '%Калининградск%' AND rt.shortname ILIKE '%Калининградск%')
|
||||
OR (al.region ILIKE '%Калужск%' AND rt.shortname ILIKE '%Калужск%')
|
||||
OR (al.region ILIKE '%Камчатск%' AND rt.shortname ILIKE '%Камчатск%')
|
||||
OR (al.region ILIKE '%Кемеровск%' AND rt.shortname ILIKE '%Кемеровск%')
|
||||
OR (al.region ILIKE '%Кировск%' AND rt.shortname ILIKE '%Кировск%')
|
||||
OR (al.region ILIKE '%Костромск%' AND rt.shortname ILIKE '%Костромск%')
|
||||
OR (al.region ILIKE '%Курганск%' AND rt.shortname ILIKE '%Курганск%')
|
||||
OR (al.region ILIKE '%Курск%' AND rt.shortname ILIKE '%Курск%')
|
||||
OR (al.region ILIKE '%Ленинградск%' AND rt.shortname ILIKE '%Ленинградск%')
|
||||
OR (al.region ILIKE '%Липецк%' AND rt.shortname ILIKE '%Липецк%')
|
||||
OR (al.region ILIKE '%Магаданск%' AND rt.shortname ILIKE '%Магаданск%')
|
||||
OR (al.region ILIKE '%Московск%' AND rt.shortname ILIKE '%Московск%')
|
||||
OR (al.region ILIKE '%Мурманск%' AND rt.shortname ILIKE '%Мурманск%')
|
||||
OR (al.region ILIKE '%Нижегородск%' AND rt.shortname ILIKE '%Нижегородск%')
|
||||
OR (al.region ILIKE '%Новгородск%' AND rt.shortname ILIKE '%Новгородск%')
|
||||
OR (al.region ILIKE '%Новосибирск%' AND rt.shortname ILIKE '%Новосибирск%')
|
||||
OR (al.region ILIKE '%Омск%обл%' AND rt.shortname ILIKE 'ВК Омск%обл%' and rt.shortname NOT ILIKE '%Костромс%' and rt.shortname NOT ILIKE 'Военный комиссариат Томск%')
|
||||
OR (al.region ILIKE '%Оренбургск%' AND rt.shortname ILIKE '%Оренбургск%')
|
||||
OR (al.region ILIKE '%Орловск%' AND rt.shortname ILIKE '%Орловск%')
|
||||
OR (al.region ILIKE '%Пензенск%' AND rt.shortname ILIKE '%Пензенск%')
|
||||
OR (al.region ILIKE '%Пермск$' AND rt.shortname ILIKE '%Пермск$')
|
||||
OR (al.region ILIKE '%Псковск%' AND rt.shortname ILIKE '%Псковск%')
|
||||
OR (al.region ILIKE '%Ростовск%' AND rt.shortname ILIKE '%Ростовск%')
|
||||
OR (al.region ILIKE '%Рязанск%' AND rt.shortname ILIKE '%Рязанск%')
|
||||
OR (al.region ILIKE '%Самарск%' AND rt.shortname ILIKE '%Самарск%')
|
||||
OR (al.region ILIKE '%Саратовск%' AND rt.shortname ILIKE '%Саратовск%')
|
||||
OR (al.region ILIKE '%Сахалинск%' AND rt.shortname ILIKE '%Сахалинск%')
|
||||
OR (al.region ILIKE '%Свердловск%' AND rt.shortname ILIKE '%Свердловск%')
|
||||
OR (al.region ILIKE '%Смоленск%' AND rt.shortname ILIKE '%Смоленск%')
|
||||
OR (al.region ILIKE '%Тамбовск%' AND rt.shortname ILIKE '%Тамбовск%')
|
||||
OR (al.region ILIKE '%Тверск%' AND rt.shortname ILIKE '%Тверск%')
|
||||
OR (al.region ILIKE '%Томск%обл%' AND rt.shortname ILIKE 'Военный комиссариат Томской обл%' and rt.shortname NOT ILIKE '%Костромс%' and rt.shortname NOT ILIKE 'Военный комиссариат Омск%')
|
||||
OR (al.region ILIKE '%Тульск%' AND rt.shortname ILIKE '%Тульск%')
|
||||
OR (al.region ILIKE '%Тюменск%' AND rt.shortname ILIKE '%Тюменск%')
|
||||
OR (al.region ILIKE '%Ульяновск%' AND rt.shortname ILIKE '%Ульяновск%')
|
||||
OR (al.region ILIKE '%Челябинск%' AND rt.shortname ILIKE '%Челябинск%')
|
||||
OR (al.region ILIKE '%Забайкальск%' AND rt.shortname ILIKE '%Забайкальск%')
|
||||
OR (al.region ILIKE '%Ярославск%' AND rt.shortname ILIKE '%Ярославск%')
|
||||
OR (al.region ILIKE '%г%Москв%' AND rt.shortname ILIKE '%г%Москв%')
|
||||
OR (al.region ILIKE '%г%Санкт-Петербург%' AND rt.shortname ILIKE '%г%Санкт-Петербург%')
|
||||
OR (al.region ILIKE '%Еврейск%автономн%' AND rt.shortname ILIKE '%Еврейск%автономн%')
|
||||
OR (al.region ILIKE '%Ненецк%автономн%' AND rt.shortname ILIKE '%Ненецк%автономн%')
|
||||
OR (al.region ILIKE '%Хант%Мансийск%' AND rt.shortname ILIKE '%Хант%Мансийск%')
|
||||
OR (al.region ILIKE '%Чукотск%автономн%' AND rt.shortname ILIKE '%Чукотск%автономн%')
|
||||
OR (al.region ILIKE '%Ямал%Ненецк%автономн%' AND rt.shortname ILIKE '%Ямал%Ненецк%автономн%')
|
||||
OR (al.region ILIKE '%Крым%' AND rt.shortname ILIKE '%Крым%')
|
||||
OR (al.region ILIKE '%г%Севастопол%' AND rt.shortname ILIKE '%г%Севастопол%')
|
||||
OR (al.region ILIKE '%Запорожск%' AND rt.shortname ILIKE '%Запорожск%')
|
||||
OR (al.region ILIKE '%Донецк%Народн%' AND rt.shortname ILIKE '%Донецк%Народн%')
|
||||
OR (al.region ILIKE '%Луганск%Народн%' AND rt.shortname ILIKE '%Луганск%Народн%')
|
||||
OR (al.region ILIKE '%Херсонск%' AND rt.shortname ILIKE '%Херсонск%')
|
||||
WHERE
|
||||
rt.schema = 'Organization'
|
||||
)
|
||||
SELECT DISTINCT
|
||||
idm_id,
|
||||
shortname,
|
||||
region
|
||||
FROM ranked_recruitment rrt
|
||||
where
|
||||
(rrt.region ILIKE '%Адыге%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Республик%Башк%р%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Республик%Бурят%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Республик%Алтай' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Дагест%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ингушет%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Кабардино-Балкар%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Республик%Калмыки%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Карачаево-Черкесс%Республик%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Карел%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Коми%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Марий%Эл%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Мордови%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Саха%(Якутия)%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Северн%Осети%Алан%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Татарстан%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Тыва%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Удмуртск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Хакас%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Чеченск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Чуваш%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Алтайск%кра%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Краснодарск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Красноярск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Приморск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ставропольск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Хабаровск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Амурск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Архангельск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Астраханск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Белгородск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Брянск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Владимирск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Волгоградск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Вологодск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Воронежск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ивановск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Иркутск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Калининградск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Калужск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Камчатск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Кемеровск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Кировск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Костромск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Курганск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Курск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ленинградск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Липецк%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Магаданск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Московск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Мурманск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Нижегородск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Новгородск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Новосибирск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Омск%обл%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Оренбургск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Орловск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Пензенск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Пермск$' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Псковск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ростовск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Рязанск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Самарск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Саратовск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Сахалинск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Свердловск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Смоленск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Тамбовск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Тверск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Томск%обл%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Тульск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Тюменск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ульяновск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Челябинск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Забайкальск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ярославск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%г%Москв%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%г%Санкт-Петербург%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Еврейск%автономн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ненецк%автономн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Хант%Мансийск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Чукотск%автономн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Ямал%Ненецк%автономн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Крым%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%г%Севастопол%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Запорожск%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Донецк%Народн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Луганск%Народн%' AND rrt.rn = 1) OR
|
||||
(rrt.region ILIKE '%Херсонск%' AND rrt.rn = 1);
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>144</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
120
mappings_new/region/job_get_rows_reg.hwf
Normal file
120
mappings_new/region/job_get_rows_reg.hwf
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>job_get_rows_reg</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 12:37:22.616</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 12:37:22.616</modified_date>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start</name>
|
||||
<description/>
|
||||
<type>SPECIAL</type>
|
||||
<attributes/>
|
||||
<DayOfMonth>1</DayOfMonth>
|
||||
<hour>12</hour>
|
||||
<intervalMinutes>60</intervalMinutes>
|
||||
<intervalSeconds>0</intervalSeconds>
|
||||
<minutes>0</minutes>
|
||||
<repeat>N</repeat>
|
||||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>432</xloc>
|
||||
<yloc>336</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>array_reg.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/region/array_reg.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>592</xloc>
|
||||
<yloc>336</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>912</xloc>
|
||||
<yloc>336</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>rows_id-array_reg.hpl</name>
|
||||
<description/>
|
||||
<type>PIPELINE</type>
|
||||
<attributes/>
|
||||
<add_date>N</add_date>
|
||||
<add_time>N</add_time>
|
||||
<clear_files>N</clear_files>
|
||||
<clear_rows>N</clear_rows>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${PROJECT_HOME}/region/rows_id-array_reg.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<run_configuration>local</run_configuration>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>336</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>array_reg.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>array_reg.hwf</from>
|
||||
<to>rows_id-array_reg.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>rows_id-array_reg.hpl</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
1771
mappings_new/region/job_recruitments_region.hwf
Normal file
1771
mappings_new/region/job_recruitments_region.hwf
Normal file
File diff suppressed because it is too large
Load diff
394
mappings_new/region/main_dashboard.appeals(reg).hpl
Normal file
394
mappings_new/region/main_dashboard.appeals(reg).hpl
Normal file
|
|
@ -0,0 +1,394 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.appeals(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) регионы</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update (main_dashboard.appeals) 2</from>
|
||||
<to>Execute SQL script 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM main_dashboard.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Organization'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Execute SQL script 2</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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM main_dashboard.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'REG_LVL'
|
||||
</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>192</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</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>688</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals) 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>recruitment_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>appeals</table>
|
||||
<value>
|
||||
<name>total_appeals</name>
|
||||
<rename>total_appeals</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_consideration</name>
|
||||
<rename>average_consideration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>resolved</name>
|
||||
<rename>resolved</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_rating</name>
|
||||
<rename>average_rating</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_to_face</name>
|
||||
<rename>average_to_face</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"average_EPGU"</name>
|
||||
<rename>average_epgu</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_to_face_percent</name>
|
||||
<rename>average_to_face_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"average_EPGU_percent"</name>
|
||||
<rename>average_epgu_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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>912</xloc>
|
||||
<yloc>192</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>832</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
base_data AS (
|
||||
SELECT
|
||||
region_id,
|
||||
solution_type,
|
||||
CASE
|
||||
WHEN incoming_date <> '-' THEN incoming_date::date
|
||||
ELSE NULL
|
||||
END AS incoming_date,
|
||||
|
||||
CASE
|
||||
WHEN fact_end_date <> '-' THEN fact_end_date::date
|
||||
ELSE NULL
|
||||
END AS fact_end_date,
|
||||
|
||||
CASE
|
||||
WHEN response_evalution <> '-' THEN response_evalution::NUMERIC -- оценка ответа заявителем
|
||||
ELSE 0
|
||||
END AS response_evalution,
|
||||
source
|
||||
FROM appeals.appeals_list al
|
||||
WHERE region_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
),
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
region_id AS recruitment_id,
|
||||
COUNT(*) AS total_appeals,
|
||||
COUNT(*) FILTER (WHERE solution_type = 'Решено') AS resolved,
|
||||
-- Среднее время рассмотрения, учитывая возможные NULL для дат
|
||||
ROUND(AVG(CASE
|
||||
WHEN fact_end_date IS NOT NULL AND incoming_date IS NOT NULL
|
||||
THEN fact_end_date::DATE - incoming_date::DATE
|
||||
ELSE NULL
|
||||
END), 1) AS average_consideration,
|
||||
-- Средний рейтинг, учитывая 0 для некорректных значений
|
||||
ROUND(AVG(response_evalution), 1) AS average_rating,
|
||||
COUNT(*) FILTER (WHERE source = 'ПОС') AS total_pos,
|
||||
COUNT(*) FILTER (WHERE source = 'ЕПГУ') AS total_epgu
|
||||
FROM base_data
|
||||
GROUP BY region_id
|
||||
)
|
||||
SELECT
|
||||
i.recruitment_id,
|
||||
current_date AS recording_date,
|
||||
'Organization' AS schema,
|
||||
COALESCE(ad.total_appeals, 0) AS total_appeals,
|
||||
COALESCE(ad.resolved, 0) AS resolved,
|
||||
COALESCE(ad.average_consideration, 0) AS average_consideration,
|
||||
COALESCE(ad.average_rating, 0) AS average_rating,
|
||||
COALESCE(ad.total_pos, 0) AS average_to_face,
|
||||
COALESCE(ad.total_epgu, 0) AS average_epgu,
|
||||
COALESCE(ROUND(ad.total_pos::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS average_to_face_percent,
|
||||
COALESCE(ROUND(ad.total_epgu::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS average_epgu_percent
|
||||
FROM ids i
|
||||
LEFT JOIN aggregated_data ad ON ad.recruitment_id = i.recruitment_id;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<yloc>192</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
302
mappings_new/region/main_dashboard.recruitment_campaign(reg).hpl
Normal file
302
mappings_new/region/main_dashboard.recruitment_campaign(reg).hpl
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.recruitment_campaign(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 4 3</from>
|
||||
<to>Select values 4 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) регион/осень</from>
|
||||
<to>Get variables 4 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 3</from>
|
||||
<to>Insert / update (main_dashboard.recruitment_campaign)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 4 3</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>880</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.recruitment_campaign)</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>recruitment_campaign</table>
|
||||
<value>
|
||||
<name>subpoenas_sent</name>
|
||||
<rename>count_subpoena</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_on_subpoenas</name>
|
||||
<rename>count_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_on_subpoenas</name>
|
||||
<rename>count_not_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>new_recruits</name>
|
||||
<rename>new_recruits</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right</name>
|
||||
<rename>postponement_have_right</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted</name>
|
||||
<rename>postponement_granted</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_on_subpoenas_percent</name>
|
||||
<rename>appeared_on_subpoenas_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_on_subpoenas_percent</name>
|
||||
<rename>not_appeared_on_subpoenas_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_have_right_percent</name>
|
||||
<rename>postponement_have_right_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>postponement_granted_percent</name>
|
||||
<rename>postponement_granted_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>spring_autumn</name>
|
||||
<rename>spring_autumn</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1376</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 3</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1056</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (subpoena) регион/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(subpoenas_sent), 0) count_subpoena,
|
||||
COALESCE(SUM(appeared_on_subpoenas), 0) count_appeared,
|
||||
COALESCE(SUM(not_appeared_on_subpoenas), 0) count_not_appeared,
|
||||
COALESCE(SUM(new_recruits), 0) new_recruits,
|
||||
COALESCE(SUM(postponement_have_right), 0) postponement_have_right,
|
||||
COALESCE(SUM(postponement_granted), 0) postponement_granted,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoenas_sent) > 0
|
||||
THEN ROUND((SUM(appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) appeared_on_subpoenas_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoenas_sent) > 0
|
||||
THEN ROUND((SUM(not_appeared_on_subpoenas) / SUM(subpoenas_sent) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_appeared_on_subpoenas_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(new_recruits) > 0
|
||||
THEN ROUND((SUM(postponement_have_right) / SUM(new_recruits) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) postponement_have_right_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(new_recruits) > 0
|
||||
THEN ROUND((SUM(postponement_granted) / SUM(new_recruits) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) postponement_granted_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
spring_autumn,
|
||||
'Organization' AS schema
|
||||
FROM main_dashboard.recruitment_campaign
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY spring_autumn;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
289
mappings_new/region/main_dashboard.total_registered(reg).hpl
Normal file
289
mappings_new/region/main_dashboard.total_registered(reg).hpl
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.total_registered(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2</from>
|
||||
<to>Insert / update (main_dashboard.total_registered) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) регион</from>
|
||||
<to>Get variables 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>560</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.total_registered) 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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>total_registered</table>
|
||||
<value>
|
||||
<name>total_registered</name>
|
||||
<rename>total_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"total_registered_M"</name>
|
||||
<rename>male_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"total_registered_W"</name>
|
||||
<rename>female_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization_criterion</name>
|
||||
<rename>mobilization_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>volunteer_criterion</name>
|
||||
<rename>volunteer_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_criterion</name>
|
||||
<rename>contract_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization_criterion_percent</name>
|
||||
<rename>mobilization_criterion_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>volunteer_criterion_percent</name>
|
||||
<rename>volunteer_criterion_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_criterion_percent</name>
|
||||
<rename>contract_criterion_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>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>768</xloc>
|
||||
<yloc>304</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_registered), 0) total_count,
|
||||
COALESCE(SUM("total_registered_M"), 0) male_count,
|
||||
COALESCE(SUM("total_registered_W"), 0) female_count,
|
||||
COALESCE(SUM(mobilization_criterion), 0) mobilization_criterion,
|
||||
COALESCE(SUM(volunteer_criterion), 0) volunteer_criterion,
|
||||
COALESCE(SUM(contract_criterion), 0) contract_criterion,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_registered) > 0
|
||||
THEN ROUND((SUM(mobilization_criterion) / SUM(total_registered) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) mobilization_criterion_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_registered) > 0
|
||||
THEN ROUND((SUM(volunteer_criterion) / SUM(total_registered) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) volunteer_criterion_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_registered) > 0
|
||||
THEN ROUND((SUM(contract_criterion) / SUM(total_registered) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) contract_criterion_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM main_dashboard.total_registered
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>352</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
279
mappings_new/region/main_dashboard.waiting_registration(reg).hpl
Normal file
279
mappings_new/region/main_dashboard.waiting_registration(reg).hpl
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>main_dashboard.waiting_registration(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 5</from>
|
||||
<to>Select values 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 5</from>
|
||||
<to>Insert / update (main_dashboard.waiting_registration) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2 (person_registry) регион</from>
|
||||
<to>Get variables 5</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 5</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.waiting_registration) 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>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>waiting_registration</table>
|
||||
<value>
|
||||
<name>waiting_registration</name>
|
||||
<rename>waiting_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"waiting_registration_M"</name>
|
||||
<rename>male_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"waiting_registration_W"</name>
|
||||
<rename>female_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization_criterion</name>
|
||||
<rename>mobilization_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>volunteer_criterion</name>
|
||||
<rename>volunteer_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_criterion</name>
|
||||
<rename>contract_criterion</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization_criterion_percent</name>
|
||||
<rename>mobilization_criterion_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>volunteer_criterion_percent</name>
|
||||
<rename>volunteer_criterion_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_criterion_percent</name>
|
||||
<rename>contract_criterion_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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 5</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>720</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2 (person_registry) регион</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(waiting_registration),0) waiting_count,
|
||||
COALESCE(SUM("waiting_registration_M"),0) male_count,
|
||||
COALESCE(SUM("waiting_registration_W"),0) female_count,
|
||||
COALESCE(SUM(mobilization_criterion),0) mobilization_criterion,
|
||||
COALESCE(SUM(volunteer_criterion),0) volunteer_criterion,
|
||||
COALESCE(SUM(contract_criterion),0) contract_criterion,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(waiting_registration) > 0
|
||||
THEN ROUND((SUM(mobilization_criterion) / SUM(waiting_registration) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) mobilization_criterion_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(waiting_registration) > 0
|
||||
THEN ROUND((SUM(volunteer_criterion) / SUM(waiting_registration) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) volunteer_criterion_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(waiting_registration) > 0
|
||||
THEN ROUND((SUM(contract_criterion) / SUM(waiting_registration) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) contract_criterion_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
'Organization' AS schema
|
||||
FROM main_dashboard.waiting_registration
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
391
mappings_new/region/recruitment_campaign.appeals(reg).hpl
Normal file
391
mappings_new/region/recruitment_campaign.appeals(reg).hpl
Normal file
|
|
@ -0,0 +1,391 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_campaign.appeals(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) регионы</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Insert / update (main_dashboard.appeals)</from>
|
||||
<to>Execute SQL script 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) регионы</from>
|
||||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM recruitment_campaign.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Organization'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>256</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Execute SQL script 2</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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>N</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM recruitment_campaign.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'REG_LVL'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>272</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals)</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>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recording_date</field>
|
||||
<name>recording_date</name>
|
||||
</key>
|
||||
<schema>recruitment_campaign</schema>
|
||||
<table>appeals</table>
|
||||
<value>
|
||||
<name>total_appeals</name>
|
||||
<rename>total_appeals</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_consideration</name>
|
||||
<rename>average_consideration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>resolved</name>
|
||||
<rename>resolved</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_resolved</name>
|
||||
<rename>not_resolved</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_resolved_percent</name>
|
||||
<rename>not_resolved_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_rating</name>
|
||||
<rename>average_rating</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>resolved_percent</name>
|
||||
<rename>resolved_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>spring_autumn</name>
|
||||
<rename>spring_autumn</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1088</xloc>
|
||||
<yloc>272</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>848</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
ids AS (
|
||||
SELECT unnest(string_to_array(trim(both '{}' from '${ARR_REG}'), ','))::uuid AS recruitment_id
|
||||
),
|
||||
base_data AS (
|
||||
SELECT
|
||||
region_id,
|
||||
solution_type,
|
||||
CASE
|
||||
WHEN incoming_date <> '-' THEN to_date(incoming_date, 'DD.MM.YYYY')
|
||||
ELSE NULL
|
||||
END AS incoming_date,
|
||||
|
||||
CASE
|
||||
WHEN fact_end_date <> '-' THEN to_date(fact_end_date, 'DD.MM.YYYY')
|
||||
ELSE NULL
|
||||
END AS fact_end_date,
|
||||
|
||||
CASE
|
||||
WHEN response_evalution <> '-' THEN response_evalution::NUMERIC -- оценка ответа заявителем
|
||||
ELSE 0
|
||||
END AS response_evalution,
|
||||
source
|
||||
FROM appeals.appeals_list al
|
||||
WHERE region_id::uuid IN (SELECT recruitment_id FROM ids)
|
||||
),
|
||||
aggregated_data AS (
|
||||
SELECT
|
||||
region_id AS recruitment_id,
|
||||
COUNT(*) AS total_appeals,
|
||||
COUNT(*) FILTER (WHERE solution_type = 'Решено') AS resolved,
|
||||
COUNT(*) FILTER (WHERE solution_type != 'Решено') AS not_resolved,
|
||||
-- Среднее время рассмотрения, учитывая возможные NULL для дат
|
||||
ROUND(AVG(CASE
|
||||
WHEN fact_end_date IS NOT NULL AND incoming_date IS NOT NULL
|
||||
THEN fact_end_date::DATE - incoming_date::DATE
|
||||
ELSE NULL
|
||||
END), 1) AS average_consideration,
|
||||
-- Средний рейтинг, учитывая 0 для некорректных значений
|
||||
ROUND(AVG(response_evalution), 1) AS average_rating,
|
||||
CASE WHEN incoming_date between (extract (year from incoming_date)||'-04-01')::date and (extract (year from incoming_date)||'-09-30')::date then 'Весна'
|
||||
WHEN incoming_date between (extract (year from incoming_date)||'-10-01')::date and (extract (year from incoming_date)+1||'-03-31')::date then 'Осень'
|
||||
END AS spring_autumn
|
||||
FROM base_data
|
||||
GROUP BY region_id, incoming_date
|
||||
), agr2 as (
|
||||
SELECT
|
||||
i.recruitment_id,
|
||||
current_date AS recording_date,
|
||||
COALESCE(spring_autumn, 'undefined') as spring_autumn,
|
||||
'Organization' AS schema,
|
||||
COALESCE(ad.total_appeals, 0) AS total_appeals,
|
||||
COALESCE(ad.resolved, 0) AS resolved,
|
||||
COALESCE(ad.not_resolved, 0) AS not_resolved,
|
||||
COALESCE(ad.average_consideration, 0) AS average_consideration,
|
||||
COALESCE(ad.average_rating, 0) AS average_rating,
|
||||
COALESCE(ROUND(ad.resolved::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS resolved_percent,
|
||||
COALESCE(ROUND(ad.not_resolved::NUMERIC * 100 / NULLIF(ad.total_appeals, 0), 1), 0) AS not_resolved_percent
|
||||
FROM ids i
|
||||
LEFT JOIN aggregated_data ad ON ad.recruitment_id = i.recruitment_id
|
||||
)
|
||||
SELECT
|
||||
recruitment_id,
|
||||
recording_date,
|
||||
spring_autumn,
|
||||
schema,
|
||||
sum(total_appeals) as total_appeals,
|
||||
sum(resolved) as resolved,
|
||||
sum(not_resolved) as not_resolved,
|
||||
coalesce(ROUND(avg(average_consideration) FILTER (where average_consideration!=0),1),0) as average_consideration,
|
||||
coalesce(ROUND(avg(average_rating) FILTER (where average_rating!=0),1),0) as average_rating,
|
||||
COALESCE(ROUND(sum(resolved::NUMERIC) * 100 / NULLIF(sum(total_appeals), 0), 1), 0) AS resolved_percent,
|
||||
COALESCE(ROUND(sum(not_resolved)::NUMERIC * 100 / NULLIF(sum(total_appeals), 0), 1), 0) AS not_resolved_percent
|
||||
from agr2
|
||||
GROUP BY 1,2,3,4;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
386
mappings_new/region/recruitment_campaign.subpoenas(reg).hpl
Normal file
386
mappings_new/region/recruitment_campaign.subpoenas(reg).hpl
Normal file
|
|
@ -0,0 +1,386 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>recruitment_campaign.subpoenas(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/09 13:13:59.825</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/09 13:13:59.825</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 4 3</from>
|
||||
<to>Select values 4 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) осень/регионы</from>
|
||||
<to>Get variables 4 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 3</from>
|
||||
<to>Insert / update (recruitment_campaign.subpoenas) 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 4 3</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1344</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (recruitment_campaign.subpoenas) 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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<schema>recruitment_campaign</schema>
|
||||
<table>subpoenas</table>
|
||||
<value>
|
||||
<name>subpoena</name>
|
||||
<rename>count_subpoena</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared</name>
|
||||
<rename>count_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared</name>
|
||||
<rename>count_not_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_ap_good_reason</name>
|
||||
<rename>count_not_ap_good_reason</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>introduced_measures</name>
|
||||
<rename>count_introduced_measures</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ap_not_required</name>
|
||||
<rename>count_ap_not_required</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restrictions_applied</name>
|
||||
<rename>count_restrictions_applied</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_percent</name>
|
||||
<rename>appeared_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_percent</name>
|
||||
<rename>not_appeared_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_ap_good_reason_percent</name>
|
||||
<rename>not_ap_good_reason_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ap_not_required_percent</name>
|
||||
<rename>ap_not_required_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restrictions_applied_percent</name>
|
||||
<rename>restrictions_applied_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>introduced_measures_percent</name>
|
||||
<rename>introduced_measures_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>rest</name>
|
||||
<rename>rest</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>spring_autumn</name>
|
||||
<rename>spring_autumn</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>count_not_delivery</name>
|
||||
<rename>count_not_delivery</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appear_date_is_good</name>
|
||||
<rename>appear_date_is_good</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_delivery_percent</name>
|
||||
<rename>not_delivery_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appear_date_is_good_percent</name>
|
||||
<rename>appear_date_is_good_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1824</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 3</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1520</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (subpoena) осень/регионы</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(subpoena), 0) count_subpoena,
|
||||
COALESCE(SUM(appeared), 0) count_appeared,
|
||||
COALESCE(SUM(not_appeared), 0) count_not_appeared,
|
||||
COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason,
|
||||
COALESCE(SUM(introduced_measures), 0) count_introduced_measures,
|
||||
COALESCE(SUM(ap_not_required), 0) count_ap_not_required,
|
||||
COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) appeared_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_appeared_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_ap_good_reason_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) ap_not_required_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) restrictions_applied_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) introduced_measures_percent,
|
||||
COALESCE(SUM(rest), 0) rest,
|
||||
COALESCE(SUM(count_not_delivery), 0) count_not_delivery,
|
||||
COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_delivery_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_delivery_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) appear_date_is_good_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
spring_autumn,
|
||||
'Organization' AS schema
|
||||
FROM recruitment_campaign.subpoenas
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY spring_autumn;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1088</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
74
mappings_new/region/rows_id-array_reg.hpl
Normal file
74
mappings_new/region/rows_id-array_reg.hpl
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>rows_id-array_reg</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 12:40:41.832</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 12:40:41.832</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruitment_reg_id AS RECRUITMENT_REG_ID,
|
||||
string_to_array(trim(both '{}' FROM replace(vk_array_id, ' ', '')), ',')::uuid[] AS VK_ARRAY_ID
|
||||
FROM ervu_dashboard.array_reg</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
198
mappings_new/region/select_recruitments_region(reg).hpl
Normal file
198
mappings_new/region/select_recruitments_region(reg).hpl
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>select_recruitments_region(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>ORG_ROW</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>SCM</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
</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:58:19.728</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:58:19.728</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input/регион</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>
|
||||
<currency/>
|
||||
<decimal/>
|
||||
<format/>
|
||||
<group/>
|
||||
<length>-1</length>
|
||||
<name>ORG_ROW</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
<variable/>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_reg_id</field>
|
||||
<name>ORG_ROW</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>array_reg</table>
|
||||
<value>
|
||||
<name>vk_array_id</name>
|
||||
<rename>vk_array_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_reg_id</name>
|
||||
<rename>recruitment_reg_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>992</xloc>
|
||||
<yloc>208</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>ORG_ROW</name>
|
||||
<rename>ORG_ROW</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>800</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input/регион</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
'${ORG_ROW}' AS recruitment_reg_id,
|
||||
ARRAY(
|
||||
SELECT idm_id
|
||||
FROM (
|
||||
SELECT idm_id
|
||||
FROM ervu_dashboard.recruitment
|
||||
WHERE schema = 'Department' AND parent_id = '${ORG_ROW}'
|
||||
UNION ALL
|
||||
SELECT idm_id
|
||||
FROM ervu_dashboard.recruitment
|
||||
WHERE idm_id = '${ORG_ROW}'
|
||||
) subquery
|
||||
) AS vk_array_id
|
||||
FROM ervu_dashboard.recruitment
|
||||
WHERE idm_id = '${ORG_ROW}'; </sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
76
mappings_new/region/select_recruitments_region(reg)rows.hpl
Normal file
76
mappings_new/region/select_recruitments_region(reg)rows.hpl
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>select_recruitments_region(reg)rows</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/12/10 10:43:22.293</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/12/10 10:43:22.293</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input/регион</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input/регион</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit/>
|
||||
<sql>SELECT
|
||||
idm_id AS ORGANIZATION_ROW
|
||||
FROM
|
||||
ervu_dashboard.recruitment
|
||||
WHERE schema = 'Organization'
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
395
mappings_new/region/total_registered.age(reg).hpl
Normal file
395
mappings_new/region/total_registered.age(reg).hpl
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.age(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) регион/все</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (total_registered.age)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1568</xloc>
|
||||
<yloc>752</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.age)</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>registered</field>
|
||||
<name>registered</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>age</table>
|
||||
<value>
|
||||
<name>"17_years"</name>
|
||||
<rename>17_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"18-26_years"</name>
|
||||
<rename>18-26_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"27-30_years"</name>
|
||||
<rename>27-30_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"31-35_years"</name>
|
||||
<rename>31-35_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"36-40_years"</name>
|
||||
<rename>36-40_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"41-45_years"</name>
|
||||
<rename>41-45_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"51+_years"</name>
|
||||
<rename>51+_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"all_M_W"</name>
|
||||
<rename>gender</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"46-50_years"</name>
|
||||
<rename>46-50_year_count</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"17_years_percent"</name>
|
||||
<rename>17_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"18-26_years_percent"</name>
|
||||
<rename>18-26_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"27-30_years_percent"</name>
|
||||
<rename>27-30_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"31-35_years_percent"</name>
|
||||
<rename>31-35_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"36-40_years_percent"</name>
|
||||
<rename>36-40_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"41-45_years_percent"</name>
|
||||
<rename>41-45_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"46-50_years_percent"</name>
|
||||
<rename>46-50_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"51+_years_percent"</name>
|
||||
<rename>51+_year_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>registered</name>
|
||||
<rename>registered</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>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1952</xloc>
|
||||
<yloc>752</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1712</xloc>
|
||||
<yloc>752</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_count), 0) total_count,
|
||||
COALESCE(SUM("17_years"), 0) "17_year_count",
|
||||
COALESCE(SUM("18-26_years"), 0) "18-26_year_count",
|
||||
COALESCE(SUM("27-30_years"), 0) "27-30_year_count",
|
||||
COALESCE(SUM("31-35_years"), 0) "31-35_year_count",
|
||||
COALESCE(SUM("36-40_years"), 0) "36-40_year_count",
|
||||
COALESCE(SUM("41-45_years"), 0) "41-45_year_count",
|
||||
COALESCE(SUM("51+_years"), 0) "51+_year_count",
|
||||
COALESCE(SUM("46-50_years"), 0) "46-50_year_count",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("17_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "17_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("18-26_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "18-26_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("27-30_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "27-30_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("31-35_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "31-35_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("36-40_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "36-40_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("41-45_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "41-45_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("46-50_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "46-50_year_percent",
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("51+_years") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) "51+_year_percent",
|
||||
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
convicts,
|
||||
registered,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.age
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", registered, convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1328</xloc>
|
||||
<yloc>752</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
295
mappings_new/region/total_registered.busyness(reg).hpl
Normal file
295
mappings_new/region/total_registered.busyness(reg).hpl
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.busyness(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/все</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (total_registered.busyness)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>576</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>busyness</table>
|
||||
<value>
|
||||
<name>study</name>
|
||||
<rename>study</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>work</name>
|
||||
<rename>work</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>study_percent</name>
|
||||
<rename>study_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>work_percent</name>
|
||||
<rename>work_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>registered</name>
|
||||
<rename>registered</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"all_M_W"</name>
|
||||
<rename>gender</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_work</name>
|
||||
<rename>no_info</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_work_percent</name>
|
||||
<rename>no_info_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>busyness</name>
|
||||
<rename>total_people</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1040</xloc>
|
||||
<yloc>576</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>784</xloc>
|
||||
<yloc>576</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(study), 0) study,
|
||||
COALESCE(SUM(work), 0) work,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(busyness) > 0
|
||||
THEN ROUND((SUM(study) / SUM(busyness) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) study_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(busyness) > 0
|
||||
THEN ROUND((SUM(work) / SUM(busyness) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) work_percent,
|
||||
|
||||
COALESCE(SUM(not_work), 0) no_info,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(busyness) > 0
|
||||
THEN ROUND((SUM(not_work) / SUM(busyness) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) no_info_percent,
|
||||
|
||||
COALESCE(SUM(busyness), 0) total_people,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
registered,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.busyness
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", registered, convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>576</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
326
mappings_new/region/total_registered.child_minor(reg).hpl
Normal file
326
mappings_new/region/total_registered.child_minor(reg).hpl
Normal file
|
|
@ -0,0 +1,326 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.child_minor(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 4 2</from>
|
||||
<to>Select values 4 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry)регион/все</from>
|
||||
<to>Get variables 4 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 2</from>
|
||||
<to>Insert / update (total_registered.child_minor)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 4 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>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.child_minor)</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>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>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1216</xloc>
|
||||
<yloc>416</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_count), 0) total_count,
|
||||
COALESCE(SUM(no_child), 0) no_children,
|
||||
COALESCE(SUM("1_child"), 0) one_child,
|
||||
COALESCE(SUM("2_child"), 0) two_children,
|
||||
COALESCE(SUM("3_child"), 0) three_children,
|
||||
COALESCE(SUM("4_more_child"), 0) four_or_more_children,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM(no_child) / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) no_children_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("1_child") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) one_child_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("2_child") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) two_children_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("3_child") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) three_children_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("4_more_child") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) four_or_more_children_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.child_minor
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
340
mappings_new/region/total_registered.driver_license(reg).hpl
Normal file
340
mappings_new/region/total_registered.driver_license(reg).hpl
Normal file
|
|
@ -0,0 +1,340 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.driver_license(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (driver_license) регионы/все</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.driver_license) 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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>driver_license</table>
|
||||
<value>
|
||||
<name>"A"</name>
|
||||
<rename>a</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"B"</name>
|
||||
<rename>b</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"C"</name>
|
||||
<rename>c</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"D"</name>
|
||||
<rename>d</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"E"</name>
|
||||
<rename>e</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>nope</name>
|
||||
<rename>nope</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"A_repcent"</name>
|
||||
<rename>a_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"B_repcent"</name>
|
||||
<rename>b_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"C_repcent"</name>
|
||||
<rename>c_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"D_repcent"</name>
|
||||
<rename>d_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"E_repcent"</name>
|
||||
<rename>e_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>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>total_count</name>
|
||||
<rename>total</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1472</xloc>
|
||||
<yloc>416</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1216</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (driver_license) регионы/все</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_count), 0) total,
|
||||
COALESCE(SUM("A"), 0) a,
|
||||
COALESCE(SUM("B"), 0) b,
|
||||
COALESCE(SUM("C"), 0) c,
|
||||
COALESCE(SUM("D"), 0) d,
|
||||
COALESCE(SUM("E"), 0) e,
|
||||
COALESCE(SUM(nope), 0) nope,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("A") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) a_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("B") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) b_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("C") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) c_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("D") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) d_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM("E") / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) e_percent, -- нет такой категории
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_count) > 0
|
||||
THEN ROUND((SUM(nope) / SUM(total_count) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) nope_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.driver_license
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>848</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
308
mappings_new/region/total_registered.education_level(reg).hpl
Normal file
308
mappings_new/region/total_registered.education_level(reg).hpl
Normal file
|
|
@ -0,0 +1,308 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.education_level(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 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>
|
||||
</order>
|
||||
<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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1456</xloc>
|
||||
<yloc>576</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>education_level</table>
|
||||
<value>
|
||||
<name>higher</name>
|
||||
<rename>higher</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average</name>
|
||||
<rename>average_prof</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"all_M_W"</name>
|
||||
<rename>gender</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>only_general</name>
|
||||
<rename>only_general</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>no_data</name>
|
||||
<rename>count_nodata</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>higher_percent</name>
|
||||
<rename>higher_percentage</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_percent</name>
|
||||
<rename>average_prof_percentage</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>only_general_percent</name>
|
||||
<rename>only_general_percentage</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>no_data_percent</name>
|
||||
<rename>count_nodata_percentage</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>education_level</name>
|
||||
<rename>total</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1856</xloc>
|
||||
<yloc>576</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1600</xloc>
|
||||
<yloc>576</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(higher), 0) higher,
|
||||
COALESCE(SUM(average), 0) average_prof,
|
||||
COALESCE(SUM(only_general), 0) only_general,
|
||||
COALESCE(SUM(no_data), 0) count_nodata,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(education_level) > 0
|
||||
THEN ROUND((SUM(higher) / SUM(education_level) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) higher_percentage,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(education_level) > 0
|
||||
THEN ROUND((SUM(average) / SUM(education_level) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) average_prof_percentage,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(education_level) > 0
|
||||
THEN ROUND((SUM(only_general) / SUM(education_level) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) only_general_percentage,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(education_level) > 0
|
||||
THEN ROUND((SUM(no_data) / SUM(education_level) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) count_nodata_percentage,
|
||||
|
||||
COALESCE(SUM(education_level), 0) total,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.education_level
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1184</xloc>
|
||||
<yloc>576</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
288
mappings_new/region/total_registered.marital_status(reg).hpl
Normal file
288
mappings_new/region/total_registered.marital_status(reg).hpl
Normal file
|
|
@ -0,0 +1,288 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.marital_status(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) регионы/все</from>
|
||||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3 2</from>
|
||||
<to>Insert / update (total_registered.marital_status) </to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1344</xloc>
|
||||
<yloc>592</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>convicts</field>
|
||||
<name>convicts</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>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>
|
||||
<value>
|
||||
<name>convicts</name>
|
||||
<rename>convicts</rename>
|
||||
<update>N</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/>
|
||||
<GUI>
|
||||
<xloc>1744</xloc>
|
||||
<yloc>592</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1488</xloc>
|
||||
<yloc>592</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(married), 0) married,
|
||||
COALESCE(SUM(not_married), 0) not_married,
|
||||
COALESCE(SUM(other), 0) other,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(marital_status) > 0
|
||||
THEN ROUND((SUM(married) / SUM(marital_status) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) married_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(marital_status) > 0
|
||||
THEN ROUND((SUM(not_married) / SUM(marital_status) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_married_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(marital_status) > 0
|
||||
THEN ROUND((SUM(other) / SUM(marital_status) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) other_percent,
|
||||
COALESCE(SUM(marital_status), 0) total,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
"all_M_W" AS gender,
|
||||
convicts,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.marital_status
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>592</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
328
mappings_new/region/total_registered.reg_mil_cat(reg).hpl
Normal file
328
mappings_new/region/total_registered.reg_mil_cat(reg).hpl
Normal file
|
|
@ -0,0 +1,328 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.reg_mil_cat(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 3</from>
|
||||
<to>Select values 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) военком/рег</from>
|
||||
<to>Get variables 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 3</from>
|
||||
<to>Insert / update (total_registered.reg_mil_cat)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 3</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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.reg_mil_cat)</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>mil_reg</field>
|
||||
<name>mil_reg</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>reg_mil_cat</table>
|
||||
<value>
|
||||
<name>first_reg_17</name>
|
||||
<rename>first_reg_17</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_reg_18</name>
|
||||
<rename>first_reg_18</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"mil_spec_W"</name>
|
||||
<rename>mil_spec_w</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>returned_dep_liberty</name>
|
||||
<rename>returned_dep_liberty</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>punished</name>
|
||||
<rename>punished</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>received_citizenship</name>
|
||||
<rename>received_citizenship</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_reg_17_percent</name>
|
||||
<rename>first_reg_17_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_reg_18_percent</name>
|
||||
<rename>first_reg_18_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>returned_dep_liberty_percent</name>
|
||||
<rename>returned_dep_liberty_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>"mil_spec_W_percent"</name>
|
||||
<rename>mil_spec_w_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>punished_percent</name>
|
||||
<rename>punished_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>received_citizenship_percent</name>
|
||||
<rename>received_citizenship_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mil_reg</name>
|
||||
<rename>mil_reg</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 3</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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>800</xloc>
|
||||
<yloc>352</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-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(first_reg_17), 0) first_reg_17,
|
||||
COALESCE(SUM(first_reg_18), 0) first_reg_18,
|
||||
COALESCE(SUM("mil_spec_W"), 0) mil_spec_w,
|
||||
COALESCE(SUM(returned_dep_liberty), 0) returned_dep_liberty,
|
||||
COALESCE(SUM(punished), 0) punished,
|
||||
COALESCE(SUM(received_citizenship), 0) received_citizenship,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM(first_reg_17) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) first_reg_17_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM(first_reg_18) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) first_reg_18_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM(returned_dep_liberty) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) returned_dep_liberty_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM("mil_spec_W") / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) mil_spec_w_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM(punished) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) punished_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(first_reg_17) + SUM(first_reg_18)) > 0
|
||||
THEN ROUND((SUM(received_citizenship) / (SUM(first_reg_17) + SUM(first_reg_18)) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) received_citizenship_percent,
|
||||
'${REG_ID}'::uuid AS recruitment_id,
|
||||
mil_reg,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.reg_mil_cat
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY mil_reg;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
322
mappings_new/region/total_registered.removed_registry(reg).hpl
Normal file
322
mappings_new/region/total_registered.removed_registry(reg).hpl
Normal file
|
|
@ -0,0 +1,322 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.removed_registry(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2</from>
|
||||
<to>Insert / update (total_registered.removed_registry) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (decision-document-service) регион 2</from>
|
||||
<to>Get variables 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.removed_registry) 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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>removed_registry</table>
|
||||
<value>
|
||||
<name>age_limit</name>
|
||||
<rename>age_limit</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death</name>
|
||||
<rename>death</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>removed_registry</name>
|
||||
<rename>removed_registry</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deprivation_citizenship</name>
|
||||
<rename>deprivation_citizenship</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>travel_abroad</name>
|
||||
<rename>travel_abroad</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>living_abroad</name>
|
||||
<rename>living_abroad</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>other</name>
|
||||
<rename>other</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deprivation_citizen_percents</name>
|
||||
<rename>deprivation_citizen_percents</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>age_limit_percent</name>
|
||||
<rename>age_limit_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_percent</name>
|
||||
<rename>death_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>travel_abroad_percent</name>
|
||||
<rename>travel_abroad_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>living_abroad_percent</name>
|
||||
<rename>living_abroad_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>other_percent</name>
|
||||
<rename>other_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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>816</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (decision-document-service) регион 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(age_limit), 0) age_limit,
|
||||
COALESCE(SUM(death), 0) death,
|
||||
COALESCE(SUM(removed_registry), 0) removed_registry,
|
||||
COALESCE(SUM(deprivation_citizenship), 0) deprivation_citizenship,
|
||||
COALESCE(SUM(travel_abroad), 0) travel_abroad,
|
||||
COALESCE(SUM(living_abroad), 0) living_abroad,
|
||||
COALESCE(SUM(other), 0) other,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(deprivation_citizenship) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) deprivation_citizen_percents,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(age_limit) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) age_limit_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(death) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) death_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(travel_abroad) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) travel_abroad_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(living_abroad) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) living_abroad_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(removed_registry) > 0
|
||||
THEN ROUND((SUM(other) / SUM(removed_registry) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) other_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.removed_registry
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
418
mappings_new/region/total_registered.subpoenas(reg).hpl
Normal file
418
mappings_new/region/total_registered.subpoenas(reg).hpl
Normal file
|
|
@ -0,0 +1,418 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>total_registered.subpoenas(reg)</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Get variables 4 2</from>
|
||||
<to>Select values 4 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) регион/рег</from>
|
||||
<to>Get variables 4 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4 2</from>
|
||||
<to>Insert / update (total_registered.subpoenas) 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Get variables 4 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>REG_ID</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>VK_ARRAY</name>
|
||||
<precision>-1</precision>
|
||||
<trim_type>none</trim_type>
|
||||
<type>String</type>
|
||||
</field>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>960</xloc>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.subpoenas) 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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>mil_reg</field>
|
||||
<name>mil_reg</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>subpoenas</table>
|
||||
<value>
|
||||
<name>subpoena</name>
|
||||
<rename>count_subpoena</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared</name>
|
||||
<rename>count_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>average_appeared</name>
|
||||
<rename>average_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared</name>
|
||||
<rename>count_not_appeared</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_ap_good_reason</name>
|
||||
<rename>count_not_ap_good_reason</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>introduced_measures</name>
|
||||
<rename>count_introduced_measures</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ap_not_required</name>
|
||||
<rename>count_ap_not_required</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>electron</name>
|
||||
<rename>count_electron</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>paper</name>
|
||||
<rename>count_paper</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restrictions_applied</name>
|
||||
<rename>count_restrictions_applied</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mil_reg</name>
|
||||
<rename>mil_reg</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appeared_percent</name>
|
||||
<rename>appeared_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_appeared_percent</name>
|
||||
<rename>not_appeared_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_ap_good_reason_percent</name>
|
||||
<rename>not_ap_good_reason_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>ap_not_required_percent</name>
|
||||
<rename>ap_not_required_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>electron_percent</name>
|
||||
<rename>electron_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>paper_percent</name>
|
||||
<rename>paper_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restrictions_applied_percent</name>
|
||||
<rename>restrictions_applied_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>introduced_measures_percent</name>
|
||||
<rename>introduced_measures_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>count_not_delivery</name>
|
||||
<rename>count_not_delivery</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appear_date_is_good</name>
|
||||
<rename>appear_date_is_good</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>not_delivery_percent</name>
|
||||
<rename>not_delivery_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appear_date_is_good_percent</name>
|
||||
<rename>appear_date_is_good_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>schema</name>
|
||||
<rename>schema</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1408</xloc>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4 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>REG_ID</name>
|
||||
<rename>REG_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>VK_ARRAY</name>
|
||||
<rename>VK_ARRAY</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>1136</xloc>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (subpoena) регион/рег</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(subpoena), 0) count_subpoena,
|
||||
COALESCE(SUM(appeared), 0) count_appeared,
|
||||
COALESCE(SUM(average_appeared), 0) average_appeared,
|
||||
COALESCE(SUM(not_appeared), 0) count_not_appeared,
|
||||
COALESCE(SUM(not_ap_good_reason), 0) count_not_ap_good_reason,
|
||||
COALESCE(SUM(introduced_measures), 0) count_introduced_measures,
|
||||
COALESCE(SUM(ap_not_required), 0) count_ap_not_required,
|
||||
COALESCE(SUM(electron), 0) count_electron,
|
||||
COALESCE(SUM(paper), 0) count_paper,
|
||||
COALESCE(SUM(restrictions_applied), 0) count_restrictions_applied,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(appeared) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) appeared_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(not_appeared) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_appeared_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(not_ap_good_reason) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_ap_good_reason_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(ap_not_required) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) ap_not_required_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(electron) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) electron_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(paper) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) paper_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(restrictions_applied) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) restrictions_applied_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(introduced_measures) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) introduced_measures_percent,
|
||||
|
||||
COALESCE(SUM(count_not_delivery), 0) count_not_delivery,
|
||||
COALESCE(SUM(appear_date_is_good), 0) appear_date_is_good,
|
||||
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(count_not_delivery) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_delivery_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(subpoena) > 0
|
||||
THEN ROUND((SUM(appear_date_is_good) / SUM(subpoena) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) appear_date_is_good_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
mil_reg,
|
||||
'Organization' AS schema
|
||||
FROM total_registered.subpoenas
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema IN ('Department', 'REG_LVL')
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY mil_reg;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
Loading…
Add table
Add a link
Reference in a new issue