свежая версия со стенда
This commit is contained in:
parent
d288a7519e
commit
13aeb606dc
280 changed files with 75366 additions and 20884 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variables" : [ {
|
||||
"name" : "DB_PERSON_HOST",
|
||||
"value" : "10.10.31.119",
|
||||
"value" : "10.10.31.118",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PORT",
|
||||
|
|
@ -9,15 +9,15 @@
|
|||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_NAME",
|
||||
"value" : "ervu_person_registry",
|
||||
"value" : "ervu-person-registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_USERNAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"value" : "postgres",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PASSWORD",
|
||||
"value" : "Encrypted 2be98caba1cd2df80aa0aa672d193bdde",
|
||||
"value" : "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_HOST",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_NAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"value" : "ervu-dashboard-recr",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_USERNAME",
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_NAME",
|
||||
"value" : "decision-document-service",
|
||||
"value" : "ervu-decision-document-service",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_USERNAME",
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_NAME",
|
||||
"value" : "subpoena",
|
||||
"value" : "ervu-subpoena-registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_USERNAME",
|
||||
|
|
|
|||
103
mappings/connections/db_uat.json
Normal file
103
mappings/connections/db_uat.json
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"variables" : [ {
|
||||
"name" : "DB_PERSON_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_NAME",
|
||||
"value" : "ervu_person_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_NAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_USERNAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PASSWORD",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_NAME",
|
||||
"value" : "ervu_appeal_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_NAME",
|
||||
"value" : "ervu_decision_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_NAME",
|
||||
"value" : "ervu_subpoena_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
} ]
|
||||
}
|
||||
103
mappings/connections/db_uat_to_here.json
Normal file
103
mappings/connections/db_uat_to_here.json
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"variables" : [ {
|
||||
"name" : "DB_PERSON_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_NAME",
|
||||
"value" : "ervu_person_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_PERSON_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_HOST",
|
||||
"value" : "10.10.31.119",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PORT",
|
||||
"value" : "5432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_NAME",
|
||||
"value" : "ervu-dashboard-recr",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_USERNAME",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DASHBOARD_PASSWORD",
|
||||
"value" : "ervu-dashboard",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_NAME",
|
||||
"value" : "ervu_appeal_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_APPEAL_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_NAME",
|
||||
"value" : "ervu_decision_document",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_DECISION_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_HOST",
|
||||
"value" : "10.65.244.45",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PORT",
|
||||
"value" : "6432",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_NAME",
|
||||
"value" : "ervu_subpoena_registry",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_USERNAME",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
}, {
|
||||
"name" : "DB_SUBPOENA_PASSWORD",
|
||||
"value" : "readonly",
|
||||
"description" : ""
|
||||
} ]
|
||||
}
|
||||
200
mappings/country/appeals.main_profile.hpl
Normal file
200
mappings/country/appeals.main_profile.hpl
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.main_profile</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/11/11 16:52:36.340</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/11/11 16:52:36.340</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input appel-doc</from>
|
||||
<to>Merge join</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input person-reg</from>
|
||||
<to>Merge join</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Merge join</from>
|
||||
<to>Memory group by</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input appel-doc</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.appeal-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id
|
||||
FROM public.appeal_document</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table/>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Memory group by</name>
|
||||
<type>MemoryGroupBy</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
</fields>
|
||||
<give_back_row>N</give_back_row>
|
||||
<group>
|
||||
</group>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Sort rows</name>
|
||||
<type>SortRows</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<compress>N</compress>
|
||||
<directory>${java.io.tmpdir}</directory>
|
||||
<fields>
|
||||
</fields>
|
||||
<sort_prefix>out</sort_prefix>
|
||||
<sort_size>1000000</sort_size>
|
||||
<unique_rows>N</unique_rows>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>960</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input person-reg</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
recruit_id
|
||||
FROM public.recruits r
|
||||
JOIN public.recruits_info ri
|
||||
ON ri.recruit_id = r.id
|
||||
WHERE r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>288</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Merge join</name>
|
||||
<type>MergeJoin</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<join_type>LEFT OUTER</join_type>
|
||||
<keys_1>
|
||||
<key>recruit_id</key>
|
||||
</keys_1>
|
||||
<keys_2>
|
||||
<key>recruit_id</key>
|
||||
</keys_2>
|
||||
<transform1>Table input appel-doc</transform1>
|
||||
<transform2>Table input person-reg</transform2>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>160</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.reasons_appeal</name>
|
||||
|
|
@ -6,31 +7,104 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<pipeline_status>0</pipeline_status>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/02 11:56:22.507</created_date>
|
||||
<created_date>2025/01/28 11:14:23.116</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/02 11:56:22.507</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
<modified_date>2025/01/28 11:14:23.116</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ</from>
|
||||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (subpoena) РФ/осень</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<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 (appeals.reasons_appeal)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) РФ/осень</from>
|
||||
<to>Get variables 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals)</name>
|
||||
<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>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 = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>800</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (appeals.reasons_appeal)</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -40,39 +114,140 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<commit>100</commit>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>appeals</table>
|
||||
<key>
|
||||
<name>recruitment_id</name>
|
||||
<field>recruitment_id</field>
|
||||
<condition>=</condition>
|
||||
<name2/>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<value>
|
||||
<name>total_appeals</name>
|
||||
<rename>total_appeals</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</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_persent</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>N</update_bypassed>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>176</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>1296</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (appeal_document) РФ</name>
|
||||
<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>1008</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (subpoena) РФ/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -82,33 +257,58 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.appeal-document-service</connection>
|
||||
<sql>WITH
|
||||
t1 AS (
|
||||
SELECT COUNT(*) AS total_appeals
|
||||
FROM public.appeal_document
|
||||
) -- нет причин обжалований
|
||||
SELECT
|
||||
t1.total_appeals,
|
||||
'00' AS recruitment_id,
|
||||
0 AS incorrect_inf,
|
||||
0 AS no_data,
|
||||
0 AS other,
|
||||
0 AS incorrect_inf_percent,
|
||||
0 AS no_data_percent,
|
||||
0 AS other_percent
|
||||
FROM t1;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(appeal), 0) appeal,
|
||||
COALESCE(SUM(incorrect_inf), 0) incorrect_inf,
|
||||
COALESCE(SUM(sending_documents), 0) sending_documents,
|
||||
COALESCE(SUM(decision_disagreement), 0) decision_disagreement,
|
||||
COALESCE(SUM(complaint_withdrawal), 0) complaint_withdrawal,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appeal) > 0
|
||||
THEN ROUND((SUM(incorrect_inf) / SUM(appeal) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) incorrect_inf_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appeal) > 0
|
||||
THEN ROUND((SUM(sending_documents) / SUM(appeal) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) sending_documents_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appeal) > 0
|
||||
THEN ROUND((SUM(decision_disagreement) / SUM(appeal) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) decision_disagreement_persent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appeal) > 0
|
||||
THEN ROUND((SUM(complaint_withdrawal) / SUM(appeal) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) complaint_withdrawal_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
'Ministry' AS schema
|
||||
FROM appeals.reasons_appeal
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>176</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>576</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
300
mappings/country/appeals.topic_appeal.hpl
Normal file
300
mappings/country/appeals.topic_appeal.hpl
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>appeals.topic_appeal</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 11:14:23.116</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/28 11:14:23.116</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (subpoena) РФ/осень</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<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 (appeals.topic_appeal)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) РФ/осень</from>
|
||||
<to>Get variables 2 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>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 = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>800</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (appeals.topic_appeal)</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>schema</field>
|
||||
<name>schema</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</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>appear</name>
|
||||
<rename>appear</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1296</xloc>
|
||||
<yloc>448</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>1008</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(appear), 0) appear,
|
||||
COALESCE(SUM(registration), 0) registration,
|
||||
COALESCE(SUM(sabpoena), 0) sabpoena,
|
||||
COALESCE(SUM(temporary_measures), 0) temporary_measures,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appear) > 0
|
||||
THEN ROUND((SUM(registration) / SUM(appear) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) registration_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appear) > 0
|
||||
THEN ROUND((SUM(sabpoena) / SUM(appear) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) sabpoena_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(appear) > 0
|
||||
THEN ROUND((SUM(temporary_measures) / SUM(appear) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) temporary_measures_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
'Ministry' AS schema
|
||||
FROM appeals.topic_appeal
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>576</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>48</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>576</xloc>
|
||||
<yloc>1088</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -71,8 +71,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>48</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>624</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -81,8 +81,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>48</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>624</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -115,8 +115,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>128</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>704</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -125,8 +125,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>128</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>704</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -159,8 +159,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>192</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>768</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -169,8 +169,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>192</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>768</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -203,8 +203,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>272</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>848</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -213,8 +213,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>272</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>848</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -247,8 +247,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>928</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -257,8 +257,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>352</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>928</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -291,8 +291,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>432</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1008</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -301,8 +301,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>432</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1008</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -335,8 +335,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1088</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -345,8 +345,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>512</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1088</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -379,8 +379,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1152</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -389,8 +389,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1152</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -423,8 +423,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>640</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1216</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -433,8 +433,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>640</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1216</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -467,8 +467,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>704</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1280</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -477,8 +477,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>704</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1280</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -511,8 +511,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>768</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1344</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -521,128 +521,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>768</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.md.appeals</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM main_dashboard.appeals where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>48</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.md.rec_cam</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM main_dashboard.recruitment_campaign where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.md.tot_reg</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM main_dashboard.total_registered where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>192</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.md.wait_reg</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM main_dashboard.waiting_registration where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>272</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.rcam.subpoenas</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM recruitment_campaign.subpoenas where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.mrc</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.reg_mil_cat where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>432</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.remreg</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.removed_registry where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>512</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.sub</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.subpoenas where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1344</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -675,8 +555,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>832</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1408</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -685,68 +565,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>832</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.marstat</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.marital_status where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>832</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.chimin</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.child_minor where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>704</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.age</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.age where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>768</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.drilic</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.driver_license where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>640</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1408</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -779,8 +599,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>912</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1488</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -789,23 +609,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>912</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.edulev</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.education_level where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>912</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1488</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -838,8 +643,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>992</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1568</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -848,23 +653,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>992</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.totreg.busyn</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM total_registered.busyness where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>992</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1568</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -897,8 +687,8 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>960</xloc>
|
||||
<yloc>1056</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>1632</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -907,23 +697,8 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>1056</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL.reccam.app</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sql>DELETE FROM recruitment_campaign.appeals where recruitment_id = '00' and recording_date = current_date</sql>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>1056</yloc>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>1632</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -947,20 +722,101 @@
|
|||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>Y</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>1088</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>appeals.reasons_appeal.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}/country/appeals.reasons_appeal.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>VK_ARRAY</name>
|
||||
<stream_name>VK_ARRAY_ID</stream_name>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>REG_ID</name>
|
||||
<stream_name>RECRUITMENT_REG_ID</stream_name>
|
||||
</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>240</xloc>
|
||||
<yloc>576</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>544</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 5</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>544</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>appeals.topic_appeal.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}/country/appeals.topic_appeal.hpl</filename>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>VK_ARRAY</name>
|
||||
<stream_name>VK_ARRAY_ID</stream_name>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>REG_ID</name>
|
||||
<stream_name>RECRUITMENT_REG_ID</stream_name>
|
||||
</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>1360</xloc>
|
||||
<yloc>464</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 17</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1536</xloc>
|
||||
<yloc>464</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>main_dashboard.appeals</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>main_dashboard.recruitment_campaign</from>
|
||||
<to>Success 2</to>
|
||||
|
|
@ -1031,69 +887,6 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.md.appeals</from>
|
||||
<to>main_dashboard.appeals</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.md.rec_cam</from>
|
||||
<to>main_dashboard.recruitment_campaign</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.md.tot_reg</from>
|
||||
<to>main_dashboard.total_registered</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.md.wait_reg</from>
|
||||
<to>main_dashboard.waiting_registration</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.rcam.subpoenas</from>
|
||||
<to>recruitment_campaign.subpoenas</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.mrc</from>
|
||||
<to>total_registered.reg_mil_cat</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.remreg</from>
|
||||
<to>total_registered.removed_registry</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.sub</from>
|
||||
<to>total_registered.subpoenas</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.marstat</from>
|
||||
<to>total_registered.marital_status</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>total_registered.marital_status</from>
|
||||
<to>Success 13</to>
|
||||
|
|
@ -1101,34 +894,6 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.chimin</from>
|
||||
<to>total_registered.child_minor</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.age</from>
|
||||
<to>total_registered.age</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.drilic</from>
|
||||
<to>total_registered.driver_license</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.edulev</from>
|
||||
<to>total_registered.education_level</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>total_registered.education_level</from>
|
||||
<to>Success 14</to>
|
||||
|
|
@ -1136,13 +901,6 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.totreg.busyn</from>
|
||||
<to>total_registered.busyness</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>total_registered.busyness</from>
|
||||
<to>Success 15</to>
|
||||
|
|
@ -1150,13 +908,6 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>SQL.reccam.app</from>
|
||||
<to>recruitment_campaign.appeals</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>recruitment_campaign.appeals</from>
|
||||
<to>Success 16</to>
|
||||
|
|
@ -1172,109 +923,144 @@
|
|||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.md.appeals</to>
|
||||
<from>main_dashboard.appeals</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.md.tot_reg</to>
|
||||
<to>main_dashboard.appeals</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.md.wait_reg</to>
|
||||
<to>main_dashboard.recruitment_campaign</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.md.rec_cam</to>
|
||||
<to>main_dashboard.total_registered</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.rcam.subpoenas</to>
|
||||
<to>main_dashboard.waiting_registration</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.mrc</to>
|
||||
<to>recruitment_campaign.subpoenas</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.remreg</to>
|
||||
<to>total_registered.reg_mil_cat</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.sub</to>
|
||||
<to>total_registered.removed_registry</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.drilic</to>
|
||||
<to>total_registered.subpoenas</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.chimin</to>
|
||||
<to>total_registered.driver_license</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.age</to>
|
||||
<to>total_registered.child_minor</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.marstat</to>
|
||||
<to>total_registered.age</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.edulev</to>
|
||||
<to>total_registered.marital_status</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.totreg.busyn</to>
|
||||
<to>total_registered.education_level</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>SQL.reccam.app</to>
|
||||
<to>total_registered.busyness</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>recruitment_campaign.appeals</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>appeals.reasons_appeal.hpl</from>
|
||||
<to>Success 5</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>appeals.reasons_appeal.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>appeals.topic_appeal.hpl</from>
|
||||
<to>Success 17</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>select_recruitments_country</from>
|
||||
<to>appeals.topic_appeal.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ</from>
|
||||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 3 2</from>
|
||||
<to>Select values 3 2</to>
|
||||
|
|
@ -41,7 +36,41 @@
|
|||
<to>Get variables 3 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) РФ</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>
|
||||
<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 main_dashboard.appeals
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>336</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 3 2</name>
|
||||
<type>GetVariable</type>
|
||||
|
|
@ -71,82 +100,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>176</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>
|
||||
<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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>768</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -168,6 +123,11 @@
|
|||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<schema>main_dashboard</schema>
|
||||
<table>appeals</table>
|
||||
<value>
|
||||
|
|
@ -215,12 +175,17 @@
|
|||
<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>1024</xloc>
|
||||
<yloc>176</yloc>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -273,8 +238,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>816</xloc>
|
||||
<yloc>176</yloc>
|
||||
<xloc>912</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -288,45 +253,43 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.appeal-document-service</connection>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
t1 AS (
|
||||
SELECT COUNT(*) AS total_appeals
|
||||
FROM public.appeal_document
|
||||
),
|
||||
t2 AS (
|
||||
SELECT
|
||||
ROUND(
|
||||
AVG(
|
||||
(TRIM(BOTH '"' FROM (ad.extra_info ->> 'resultDate')::text)::date - ad.appeal_date)
|
||||
),
|
||||
2
|
||||
) AS average_consideration
|
||||
FROM public.appeal_document ad
|
||||
),
|
||||
resolved AS (
|
||||
SELECT COUNT(*) AS resolved
|
||||
FROM public.appeal_document ad
|
||||
WHERE ad.extra_info->>'result' IN ('1', '2')
|
||||
)
|
||||
SELECT
|
||||
t1.total_appeals,
|
||||
t2.average_consideration,
|
||||
r.resolved,
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_appeals), 0) total_appeals,
|
||||
COALESCE(SUM(resolved), 0) resolved,
|
||||
COALESCE(SUM(average_consideration), 0) average_consideration,
|
||||
COALESCE(SUM(average_rating), 0) average_rating,
|
||||
COALESCE(SUM(average_to_face), 0) average_to_face,
|
||||
COALESCE(SUM("average_EPGU"), 0) average_epgu,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0
|
||||
THEN ROUND((SUM(average_to_face) / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) average_to_face_percent,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (SUM(average_to_face) + SUM("average_EPGU")) > 0
|
||||
THEN ROUND((SUM("average_EPGU") / (SUM(average_to_face) + SUM("average_EPGU")) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) average_epgu_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 AS average_rating,
|
||||
0 AS average_to_face,
|
||||
0 AS average_epgu,
|
||||
0 AS average_to_face_percent,
|
||||
0 AS average_epgu_percent
|
||||
FROM t1, t2, resolved AS r;</sql>
|
||||
'Ministry' AS schema
|
||||
FROM main_dashboard.appeals
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>176</yloc>
|
||||
<xloc>560</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -21,11 +21,6 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ</from>
|
||||
<to>Insert / update (main_dashboard.total_registered)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
|
|
@ -41,7 +36,74 @@
|
|||
<to>Insert / update (main_dashboard.total_registered)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (person_registry) РФ</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>
|
||||
<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 main_dashboard.total_registered
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>240</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>624</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.total_registered)</name>
|
||||
<type>InsertUpdate</type>
|
||||
|
|
@ -60,7 +122,16 @@
|
|||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</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>
|
||||
|
|
@ -114,148 +185,24 @@
|
|||
<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>992</xloc>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (person_registry) РФ</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH vse as (
|
||||
select *,
|
||||
r.id as r_id
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri
|
||||
ON ri.recruit_id = r.id
|
||||
WHERE r.vu_current_info ->> 'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
),
|
||||
extracted_children AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
|
||||
FROM
|
||||
vse ri
|
||||
WHERE
|
||||
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
),
|
||||
children_birth_dates AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM
|
||||
extracted_children
|
||||
),
|
||||
children_count AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
COUNT(*) AS children_under_16
|
||||
FROM
|
||||
children_birth_dates
|
||||
WHERE
|
||||
AGE(make_date(year, month, day)) < interval '16 years'
|
||||
GROUP BY
|
||||
recruit_id
|
||||
),
|
||||
recruit_data AS (
|
||||
SELECT
|
||||
COUNT(*) AS total_count,
|
||||
COUNT(*) FILTER (WHERE gender = 'MALE') AS male_count,
|
||||
COUNT(*) FILTER (WHERE gender = 'FEMALE') AS female_count,
|
||||
COUNT(*) FILTER (
|
||||
WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 70
|
||||
AND gender = 'MALE') -- мужчины от 18 до 70 лет
|
||||
OR
|
||||
(EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 45
|
||||
AND gender = 'FEMALE') -- женщины от 18 до 45 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND COALESCE(cc.children_under_16, 0) < 5 -- исключить рекрутов с 5 и более детьми младше 16 лет
|
||||
) AS mobilization_criterion,
|
||||
COUNT(*) FILTER (
|
||||
WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
|
||||
AND gender = 'MALE' -- мужчины от 18 до 30 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
) AS volunteer_criterion,
|
||||
COUNT(*) FILTER (
|
||||
WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
|
||||
AND gender = 'MALE' -- мужчины от 18 до 50 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' -- признак отсутствия данных о судимости
|
||||
) AS contract_criterion
|
||||
FROM vse as ri
|
||||
LEFT JOIN children_count AS cc
|
||||
ON ri.r_id = cc.recruit_id
|
||||
)
|
||||
SELECT
|
||||
total_count,
|
||||
male_count,
|
||||
female_count,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
mobilization_criterion,
|
||||
volunteer_criterion,
|
||||
contract_criterion,
|
||||
ROUND(mobilization_criterion::NUMERIC / NULLIF(total_count, 0) * 100, 2) AS mobilization_criterion_percent,
|
||||
ROUND(volunteer_criterion::NUMERIC / NULLIF(total_count, 0) * 100, 2) AS volunteer_criterion_percent,
|
||||
ROUND(contract_criterion::NUMERIC / NULLIF(total_count, 0) * 100, 2) AS contract_criterion_percent
|
||||
FROM recruit_data;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>592</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
|
|
@ -306,8 +253,68 @@ FROM recruit_data;</sql>
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>464</yloc>
|
||||
<xloc>768</xloc>
|
||||
<yloc>368</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,
|
||||
'Ministry' AS schema
|
||||
FROM main_dashboard.total_registered
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input 2 (person_registry) РФ</from>
|
||||
<to>Insert / update (main_dashboard.waiting_registration)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
|
|
@ -41,7 +36,41 @@
|
|||
<to>Insert / update (main_dashboard.waiting_registration)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input 2 (person_registry) РФ</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>
|
||||
<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 main_dashboard.waiting_registration
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
|
|
@ -71,8 +100,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>544</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>832</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -93,6 +122,13 @@
|
|||
<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>
|
||||
|
|
@ -141,22 +177,22 @@
|
|||
<rename>contract_criterion_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>waiting_registration_percent</name>
|
||||
<rename>waiting_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>928</xloc>
|
||||
<yloc>336</yloc>
|
||||
<xloc>1360</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -209,8 +245,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>1040</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -224,95 +260,51 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.person_registry</connection>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH vse as (
|
||||
select *,
|
||||
r.id as r_id
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri
|
||||
ON ri.recruit_id = r.id
|
||||
WHERE r.vu_current_info ->> 'isMilitaryRegistered' = 'false'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
),
|
||||
extracted_children AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
|
||||
FROM
|
||||
vse ri
|
||||
WHERE
|
||||
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
),
|
||||
children_birth_dates AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM
|
||||
extracted_children
|
||||
),
|
||||
children_count AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
COUNT(*) AS children_under_16
|
||||
FROM
|
||||
children_birth_dates
|
||||
WHERE
|
||||
AGE(make_date(year, month, day)) < interval '16 years'
|
||||
GROUP BY
|
||||
recruit_id
|
||||
),
|
||||
recruit_data AS (
|
||||
SELECT
|
||||
COUNT(*) AS waiting_count,
|
||||
COUNT(*) FILTER (WHERE gender = 'MALE') AS male_count,
|
||||
COUNT(*) FILTER (WHERE gender = 'FEMALE') AS female_count,
|
||||
COUNT(*) FILTER (
|
||||
WHERE (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 70
|
||||
AND gender = 'MALE') -- мужчины от 18 до 70 лет
|
||||
OR
|
||||
(EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 45
|
||||
AND gender = 'FEMALE') -- женщины от 18 до 45 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND COALESCE(cc.children_under_16, 0) < 5 -- исключить рекрутов с 5 и более детьми младше 16 лет
|
||||
) AS mobilization_criterion,
|
||||
COUNT(*) FILTER (
|
||||
WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
|
||||
AND gender = 'MALE' -- мужчины от 18 до 30 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
) AS volunteer_criterion,
|
||||
COUNT(*) FILTER (
|
||||
WHERE EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
|
||||
AND gender = 'MALE' -- мужчины от 18 до 50 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' -- признак отсутствия данных о судимости
|
||||
) AS contract_criterion
|
||||
FROM vse as ri
|
||||
LEFT JOIN children_count AS cc
|
||||
ON ri.r_id = cc.recruit_id
|
||||
)
|
||||
SELECT
|
||||
waiting_count,
|
||||
ROUND(COALESCE((waiting_count::DECIMAL / NULLIF((SELECT COUNT(*) FROM public.recruits), 0) * 100), 0), 2) AS waiting_percent,
|
||||
male_count,
|
||||
female_count,
|
||||
<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,
|
||||
mobilization_criterion,
|
||||
volunteer_criterion,
|
||||
contract_criterion,
|
||||
ROUND(mobilization_criterion::NUMERIC / NULLIF(waiting_count, 0) * 100, 2) AS mobilization_criterion_percent,
|
||||
ROUND(volunteer_criterion::NUMERIC / NULLIF(waiting_count, 0) * 100, 2) AS volunteer_criterion_percent,
|
||||
ROUND(contract_criterion::NUMERIC / NULLIF(waiting_count, 0) * 100, 2) AS contract_criterion_percent
|
||||
FROM recruit_data;</sql>
|
||||
'Ministry' AS schema
|
||||
FROM main_dashboard.waiting_registration
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>368</xloc>
|
||||
<yloc>336</yloc>
|
||||
<xloc>624</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -21,36 +21,11 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ/осень</from>
|
||||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ/весна</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 2</from>
|
||||
<to>Select values 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ/весна</from>
|
||||
<to>Get variables 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 2</from>
|
||||
<to>Insert / update (main_dashboard.appeals) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (appeal_document) РФ/осень</from>
|
||||
<to>Get variables 2 2</to>
|
||||
|
|
@ -61,249 +36,39 @@
|
|||
<to>Insert / update (main_dashboard.appeals)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (appeal_document) РФ/осень</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update (main_dashboard.appeals)</name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>176</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>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>336</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>postgres.appeal-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>-- ad.extra_info->>'result' = '**' 1 - удовлетворена, 2 - частично удовлетворена, 3 - отказано в удовлетворении
|
||||
WITH appeals_data AS (
|
||||
SELECT
|
||||
COUNT(*) AS total_appeals,
|
||||
ROUND(AVG((TRIM(BOTH '"' FROM (ad.extra_info ->> 'resultDate')::text)::date - ad.appeal_date)), 2) AS average_consideration,
|
||||
COUNT(CASE WHEN ad.extra_info->>'result' IN ('1', '2') THEN 1 END) AS resolved, -- 2 это частично удовлетворена
|
||||
COUNT(CASE WHEN ad.extra_info->>'result' = '3' THEN 1 END) AS not_resolved
|
||||
FROM public.appeal_document ad
|
||||
)
|
||||
SELECT
|
||||
ad.total_appeals,
|
||||
ad.average_consideration,
|
||||
ad.resolved,
|
||||
ad.not_resolved,
|
||||
ROUND(ad.resolved * 100.0 / NULLIF(ad.total_appeals, 0), 2) AS resolved_percent,
|
||||
ROUND(ad.not_resolved * 100.0 / NULLIF(ad.total_appeals, 0), 2) AS not_resolved_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 AS average_rating,
|
||||
'Весна' as spring_autumn
|
||||
FROM appeals_data AS ad;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</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 = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>336</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>postgres.appeal-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>-- ad.extra_info->>'result' = '**' 1 - удовлетворена, 2 - частично удовлетворена, 3 - отказано в удовлетворении
|
||||
WITH appeals_data AS (
|
||||
SELECT
|
||||
COUNT(*) AS total_appeals,
|
||||
ROUND(AVG((TRIM(BOTH '"' FROM (ad.extra_info ->> 'resultDate')::text)::date - ad.appeal_date)), 2) AS average_consideration,
|
||||
COUNT(CASE WHEN ad.extra_info->>'result' IN ('1', '2') THEN 1 END) AS resolved, -- 2 это частично удовлетворена
|
||||
COUNT(CASE WHEN ad.extra_info->>'result' = '3' THEN 1 END) AS not_resolved
|
||||
FROM public.appeal_document ad
|
||||
)
|
||||
SELECT
|
||||
ad.total_appeals,
|
||||
ad.average_consideration,
|
||||
ad.resolved,
|
||||
ad.not_resolved,
|
||||
ROUND(ad.resolved * 100.0 / NULLIF(ad.total_appeals, 0), 2) AS resolved_percent,
|
||||
ROUND(ad.not_resolved * 100.0 / NULLIF(ad.total_appeals, 0), 2) AS not_resolved_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 AS average_rating,
|
||||
'Осень' as spring_autumn
|
||||
FROM appeals_data AS ad;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>176</yloc>
|
||||
<xloc>208</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -335,7 +100,96 @@ FROM appeals_data AS ad;</sql>
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<xloc>656</xloc>
|
||||
<yloc>256</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>REG_ID</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</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>1104</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -389,13 +243,13 @@ FROM appeals_data AS ad;</sql>
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<xloc>864</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
<name>Table input (appeal_document) РФ/осень</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -404,80 +258,46 @@ FROM appeals_data AS ad;</sql>
|
|||
<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>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COALESCE(SUM(total_appeals), 0) total_appeals,
|
||||
COALESCE(SUM(average_consideration), 0) average_consideration,
|
||||
COALESCE(SUM(resolved), 0) resolved,
|
||||
COALESCE(SUM(not_resolved), 0) not_resolved,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_appeals) > 0
|
||||
THEN ROUND((SUM(not_resolved) / SUM(total_appeals) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) not_resolved_percent,
|
||||
|
||||
COALESCE(SUM(average_rating), 0) average_rating,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN SUM(total_appeals) > 0
|
||||
THEN ROUND((SUM(resolved) / SUM(total_appeals) * 100), 2)
|
||||
ELSE 0
|
||||
END,
|
||||
0
|
||||
) resolved_percent,
|
||||
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
spring_autumn,
|
||||
'Ministry' AS schema
|
||||
FROM recruitment_campaign.appeals
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY spring_autumn;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>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>672</xloc>
|
||||
<yloc>416</yloc>
|
||||
<xloc>416</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -21,26 +21,11 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (subpoena) осень/РФ</from>
|
||||
<to>Insert / update (recruitment_campaign.subpoenas)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) Весна/РФ</from>
|
||||
<to>Insert / update (recruitment_campaign.subpoenas) 3</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 2</from>
|
||||
<to>Select values 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) осень/РФ</from>
|
||||
<to>Get variables 2 2</to>
|
||||
|
|
@ -52,602 +37,38 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (subpoena) Весна/РФ</from>
|
||||
<to>Get variables 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 2</from>
|
||||
<to>Insert / update (recruitment_campaign.subpoenas) 3</to>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (subpoena) осень/РФ</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update (recruitment_campaign.subpoenas)</name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>240</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>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>432</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>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH subpoena_data AS (
|
||||
SELECT
|
||||
s.id AS subpoena_id,
|
||||
s.status_id,
|
||||
sr.type,
|
||||
ssh.code AS sub_stat_hist,
|
||||
s.send_date,
|
||||
sh.date_time::timestamp AS history_date,
|
||||
rdi.restriction_document_cancel_id AS restr_dc,
|
||||
rdi.applied_date AS ap_date,
|
||||
rdi.id AS rdi_id,
|
||||
ssi.delivery_code AS d_code,
|
||||
ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn -- добавляем строку для получения последнего статуса
|
||||
FROM subpoena s
|
||||
JOIN subpoena_history AS sh ON sh.subpoena_id = s.id
|
||||
JOIN subpoena_status AS ss ON ss.id = s.status_id
|
||||
JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
|
||||
JOIN subpoena_reason AS sr ON sr.id = s.reason_id
|
||||
LEFT JOIN restriction_document AS rd ON rd.subpoena_id = s.id
|
||||
LEFT JOIN restriction_document_item AS rdi ON rdi.restriction_document_create_id = rd.id
|
||||
LEFT JOIN subpoena_send_info AS ssi ON ssi.subpoena_id = s.id
|
||||
WHERE sr.type = '3'
|
||||
and ssh.code not in ('3.14','3.7','3.72', '3.71')
|
||||
),
|
||||
-- фильтруем только последние статусы для каждой повестки
|
||||
last_status AS (
|
||||
SELECT *
|
||||
FROM subpoena_data
|
||||
WHERE rn = 1 -- выбираем только последнюю запись для каждой повестки
|
||||
),
|
||||
-- Подсчет различных метрик
|
||||
t1 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_subpoena
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IS NOT NULL
|
||||
),
|
||||
t2 AS (
|
||||
SELECT ROUND(AVG(EXTRACT(DAY FROM (history_date::timestamp - send_date::timestamp))), 1) AS average_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('4.1', '4.2', '4')
|
||||
),
|
||||
t3 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('4.1', '4.2', '4')
|
||||
),
|
||||
t4 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist = '5'
|
||||
),
|
||||
t5 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_ap_good_reason
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist = '5.1'
|
||||
),
|
||||
t6 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_ap_not_required
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('3.8', '5.2')
|
||||
),
|
||||
t7 AS ( -- количество повесток по которым применены ограничения
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_restrictions_applied
|
||||
FROM last_status
|
||||
WHERE restr_dc IS NULL
|
||||
),
|
||||
t8 AS ( -- количество повесток по которым введены меры
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_introduced_measures
|
||||
FROM last_status
|
||||
WHERE restr_dc IS NULL AND ap_date IS NOT NULL
|
||||
),
|
||||
t9 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_paper
|
||||
FROM last_status
|
||||
WHERE d_code != '7'
|
||||
),
|
||||
t10 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_electron
|
||||
FROM last_status
|
||||
WHERE d_code = '7'
|
||||
),
|
||||
t11 AS (
|
||||
SELECT COUNT (DISTINCT rdi_id) AS count_restrictions
|
||||
FROM last_status
|
||||
),
|
||||
t12 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_delivery --не вручена
|
||||
FROM last_status
|
||||
WHERE d_code is null
|
||||
),
|
||||
t13 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS appear_date_is_good
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1')
|
||||
)
|
||||
SELECT
|
||||
t1.count_subpoena,
|
||||
t2.average_appeared,
|
||||
t3.count_appeared,
|
||||
t4.count_not_appeared,
|
||||
t5.count_not_ap_good_reason,
|
||||
t6.count_ap_not_required,
|
||||
t7.count_restrictions_applied,
|
||||
t8.count_introduced_measures,
|
||||
t9.count_paper,
|
||||
t10.count_electron,
|
||||
t11.count_restrictions,
|
||||
t12.count_not_delivery,
|
||||
t13.appear_date_is_good,
|
||||
ROUND(count_appeared * 100.0 / NULLIF(count_subpoena, 0), 2) AS appeared_percent,
|
||||
ROUND(count_not_appeared * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_appeared_percent,
|
||||
ROUND(count_not_ap_good_reason * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_ap_good_reason_percent,
|
||||
ROUND(count_ap_not_required * 100.0 / NULLIF(count_subpoena, 0), 2) AS ap_not_required_percent,
|
||||
ROUND(count_electron * 100.0 / NULLIF(count_subpoena, 0), 2) AS electron_percent,
|
||||
ROUND(count_paper * 100.0 / NULLIF(count_subpoena, 0), 2) AS paper_percent,
|
||||
ROUND(count_restrictions_applied * 100.0 / NULLIF(count_subpoena, 0), 2) AS restrictions_applied_percent,
|
||||
ROUND(count_introduced_measures * 100.0 / NULLIF(count_subpoena, 0), 2) AS introduced_measures_percent,
|
||||
ROUND(count_not_delivery * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_delivery_percent, --процент не врученных
|
||||
ROUND(appear_date_is_good * 100.0 / NULLIF(count_subpoena, 0), 2) AS appear_date_is_good_percent, --процент не врученных
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 as rest,
|
||||
'Весна' as spring_autumn,
|
||||
1 AS org
|
||||
FROM t1
|
||||
FULL OUTER JOIN t2 ON 1 = 1
|
||||
FULL OUTER JOIN t3 ON 1 = 1
|
||||
FULL OUTER JOIN t4 ON 1 = 1
|
||||
FULL OUTER JOIN t5 ON 1 = 1
|
||||
FULL OUTER JOIN t6 ON 1 = 1
|
||||
FULL OUTER JOIN t7 ON 1 = 1
|
||||
FULL OUTER JOIN t8 ON 1 = 1
|
||||
FULL OUTER JOIN t9 ON 1 = 1
|
||||
FULL OUTER JOIN t10 ON 1 = 1
|
||||
FULL OUTER JOIN t11 ON 1 = 1
|
||||
FULL OUTER JOIN t12 ON 1 = 1
|
||||
FULL OUTER JOIN t13 ON 1 = 1;
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM recruitment_campaign.subpoenas
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>432</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>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH subpoena_data AS (
|
||||
SELECT
|
||||
s.id AS subpoena_id,
|
||||
s.status_id,
|
||||
sr.type,
|
||||
ssh.code AS sub_stat_hist,
|
||||
s.send_date,
|
||||
sh.date_time::timestamp AS history_date,
|
||||
rdi.restriction_document_cancel_id AS restr_dc,
|
||||
rdi.applied_date AS ap_date,
|
||||
rdi.id AS rdi_id,
|
||||
ssi.delivery_code AS d_code,
|
||||
ROW_NUMBER() OVER (PARTITION BY s.id ORDER BY sh.date_time DESC) AS rn -- добавляем строку для получения последнего статуса
|
||||
FROM subpoena s
|
||||
JOIN subpoena_history AS sh ON sh.subpoena_id = s.id
|
||||
JOIN subpoena_status AS ss ON ss.id = s.status_id
|
||||
JOIN subpoena_status AS ssh ON ssh.id = sh.status_id
|
||||
JOIN subpoena_reason AS sr ON sr.id = s.reason_id
|
||||
LEFT JOIN restriction_document AS rd ON rd.subpoena_id = s.id
|
||||
LEFT JOIN restriction_document_item AS rdi ON rdi.restriction_document_create_id = rd.id
|
||||
LEFT JOIN subpoena_send_info AS ssi ON ssi.subpoena_id = s.id
|
||||
WHERE sr.type = '3'
|
||||
and ssh.code not in ('3.14','3.7','3.72', '3.71')
|
||||
),
|
||||
-- фильтруем только последние статусы для каждой повестки
|
||||
last_status AS (
|
||||
SELECT *
|
||||
FROM subpoena_data
|
||||
WHERE rn = 1 -- выбираем только последнюю запись для каждой повестки
|
||||
),
|
||||
-- Подсчет различных метрик
|
||||
t1 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_subpoena
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IS NOT NULL
|
||||
),
|
||||
t2 AS (
|
||||
SELECT ROUND(AVG(EXTRACT(DAY FROM (history_date::timestamp - send_date::timestamp))), 1) AS average_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('4.1', '4.2', '4')
|
||||
),
|
||||
t3 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('4.1', '4.2', '4')
|
||||
),
|
||||
t4 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_appeared
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist = '5'
|
||||
),
|
||||
t5 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_ap_good_reason
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist = '5.1'
|
||||
),
|
||||
t6 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_ap_not_required
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('3.8', '5.2')
|
||||
),
|
||||
t7 AS ( -- количество повесток по которым применены ограничения
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_restrictions_applied
|
||||
FROM last_status
|
||||
WHERE restr_dc IS NULL
|
||||
),
|
||||
t8 AS ( -- количество повесток по которым введены меры
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_introduced_measures
|
||||
FROM last_status
|
||||
WHERE restr_dc IS NULL AND ap_date IS NOT NULL
|
||||
),
|
||||
t9 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_paper
|
||||
FROM last_status
|
||||
WHERE d_code != '7'
|
||||
),
|
||||
t10 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_electron
|
||||
FROM last_status
|
||||
WHERE d_code = '7'
|
||||
),
|
||||
t11 AS (
|
||||
SELECT COUNT (DISTINCT rdi_id) AS count_restrictions
|
||||
FROM last_status
|
||||
),
|
||||
t12 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS count_not_delivery --не вручена
|
||||
FROM last_status
|
||||
WHERE d_code is null
|
||||
),
|
||||
t13 AS (
|
||||
SELECT COUNT(DISTINCT subpoena_id) AS appear_date_is_good
|
||||
FROM last_status
|
||||
WHERE sub_stat_hist IN ('3','3.12', '3.13', '3.15', '3.1')
|
||||
)
|
||||
SELECT
|
||||
t1.count_subpoena,
|
||||
t2.average_appeared,
|
||||
t3.count_appeared,
|
||||
t4.count_not_appeared,
|
||||
t5.count_not_ap_good_reason,
|
||||
t6.count_ap_not_required,
|
||||
t7.count_restrictions_applied,
|
||||
t8.count_introduced_measures,
|
||||
t9.count_paper,
|
||||
t10.count_electron,
|
||||
t11.count_restrictions,
|
||||
t12.count_not_delivery,
|
||||
t13.appear_date_is_good,
|
||||
ROUND(count_appeared * 100.0 / NULLIF(count_subpoena, 0), 2) AS appeared_percent,
|
||||
ROUND(count_not_appeared * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_appeared_percent,
|
||||
ROUND(count_not_ap_good_reason * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_ap_good_reason_percent,
|
||||
ROUND(count_ap_not_required * 100.0 / NULLIF(count_subpoena, 0), 2) AS ap_not_required_percent,
|
||||
ROUND(count_electron * 100.0 / NULLIF(count_subpoena, 0), 2) AS electron_percent,
|
||||
ROUND(count_paper * 100.0 / NULLIF(count_subpoena, 0), 2) AS paper_percent,
|
||||
ROUND(count_restrictions_applied * 100.0 / NULLIF(count_subpoena, 0), 2) AS restrictions_applied_percent,
|
||||
ROUND(count_introduced_measures * 100.0 / NULLIF(count_subpoena, 0), 2) AS introduced_measures_percent,
|
||||
ROUND(count_not_delivery * 100.0 / NULLIF(count_subpoena, 0), 2) AS not_delivery_percent, --процент не врученных
|
||||
ROUND(appear_date_is_good * 100.0 / NULLIF(count_subpoena, 0), 2) AS appear_date_is_good_percent, --процент не врученных
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 as rest,
|
||||
'Осень' as spring_autumn,
|
||||
1 AS org
|
||||
FROM t1
|
||||
FULL OUTER JOIN t2 ON 1 = 1
|
||||
FULL OUTER JOIN t3 ON 1 = 1
|
||||
FULL OUTER JOIN t4 ON 1 = 1
|
||||
FULL OUTER JOIN t5 ON 1 = 1
|
||||
FULL OUTER JOIN t6 ON 1 = 1
|
||||
FULL OUTER JOIN t7 ON 1 = 1
|
||||
FULL OUTER JOIN t8 ON 1 = 1
|
||||
FULL OUTER JOIN t9 ON 1 = 1
|
||||
FULL OUTER JOIN t10 ON 1 = 1
|
||||
FULL OUTER JOIN t11 ON 1 = 1
|
||||
FULL OUTER JOIN t12 ON 1 = 1
|
||||
FULL OUTER JOIN t13 ON 1 = 1;
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>384</xloc>
|
||||
<yloc>240</yloc>
|
||||
<xloc>192</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -680,7 +101,151 @@ FULL OUTER JOIN t13 ON 1 = 1;
|
|||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>304</yloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (recruitment_campaign.subpoenas)</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>spring_autumn</field>
|
||||
<name>spring_autumn</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</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>1104</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -734,12 +299,12 @@ FULL OUTER JOIN t13 ON 1 = 1;
|
|||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>848</xloc>
|
||||
<yloc>304</yloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
<name>Table input (subpoena) осень/РФ</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -748,80 +313,105 @@ FULL OUTER JOIN t13 ON 1 = 1;
|
|||
<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>
|
||||
<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,
|
||||
'Ministry' AS schema
|
||||
FROM recruitment_campaign.subpoenas
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY spring_autumn;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>640</xloc>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>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>496</yloc>
|
||||
<xloc>416</xloc>
|
||||
<yloc>336</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -57,13 +57,10 @@
|
|||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>10</limit>
|
||||
<sql>WITH
|
||||
t1 AS (SELECT ARRAY_AGG(t.idm_id) AS RECRUITMENT00_ID FROM ervu_dashboard.recruitment AS t WHERE t.code = '0000000')
|
||||
SELECT
|
||||
t1.RECRUITMENT00_ID AS VK_ARRAY_ID,
|
||||
'00' AS RECRUITMENT_REG_ID
|
||||
FROM t1
|
||||
<limit/>
|
||||
<sql>SELECT 'f03fc8c0-2ce7-4121-a306-f82d65ea029d' AS RECRUITMENT_REG_ID,
|
||||
array_agg(recruitment_dstr_id) AS VK_ARRAY_ID
|
||||
FROM ervu_dashboard.array_mildis
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -21,36 +21,11 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/женщины</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2 2 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/мужчины</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/все</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 2</from>
|
||||
<to>Select values 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 3</from>
|
||||
<to>Select values 2 2 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/все</from>
|
||||
<to>Get variables 2 2</to>
|
||||
|
|
@ -62,529 +37,40 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/мужчины</from>
|
||||
<to>Get variables 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 2</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/женщины</from>
|
||||
<to>Get variables 2 2 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 3</from>
|
||||
<to>Insert / update (total_registered.driver_license) 2 2 2</to>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (person_registry) РФ/все</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.driver_license) 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>nope_repcent</name>
|
||||
<rename>nope_percent</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM total_registered.driver_license
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>128</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.driver_license) 2 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>nope_repcent</name>
|
||||
<rename>nope_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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.driver_license) 2 2 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>nope_repcent</name>
|
||||
<rename>nope_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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1104</xloc>
|
||||
<xloc>608</xloc>
|
||||
<yloc>400</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>postgres.person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH categorized AS (
|
||||
SELECT
|
||||
r.id,
|
||||
r.gender,
|
||||
-- Проверяем наличие хотя бы одной категории, используем DISTINCT для уникальных рекрутов
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%A%' THEN 1 ELSE 0 END) AS has_A,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%B%' THEN 1 ELSE 0 END) AS has_B,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%C%' THEN 1 ELSE 0 END) AS has_C,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%D%' THEN 1 ELSE 0 END) AS has_D,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%E%' THEN 1 ELSE 0 END) AS has_E
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
LEFT JOIN jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
|
||||
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
GROUP BY r.id, r.gender
|
||||
),
|
||||
aggregated AS (
|
||||
SELECT
|
||||
'ALL' AS gender,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
-- Считаем количество уникальных рекрутов с каждой категорией
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A = 0 AND has_B = 0 AND has_C = 0 AND has_D = 0 AND has_E = 0) AS nope,
|
||||
COUNT(DISTINCT r.id) AS total
|
||||
FROM categorized r
|
||||
)
|
||||
SELECT *,
|
||||
ROUND((a * 100.0) / NULLIF(total, 0), 2) AS a_percent,
|
||||
ROUND((b * 100.0) / NULLIF(total, 0), 2) AS b_percent,
|
||||
ROUND((c * 100.0) / NULLIF(total, 0), 2) AS c_percent,
|
||||
ROUND((d * 100.0) / NULLIF(total, 0), 2) AS d_percent,
|
||||
ROUND((e * 100.0) / NULLIF(total, 0), 2) AS e_percent,
|
||||
ROUND((nope * 100.0) / NULLIF(total, 0), 2) AS nope_percent
|
||||
FROM aggregated;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>128</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>postgres.person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH categorized AS (
|
||||
SELECT
|
||||
r.id,
|
||||
r.gender,
|
||||
-- Проверяем наличие хотя бы одной категории, используем DISTINCT для уникальных рекрутов
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%A%' THEN 1 ELSE 0 END) AS has_A,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%B%' THEN 1 ELSE 0 END) AS has_B,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%C%' THEN 1 ELSE 0 END) AS has_C,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%D%' THEN 1 ELSE 0 END) AS has_D,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%E%' THEN 1 ELSE 0 END) AS has_E
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
LEFT JOIN jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
|
||||
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
AND r.gender = 'FEMALE'
|
||||
GROUP BY r.id, r.gender
|
||||
),
|
||||
aggregated AS (
|
||||
SELECT
|
||||
'W' AS gender,
|
||||
'${REG_ID}' as recruitment_id,
|
||||
-- Считаем количество уникальных рекрутов с каждой категорией
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A = 0 AND has_B = 0 AND has_C = 0 AND has_D = 0 AND has_E = 0) AS nope,
|
||||
COUNT(DISTINCT r.id) AS total
|
||||
FROM categorized r
|
||||
)
|
||||
SELECT *,
|
||||
ROUND((a * 100.0) / NULLIF(total, 0), 2) AS a_percent,
|
||||
ROUND((b * 100.0) / NULLIF(total, 0), 2) AS b_percent,
|
||||
ROUND((c * 100.0) / NULLIF(total, 0), 2) AS c_percent,
|
||||
ROUND((d * 100.0) / NULLIF(total, 0), 2) AS d_percent,
|
||||
ROUND((e * 100.0) / NULLIF(total, 0), 2) AS e_percent,
|
||||
ROUND((nope * 100.0) / NULLIF(total, 0), 2) AS nope_percent
|
||||
FROM aggregated;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>400</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>postgres.person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH categorized AS (
|
||||
SELECT
|
||||
r.id,
|
||||
r.gender,
|
||||
-- Проверяем наличие хотя бы одной категории, используем DISTINCT для уникальных рекрутов
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%A%' THEN 1 ELSE 0 END) AS has_A,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%B%' THEN 1 ELSE 0 END) AS has_B,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%C%' THEN 1 ELSE 0 END) AS has_C,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%D%' THEN 1 ELSE 0 END) AS has_D,
|
||||
MAX(CASE WHEN cat->>'kategoriya' like '%E%' THEN 1 ELSE 0 END) AS has_E
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
LEFT JOIN jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS cat ON true
|
||||
WHERE r.vu_current_info->>'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
AND r.gender = 'MALE'
|
||||
GROUP BY r.id, r.gender
|
||||
),
|
||||
aggregated AS (
|
||||
SELECT
|
||||
'M' AS gender,
|
||||
'${REG_ID}' as recruitment_id,
|
||||
-- Считаем количество уникальных рекрутов с каждой категорией
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A > 0) AS a,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_B > 0) AS b,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_C > 0) AS c,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_D > 0) AS d,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_E > 0) AS e,
|
||||
COUNT(DISTINCT r.id) FILTER (WHERE has_A = 0 AND has_B = 0 AND has_C = 0 AND has_D = 0 AND has_E = 0) AS nope,
|
||||
COUNT(DISTINCT r.id) AS total
|
||||
FROM categorized r
|
||||
)
|
||||
SELECT *,
|
||||
ROUND((a * 100.0) / NULLIF(total, 0), 2) AS a_percent,
|
||||
ROUND((b * 100.0) / NULLIF(total, 0), 2) AS b_percent,
|
||||
ROUND((c * 100.0) / NULLIF(total, 0), 2) AS c_percent,
|
||||
ROUND((d * 100.0) / NULLIF(total, 0), 2) AS d_percent,
|
||||
ROUND((e * 100.0) / NULLIF(total, 0), 2) AS e_percent,
|
||||
ROUND((nope * 100.0) / NULLIF(total, 0), 2) AS nope_percent
|
||||
FROM aggregated;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
|
|
@ -614,8 +100,137 @@ FROM aggregated;</sql>
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>192</yloc>
|
||||
<xloc>1104</xloc>
|
||||
<yloc>400</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>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</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>nope_repcent</name>
|
||||
<rename>nope_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>
|
||||
<value>
|
||||
<name>total_count</name>
|
||||
<rename>total</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1584</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -668,13 +283,13 @@ FROM aggregated;</sql>
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>896</xloc>
|
||||
<yloc>192</yloc>
|
||||
<xloc>1312</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
<name>Table input (person_registry) РФ/все</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -683,167 +298,79 @@ FROM aggregated;</sql>
|
|||
<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>
|
||||
<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,
|
||||
'Ministry' AS schema
|
||||
FROM total_registered.driver_license
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>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>896</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 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>688</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 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>896</xloc>
|
||||
<yloc>464</yloc>
|
||||
<xloc>864</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -21,36 +21,11 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/все</from>
|
||||
<to>Insert / update (total_registered.marital_status) </to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/мужчины</from>
|
||||
<to>Insert / update (total_registered.marital_status) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/женщины</from>
|
||||
<to>Insert / update (total_registered.marital_status) 3</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 2</from>
|
||||
<to>Select values 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 3</from>
|
||||
<to>Select values 2 2 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/все</from>
|
||||
<to>Get variables 2 2</to>
|
||||
|
|
@ -62,429 +37,37 @@
|
|||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/мужчины</from>
|
||||
<to>Get variables 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 2</from>
|
||||
<to>Insert / update (total_registered.marital_status) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/женщины</from>
|
||||
<to>Get variables 2 2 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 3</from>
|
||||
<to>Insert / update (total_registered.marital_status) 3</to>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (person_registry) РФ/все</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.marital_status) </name>
|
||||
<type>InsertUpdate</type>
|
||||
<name>Execute SQL script</name>
|
||||
<type>ExecSql</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<distribute>N</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<arguments>
|
||||
</arguments>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.marital_status) 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>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.marital_status) 3</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
<name2/>
|
||||
</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>
|
||||
</lookup>
|
||||
<update_bypassed>Y</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1216</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (person_registry) РФ/все</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) AS not_married,
|
||||
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) AS married,
|
||||
|
||||
COUNT(*) AS total,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS not_married_percent,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS married_percent,
|
||||
'ALL' as gender,
|
||||
'${REG_ID}' as recruitment_id
|
||||
|
||||
FROM
|
||||
public.recruits r
|
||||
JOIN
|
||||
public.recruits_info ri ON ri.recruit_id = r.id
|
||||
WHERE
|
||||
r.current_recruitment_id IS NOT NULL
|
||||
AND r.vu_current_info->>'isMilitaryRegistered' = 'true' and r.current_recruitment_id is not null and r.target_recruitment_id is not null</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM total_registered.marital_status
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (person_registry) РФ/женщины</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) AS not_married,
|
||||
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) AS married,
|
||||
|
||||
COUNT(*) AS total,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS not_married_percent,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS married_percent,
|
||||
'W' as gender,
|
||||
'${REG_ID}' as recruitment_id
|
||||
|
||||
FROM
|
||||
public.recruits r
|
||||
JOIN
|
||||
public.recruits_info ri ON ri.recruit_id = r.id
|
||||
WHERE
|
||||
r.current_recruitment_id IS NOT NULL
|
||||
AND r.vu_current_info->>'isMilitaryRegistered' = 'true' and r.current_recruitment_id is not null and r.target_recruitment_id is not null
|
||||
AND r.gender = 'FEMALE';
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<yloc>368</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (person_registry) РФ/мужчины</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) AS not_married,
|
||||
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) AS married,
|
||||
|
||||
COUNT(*) AS total,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('Вдова/Вдовец', 'В разводе')
|
||||
OR ri.info->'svedSemPolozh'->'semPolozhNaim' IS NULL
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS not_married_percent,
|
||||
|
||||
CASE
|
||||
WHEN COUNT(*) = 0 THEN 0
|
||||
ELSE ROUND(
|
||||
COUNT(*) FILTER (
|
||||
WHERE
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' IN ('В браке')
|
||||
) * 100.0 / COUNT(*), 2
|
||||
) END AS married_percent,
|
||||
'M' as gender,
|
||||
'${REG_ID}' as recruitment_id
|
||||
|
||||
FROM
|
||||
public.recruits r
|
||||
JOIN
|
||||
public.recruits_info ri ON ri.recruit_id = r.id
|
||||
WHERE
|
||||
r.current_recruitment_id IS NOT NULL
|
||||
AND r.vu_current_info->>'isMilitaryRegistered' = 'true' and r.current_recruitment_id is not null and r.target_recruitment_id is not null
|
||||
AND r.gender = 'MALE';
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>592</xloc>
|
||||
<xloc>352</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
|
|
@ -517,8 +100,107 @@ WHERE
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>880</xloc>
|
||||
<yloc>272</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>"all_M_W"</field>
|
||||
<name>gender</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</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>1392</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -571,13 +253,13 @@ WHERE
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>1088</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
<name>Table input (person_registry) РФ/все</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -586,167 +268,52 @@ WHERE
|
|||
<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>
|
||||
<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,
|
||||
'Ministry' AS schema
|
||||
FROM total_registered.marital_status
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY "all_M_W", convicts;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>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>1008</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 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>800</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 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>1008</xloc>
|
||||
<yloc>400</yloc>
|
||||
<xloc>608</xloc>
|
||||
<yloc>272</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -21,36 +21,11 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/на учете</from>
|
||||
<to>Insert / update (total_registered.reg_mil_cat)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/не на учете</from>
|
||||
<to>Insert / update (total_registered.reg_mil_cat) 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2 2</from>
|
||||
<to>Select values 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/не на учете</from>
|
||||
<to>Get variables 2 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 2 2 2</from>
|
||||
<to>Insert / update (total_registered.reg_mil_cat) 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (person_registry) РФ/на учете</from>
|
||||
<to>Get variables 2 2</to>
|
||||
|
|
@ -61,7 +36,41 @@
|
|||
<to>Insert / update (total_registered.reg_mil_cat)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (person_registry) РФ/на учете</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>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM total_registered.reg_mil_cat
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
|
|
@ -91,41 +100,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Get variables 2 2 2</name>
|
||||
<type>GetVariable</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<field>
|
||||
<length>-1</length>
|
||||
<name>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>624</xloc>
|
||||
<yloc>480</yloc>
|
||||
<xloc>1184</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -152,109 +128,10 @@
|
|||
<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>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>944</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.reg_mil_cat) 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>mil_reg</field>
|
||||
<name>mil_reg</name>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>reg_mil_cat</table>
|
||||
|
|
@ -328,12 +205,17 @@
|
|||
<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>944</xloc>
|
||||
<yloc>384</yloc>
|
||||
<xloc>1648</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -386,62 +268,8 @@
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>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>832</xloc>
|
||||
<yloc>480</yloc>
|
||||
<xloc>1392</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -455,223 +283,83 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH base_data AS (
|
||||
-- Основной набор данных
|
||||
SELECT
|
||||
r.registration_reasons,
|
||||
r.gender,
|
||||
r.vu_current_info ->> 'isMilitaryRegistered' AS is_military_registered
|
||||
FROM public.recruits r
|
||||
WHERE r.vu_current_info ->> 'isMilitaryRegistered' = 'true'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
),
|
||||
total AS (
|
||||
-- Общее количество записей
|
||||
SELECT COUNT(*) AS total_count
|
||||
FROM base_data
|
||||
),
|
||||
t1 AS (
|
||||
-- Первоначальная постановка 17 лет
|
||||
SELECT COUNT(*) AS first_reg_17
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"5"'
|
||||
),
|
||||
t2 AS (
|
||||
-- Первоначальная постановка 18 лет
|
||||
SELECT COUNT(*) AS first_reg_18
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"6"'
|
||||
OR registration_reasons @> '"3"'
|
||||
OR registration_reasons @> '"1"'
|
||||
OR registration_reasons @> '"4"'
|
||||
OR registration_reasons @> '"2"'
|
||||
),
|
||||
t3 AS (
|
||||
-- Женщины, получившие ВУС
|
||||
SELECT COUNT(*) AS mil_spec_w
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
|
||||
),
|
||||
t4 AS (
|
||||
-- Возвратившиеся из мест лишения свободы
|
||||
SELECT COUNT(*) AS returned_dep_liberty
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"1"'
|
||||
),
|
||||
t5 AS (
|
||||
-- Отбывающие наказание в местах лишения свободы
|
||||
SELECT COUNT(*) AS punished
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"4"'
|
||||
),
|
||||
t6 AS (
|
||||
-- Получившие гражданство
|
||||
SELECT COUNT(*) AS received_citizenship
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"2"'
|
||||
),
|
||||
t7 AS (
|
||||
-- Получившие гражданство
|
||||
SELECT COUNT(*) AS other
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"6"'
|
||||
AND NOT registration_reasons @> '"3"'
|
||||
AND NOT registration_reasons @> '"1"'
|
||||
AND NOT registration_reasons @> '"4"'
|
||||
AND NOT registration_reasons @> '"2"'
|
||||
)
|
||||
SELECT
|
||||
total.total_count,
|
||||
t1.first_reg_17,
|
||||
t2.first_reg_18,
|
||||
t3.mil_spec_w,
|
||||
t4.returned_dep_liberty,
|
||||
t5.punished,
|
||||
t6.received_citizenship,
|
||||
t7.other,
|
||||
-- Вычисление процентов
|
||||
ROUND(t1.first_reg_17 * 100.0 / NULLIF(total.total_count, 0), 2) AS first_reg_17_percent,
|
||||
ROUND(t2.first_reg_18 * 100.0 / NULLIF(total.total_count, 0), 2) AS first_reg_18_percent,
|
||||
ROUND(t4.returned_dep_liberty * 100.0 / NULLIF(total.total_count, 0), 2) AS returned_dep_liberty_percent,
|
||||
ROUND(t3.mil_spec_w * 100.0 / NULLIF(total.total_count, 0), 2) AS mil_spec_w_percent,
|
||||
ROUND(t5.punished * 100.0 / NULLIF(total.total_count, 0), 2) AS punished_percent,
|
||||
ROUND(t6.received_citizenship * 100.0 / NULLIF(total.total_count, 0), 2) AS received_citizenship_percent,
|
||||
ROUND(t7.other * 100.0 / NULLIF(total.total_count, 0), 2) AS other_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
1 AS mil_reg,
|
||||
1 AS org
|
||||
FROM total
|
||||
FULL OUTER JOIN t1 ON 1 = 1
|
||||
FULL OUTER JOIN t2 ON 1 = 1
|
||||
FULL OUTER JOIN t3 ON 1 = 1
|
||||
FULL OUTER JOIN t4 ON 1 = 1
|
||||
FULL OUTER JOIN t5 ON 1 = 1
|
||||
FULL OUTER JOIN t6 ON 1 = 1
|
||||
FULL OUTER JOIN t7 ON 1 = 1;</sql>
|
||||
<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,
|
||||
'Ministry' AS schema
|
||||
FROM total_registered.reg_mil_cat
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE
|
||||
GROUP BY mil_reg;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (person_registry) РФ/не на учете</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH base_data AS (
|
||||
-- Основной набор данных
|
||||
SELECT
|
||||
r.registration_reasons,
|
||||
r.gender,
|
||||
r.vu_current_info ->> 'isMilitaryRegistered' AS is_military_registered
|
||||
FROM public.recruits r
|
||||
WHERE r.vu_current_info ->> 'isMilitaryRegistered' = 'false'
|
||||
AND r.current_recruitment_id IS NOT NULL
|
||||
AND r.target_recruitment_id IS NOT NULL
|
||||
),
|
||||
total AS (
|
||||
-- Общее количество записей
|
||||
SELECT COUNT(*) AS total_count
|
||||
FROM base_data
|
||||
),
|
||||
t1 AS (
|
||||
-- Первоначальная постановка 17 лет
|
||||
SELECT COUNT(*) AS first_reg_17
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"5"'
|
||||
),
|
||||
t2 AS (
|
||||
-- Первоначальная постановка 18 лет
|
||||
SELECT COUNT(*) AS first_reg_18
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"6"'
|
||||
OR registration_reasons @> '"3"'
|
||||
OR registration_reasons @> '"1"'
|
||||
OR registration_reasons @> '"4"'
|
||||
OR registration_reasons @> '"2"'
|
||||
),
|
||||
t3 AS (
|
||||
-- Женщины, получившие ВУС
|
||||
SELECT COUNT(*) AS mil_spec_w
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"3"' AND gender = 'FEMALE'
|
||||
),
|
||||
t4 AS (
|
||||
-- Возвратившиеся из мест лишения свободы
|
||||
SELECT COUNT(*) AS returned_dep_liberty
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"1"'
|
||||
),
|
||||
t5 AS (
|
||||
-- Отбывающие наказание в местах лишения свободы
|
||||
SELECT COUNT(*) AS punished
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"4"'
|
||||
),
|
||||
t6 AS (
|
||||
-- Получившие гражданство
|
||||
SELECT COUNT(*) AS received_citizenship
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"2"'
|
||||
),
|
||||
t7 AS (
|
||||
-- Получившие гражданство
|
||||
SELECT COUNT(*) AS other
|
||||
FROM base_data
|
||||
WHERE registration_reasons @> '"6"'
|
||||
AND NOT registration_reasons @> '"3"'
|
||||
AND NOT registration_reasons @> '"1"'
|
||||
AND NOT registration_reasons @> '"4"'
|
||||
AND NOT registration_reasons @> '"2"'
|
||||
)
|
||||
SELECT
|
||||
total.total_count,
|
||||
t1.first_reg_17,
|
||||
t2.first_reg_18,
|
||||
t3.mil_spec_w,
|
||||
t4.returned_dep_liberty,
|
||||
t5.punished,
|
||||
t6.received_citizenship,
|
||||
t7.other,
|
||||
-- Вычисление процентов
|
||||
ROUND(t1.first_reg_17 * 100.0 / NULLIF(total.total_count, 0), 2) AS first_reg_17_percent,
|
||||
ROUND(t2.first_reg_18 * 100.0 / NULLIF(total.total_count, 0), 2) AS first_reg_18_percent,
|
||||
ROUND(t4.returned_dep_liberty * 100.0 / NULLIF(total.total_count, 0), 2) AS returned_dep_liberty_percent,
|
||||
ROUND(t3.mil_spec_w * 100.0 / NULLIF(total.total_count, 0), 2) AS mil_spec_w_percent,
|
||||
ROUND(t5.punished * 100.0 / NULLIF(total.total_count, 0), 2) AS punished_percent,
|
||||
ROUND(t6.received_citizenship * 100.0 / NULLIF(total.total_count, 0), 2) AS received_citizenship_percent,
|
||||
ROUND(t7.other * 100.0 / NULLIF(total.total_count, 0), 2) AS other_percent,
|
||||
'${REG_ID}' AS recruitment_id,
|
||||
0 AS mil_reg,
|
||||
1 AS org
|
||||
FROM total
|
||||
FULL OUTER JOIN t1 ON 1 = 1
|
||||
FULL OUTER JOIN t2 ON 1 = 1
|
||||
FULL OUTER JOIN t3 ON 1 = 1
|
||||
FULL OUTER JOIN t4 ON 1 = 1
|
||||
FULL OUTER JOIN t5 ON 1 = 1
|
||||
FULL OUTER JOIN t6 ON 1 = 1
|
||||
FULL OUTER JOIN t7 ON 1 = 1;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>512</xloc>
|
||||
<yloc>384</yloc>
|
||||
<xloc>944</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@
|
|||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input (decision-document-service) РФ</from>
|
||||
<to>Insert / update (total_registered.removed_registry)</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Get variables 2 2</from>
|
||||
<to>Select values 2 2</to>
|
||||
|
|
@ -41,7 +36,74 @@
|
|||
<to>Insert / update (total_registered.removed_registry)</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Execute SQL script</from>
|
||||
<to>Table input (decision-document-service) РФ</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>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<quoteString>N</quoteString>
|
||||
<replace_variables>Y</replace_variables>
|
||||
<set_params>N</set_params>
|
||||
<single_statement>N</single_statement>
|
||||
<sql>DELETE FROM total_registered.removed_registry
|
||||
WHERE recording_date = current_date
|
||||
AND schema = 'Ministry'
|
||||
AND recruitment_id = '${REG_ID}'</sql>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>224</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>672</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update (total_registered.removed_registry)</name>
|
||||
<type>InsertUpdate</type>
|
||||
|
|
@ -60,7 +122,11 @@
|
|||
<condition>=</condition>
|
||||
<field>recruitment_id</field>
|
||||
<name>REG_ID</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>schema</field>
|
||||
<name>schema</name>
|
||||
</key>
|
||||
<schema>total_registered</schema>
|
||||
<table>removed_registry</table>
|
||||
|
|
@ -134,92 +200,19 @@
|
|||
<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>1072</xloc>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (decision-document-service) РФ</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.decision-document-service</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
COUNT(*) AS removed_registry,
|
||||
COUNT(CASE WHEN d.extra_info ->> 'cause' = 'ageLimit' THEN 1 END) AS age_limit, -- Количество по причине предельный возраст
|
||||
COUNT(CASE WHEN d.extra_info ->> 'cause' = 'notAlive' THEN 1 END) AS death, -- Количество по причине смерть
|
||||
'0' AS deprivation_citizenship,
|
||||
'0' AS travel_abroad,
|
||||
'0' AS living_abroad,
|
||||
COUNT(CASE WHEN (d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive')) THEN 1 END) AS other, -- Количество по другим причинам
|
||||
'0' AS deprivation_citizen_percents,
|
||||
ROUND(COUNT(CASE WHEN d.extra_info ->> 'cause' = 'ageLimit' THEN 1 END) * 100.0 / NULLIF(COUNT(*), 0), 2) AS age_limit_percent, -- Процент по причине предельный возраст
|
||||
ROUND(COUNT(CASE WHEN d.extra_info ->> 'cause' = 'notAlive' THEN 1 END) * 100.0 / NULLIF(COUNT(*), 0), 2) AS death_percent, -- Процент по причине смерть
|
||||
'0' AS travel_abroad_percent,
|
||||
'0' AS living_abroad_percent,
|
||||
ROUND(COUNT(CASE WHEN (d.extra_info ->> 'cause' IS NULL OR d.extra_info ->> 'cause' NOT IN ('ageLimit', 'notAlive')) THEN 1 END) * 100.0 / NULLIF(COUNT(*), 0), 2) AS other_percent, -- Процент по другим причинам
|
||||
'${REG_ID}' AS recruitment_id
|
||||
FROM public.recruit AS r
|
||||
JOIN public.decision AS d
|
||||
ON d.recruit_id = r.id
|
||||
JOIN public.decision_type AS dt
|
||||
ON dt.id = d.type_id
|
||||
WHERE r.system_pgs_status = '1.3'
|
||||
AND r.current_recruitment IS NOT NULL
|
||||
AND r.target_recruitment IS NOT NULL
|
||||
AND dt.code IN ('9', '10');</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<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>656</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 2 2</name>
|
||||
<type>SelectValues</type>
|
||||
|
|
@ -270,8 +263,91 @@ WHERE r.system_pgs_status = '1.3'
|
|||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>864</xloc>
|
||||
<yloc>304</yloc>
|
||||
<xloc>880</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (decision-document-service) РФ</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,
|
||||
'Ministry' AS schema
|
||||
FROM total_registered.removed_registry
|
||||
WHERE recruitment_id = ANY ('${VK_ARRAY}')
|
||||
AND schema = 'Region'
|
||||
AND recording_date = CURRENT_DATE;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>child</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,83 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>full_name</field>
|
||||
<name>full_name</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_child</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_az_number</name>
|
||||
<rename>birth_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_az_number</name>
|
||||
<rename>death_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_date</name>
|
||||
<rename>death_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kinship_type</name>
|
||||
<rename>kinship_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,11 +112,14 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with child as
|
||||
(select jsonb_array_elements(ri.info->'svedDeti'->'rebenok') ch,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array')
|
||||
select
|
||||
r.id::uuid recruit_id,
|
||||
ch->>'naimRodstvSvyazReb' kinship_type,
|
||||
|
|
@ -58,20 +133,16 @@ select
|
|||
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
|
||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
|
||||
ch->'svedSmert'->>'nomerZapis' death_az_number,
|
||||
ch->'svedAZRozhd'->'dataRozhdDok'->>'nomerZapis' birth_az_number
|
||||
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
|
||||
from public.recruits r
|
||||
join child on r.id = child.recruit_id</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join child on r.id = child.recruit_id
|
||||
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>400</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -85,31 +156,27 @@ join child on r.id = child.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_child</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_child</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>608</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
27
mappings/info_recruits/citizen_appealing_violations_fz53.hpl
Normal file
27
mappings/info_recruits/citizen_appealing_violations_fz53.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_appealing_violations_fz53</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/02/14 13:08:11.179</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:08:11.179</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_complex_filters.hpl
Normal file
27
mappings/info_recruits/citizen_complex_filters.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_complex_filters</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/02/14 13:08:41.773</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:08:41.773</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_criminal_liability_fz53.hpl
Normal file
27
mappings/info_recruits/citizen_criminal_liability_fz53.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_liability_fz53</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/02/14 13:07:43.829</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:07:43.829</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_criminal_record.hpl
Normal file
27
mappings/info_recruits/citizen_criminal_record.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_record</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/02/14 13:05:50.389</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:05:50.389</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_education_diplomas_received</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/02/14 13:03:35.892</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:03:35.892</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_foreign</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,132 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>citizenship_date</field>
|
||||
<name>citizenship_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>citizenship_date</name>
|
||||
<rename>citizenship_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>country_name</name>
|
||||
<rename>country_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>citizenship_basis</name>
|
||||
<rename>citizenship_basis</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>residense_right_date</field>
|
||||
<name>residense_right_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residense_right_date</name>
|
||||
<rename>residense_right_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>country_name</name>
|
||||
<rename>country_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>residense_right_basis</name>
|
||||
<rename>residense_right_basis</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,29 +161,30 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with citizen as
|
||||
(select jsonb_array_elements(ri.info->'svedIGPP'->'svedIG') cit,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedIGPP'->'svedIG') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
cit->'oksm'->>'naimOKSM' country_name,
|
||||
cit->>'osnovPriobrIG' citizenship_basis,
|
||||
to_date(cit->>'dataPriobrIG', 'YYYY-MM-DD') citizenship_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join citizen on r.id = citizen.recruit_id
|
||||
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -82,29 +199,29 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with citizen as
|
||||
(select jsonb_array_elements(ri.info->'svedIGPP'->'svedPP') cit,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedPP') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedIGPP'->'svedPP') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
cit->'oksm'->>'naimOKSM' country_name,
|
||||
cit->>'osnovPriobrPP' residense_right_basis,
|
||||
to_date(cit->>'dataPriobrPP', 'YYYY-MM-DD') residense_right_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join citizen on r.id = citizen.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -118,31 +235,27 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>48</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -156,31 +269,27 @@ join citizen on r.id = citizen.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship_foreign</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>512</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
27
mappings/info_recruits/citizen_individual_decisions.hpl
Normal file
27
mappings/info_recruits/citizen_individual_decisions.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_individual_decisions</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/02/14 13:09:08.476</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:09:08.476</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_information_search.hpl
Normal file
27
mappings/info_recruits/citizen_information_search.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_information_search</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/02/14 13:06:54.013</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:06:54.013</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_sports_categories.hpl
Normal file
27
mappings/info_recruits/citizen_sports_categories.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_sports_categories</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/02/14 13:05:06.026</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:05:06.026</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/info_recruits/citizen_work_activity.hpl
Normal file
27
mappings/info_recruits/citizen_work_activity.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_work_activity</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/02/14 13:02:15.430</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:02:15.430</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizenship</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,88 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>acquiring_authority</name>
|
||||
<rename>acquiring_authority</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>acquiring_basis</name>
|
||||
<rename>acquiring_basis</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>acquiring_date</name>
|
||||
<rename>acquiring_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>acquiring_number</name>
|
||||
<rename>acquiring_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>renunciation_authority</name>
|
||||
<rename>renunciation_authority</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>renunciation_basis</name>
|
||||
<rename>renunciation_basis</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>renunciation_date</name>
|
||||
<rename>renunciation_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>renunciation_number</name>
|
||||
<rename>renunciation_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,30 +117,27 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number,
|
||||
to_date(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number,
|
||||
to_date(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
|
||||
ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>224</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -77,31 +151,27 @@ where ri.info->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizenship</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>224</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>deputy</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,23 +16,144 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>deputy</field>
|
||||
<name>deputy</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date</name>
|
||||
<rename>end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>information</name>
|
||||
<rename>information</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>period_office</name>
|
||||
<rename>period_office</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deputy</name>
|
||||
<rename>deputy</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>deputy</field>
|
||||
<name>deputy</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date</name>
|
||||
<rename>end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>information</name>
|
||||
<rename>information</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deputy</name>
|
||||
<rename>deputy</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,24 +166,21 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
|
||||
to_date(ri.info->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
|
||||
to_date(ri.info->'svedFL'->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>224</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -77,24 +195,21 @@ where ri.info->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
to_date(ri.info->'svedKandidat'->'kandidat'->>'dataSnyatiyaKandidatury', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
|
||||
to_date(ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'dataSnyatKandidat', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
|
||||
false deputy
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>320</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -108,31 +223,27 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>224</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>688</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -146,31 +257,27 @@ where ri.info->'svedKandidat'->'kandidat'->>'svedRegKandidata' is not null;</sql
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>320</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>688</xloc>
|
||||
<yloc>448</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disability</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,147 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>confirmation_date</name>
|
||||
<rename>confirmation_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability</name>
|
||||
<rename>disability</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability_group</name>
|
||||
<rename>disability_group</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_name</name>
|
||||
<rename>organization_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_name</name>
|
||||
<rename>organization_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,32 +176,29 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
case when ri.info->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -85,6 +213,8 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name,
|
||||
|
|
@ -92,18 +222,13 @@ where ri.info->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
|
|||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null
|
||||
AND r.system_update_date >= '${UP_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -117,31 +242,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>80</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -155,31 +276,27 @@ where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disability</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>496</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disease</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,68 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>reg_date</field>
|
||||
<name>reg_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disease</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>code</name>
|
||||
<rename>code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>name</name>
|
||||
<rename>name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reg_date</name>
|
||||
<rename>reg_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,29 +97,27 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with zdorov as
|
||||
(select jsonb_array_elements(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
z->>'kodZabol' code,
|
||||
z->>'naimZabol' name,
|
||||
to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from public.recruits r
|
||||
join zdorov on r.id = zdorov.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join zdorov on r.id = zdorov.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -76,31 +131,27 @@ join zdorov on r.id = zdorov.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>disease</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disease</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>464</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>drivers_licence</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,174 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
<name2/>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>categories</name>
|
||||
<rename>categories</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>licence_series</name>
|
||||
<rename>licence_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>tractor_driver</field>
|
||||
<name>tractor_driver</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>categories</name>
|
||||
<rename>categories</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>licence_number</name>
|
||||
<rename>licence_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>licence_series</name>
|
||||
<rename>licence_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>replacement_date</name>
|
||||
<rename>replacement_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>return_date</name>
|
||||
<rename>return_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>seizure_date</name>
|
||||
<rename>seizure_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>tractor_driver</name>
|
||||
<rename>tractor_driver</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,30 +203,28 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' licence_series,
|
||||
ri.info->'svedVoditUdost'->'voditUdost'->>'nomVodUd' licence_number,
|
||||
to_date(ri.info->'svedVoditUdost'->'voditUdost'->>'dataVodUd', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedVoditUdost'->'voditUdost'->>'srokVodUd', 'YYYY-MM-DD') close_date,
|
||||
ri.recruit_id recruit_id,
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' licence_series,
|
||||
--ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'nomVodUd' licence_number,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataVydDok', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'srokDeistvDok', 'YYYY-MM-DD') close_date,
|
||||
array_to_string(array(
|
||||
select kat->>'kategoriya'
|
||||
from jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
|
||||
select kat->>'naimKatTS'
|
||||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -83,35 +239,32 @@ where ri.info->'svedVoditUdost'->'voditUdost'->>'serVodUd' is not null;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' licence_series,
|
||||
ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'nomUTM' licence_number,
|
||||
to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataVydUTM', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataIztUTM', 'YYYY-MM-DD') seizure_date,
|
||||
to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataZamUTM', 'YYYY-MM-DD') replacement_date,
|
||||
to_date(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataVozUTM', 'YYYY-MM-DD') return_date,
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' licence_series,
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' licence_number,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVydUTM', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataIztUTM', 'YYYY-MM-DD') seizure_date, --
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataZameny', 'YYYY-MM-DD') replacement_date,--
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVozvr', 'YYYY-MM-DD') return_date,--
|
||||
array_to_string(array(
|
||||
select kat->>'kategoriya'
|
||||
from jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories,
|
||||
select kat->>'naimKatTS'
|
||||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories,
|
||||
true tractor_driver
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
|
||||
where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not null
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>416</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -125,31 +278,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -163,31 +312,27 @@ where ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'serUTM' is not null;
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>drivers_licence</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>544</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
27
mappings/info_recruits/incident.hpl
Normal file
27
mappings/info_recruits/incident.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>incident</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/02/14 13:11:10.022</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 13:11:10.022</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -18,19 +18,251 @@
|
|||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>394</height>
|
||||
<xloc>960</xloc>
|
||||
<yloc>16</yloc>
|
||||
<note>acquired_citizenship
|
||||
address_actual
|
||||
address_place_stay
|
||||
city_birth
|
||||
date_info_actual
|
||||
date_loss_info_actual
|
||||
died_date
|
||||
dispensary_registration_code
|
||||
email
|
||||
end_date_place_stay
|
||||
end_date_residence
|
||||
inn
|
||||
is_in_prison
|
||||
medic
|
||||
medical_requirements
|
||||
region_birth
|
||||
residence
|
||||
right_deferment
|
||||
snils
|
||||
source_info_actual
|
||||
start_date_place_stay
|
||||
start_date_residence
|
||||
took_break
|
||||
type_place_stay</note>
|
||||
<width>163</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>age</name>
|
||||
<rename>age</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_place</name>
|
||||
<rename>birth_place</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_service</name>
|
||||
<rename>contract_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deferment_liberation</name>
|
||||
<rename>deferment_liberation</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability_group</name>
|
||||
<rename>disability_group</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>driver_license</name>
|
||||
<rename>driver_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>education</name>
|
||||
<rename>education</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>employment</name>
|
||||
<rename>employment</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_name</name>
|
||||
<rename>first_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>gender</name>
|
||||
<rename>gender</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_registered</name>
|
||||
<rename>is_registered</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_wanted</name>
|
||||
<rename>is_wanted</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_name</name>
|
||||
<rename>last_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marital_status</name>
|
||||
<rename>marital_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>middle_name</name>
|
||||
<rename>middle_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization</name>
|
||||
<rename>mobilization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children</name>
|
||||
<rename>number_children</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children_18_old</name>
|
||||
<rename>number_children_18_old</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_number</name>
|
||||
<rename>passport_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_series</name>
|
||||
<rename>passport_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>phone</name>
|
||||
<rename>phone</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reason_registration</name>
|
||||
<rename>reason_registration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sports_category</name>
|
||||
<rename>sports_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>tractor_license</name>
|
||||
<rename>tractor_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>update_date</name>
|
||||
<rename>update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>urgent_service</name>
|
||||
<rename>urgent_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4</name>
|
||||
<type>SelectValues</type>
|
||||
|
|
@ -82,23 +314,299 @@
|
|||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH extracted_children AS (
|
||||
<sql>WITH
|
||||
base_recruit_data AS (
|
||||
SELECT
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
|
||||
ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
|
||||
r.birth_date,
|
||||
EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
|
||||
r.birth_place,
|
||||
r.phone,
|
||||
r.email,
|
||||
ri.recruit_id,
|
||||
ri.info,
|
||||
r.vu_current_info,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
|
||||
r.system_update_date AS update_date,
|
||||
CASE
|
||||
WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
|
||||
ELSE 'NOTCONVICT'
|
||||
END AS convicts,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
CASE
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
|
||||
WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
|
||||
)
|
||||
ELSE
|
||||
false
|
||||
END AS uchet_pnd,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false THEN ddd.hidden
|
||||
ELSE true
|
||||
END AS deferment_liberation, -- когда фолс отсрочка есть, когда тру или нулл - нет
|
||||
|
||||
CASE
|
||||
WHEN
|
||||
-- Условия для "true" (спортивная категория)
|
||||
ri.info->'svedFL'->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Проверяем, что 'sport' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия актуален
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportZvan' существует и не пусто
|
||||
sport_elem->>'sportZvan' IS NOT NULL
|
||||
AND sport_elem->>'sportZvan' <> ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
-- Условия для "false" (не является спортивной категорией)
|
||||
(
|
||||
ri.info->'svedFL'->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
|
||||
OR (
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
)
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем 'sportZvan' и если оно не существует или пусто
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем 'sportRazr' и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
-- И 'sportZvan' также не должно существовать или быть пустым
|
||||
AND (sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = '')
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
-- Условия для "null" (нет информации)
|
||||
ri.info->'svedSport'->>'prOtsSvedSport' = '1'
|
||||
OR ri.info->'svedSport' IS NULL -- Проверяем, что 'svedSport' отсутствует
|
||||
THEN null
|
||||
|
||||
ELSE null -- Неопределенное значение для всех других случаев
|
||||
END AS sports_category,
|
||||
|
||||
mrr.value AS reason_registration,
|
||||
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' IS NOT NULL
|
||||
AND ri.info->'svedFL'->'svedInvalid'->>'prOtsSvedInvalid' IS NULL
|
||||
AND (ri.info->'svedFL'->'sportRazr'->>'dataSnyat' IS NULL
|
||||
OR TO_DATE(ri.info->'svedFL'->'sportRazr'->>'dataSnyat', 'YYYY-MM-DD') <= CURRENT_DATE)
|
||||
THEN ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'
|
||||
WHEN ri.info->'svedFL'->'svedInvalid'->>'prOtsSvedInvalid' = '1' THEN 'Нет информации об инвалидности'
|
||||
ELSE 'Нет информации об инвалидности'
|
||||
END AS disability_group,
|
||||
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'udostTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
THEN true
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'udostTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
THEN false
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'prOtsSvedUTM' = '1' THEN null
|
||||
ELSE null
|
||||
END AS tractor_license,
|
||||
|
||||
CASE
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NULL -- дата прекращения отсутствует
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NOT NULL -- дата прекращения не отсутствует
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' = '1'
|
||||
THEN NULL
|
||||
|
||||
ELSE NULL
|
||||
END AS criminal_prosecution,
|
||||
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN 'Обучается'
|
||||
ELSE NULL
|
||||
END ||
|
||||
CASE
|
||||
WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
|
||||
WHERE trud->>'prAktMestRab' = '1'
|
||||
) THEN
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN ', Работает'
|
||||
ELSE 'Работает'
|
||||
END
|
||||
ELSE NULL
|
||||
END,
|
||||
CASE
|
||||
WHEN
|
||||
info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' -- Отсутствие сведений о вузе
|
||||
AND info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' -- Отсутствие сведений о колледже
|
||||
AND info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' -- Отсутствие сведений о работе
|
||||
THEN 'Нет информации'
|
||||
ELSE 'Нет информации'
|
||||
END
|
||||
) AS employment_status,
|
||||
|
||||
CASE
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
|
||||
)) THEN 'Высшее'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' = '10')
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
)) THEN 'Среднее профессиональное'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9')
|
||||
)) THEN 'Общее'
|
||||
WHEN ((ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
|
||||
ELSE 'Не указано' -- Добавлено условие по умолчанию
|
||||
END AS education,
|
||||
|
||||
(
|
||||
SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
|
||||
) AS number_children
|
||||
|
||||
FROM public.recruits AS r
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
--JOIN public.recruits_history rh on rh.recruit_id=r.id
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id
|
||||
WHERE r.system_update_date >= '${UP_D}'
|
||||
),
|
||||
extracted_children AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
|
||||
FROM base_recruit_data ri
|
||||
WHERE
|
||||
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
),
|
||||
children_birth_dates AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM
|
||||
extracted_children
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM extracted_children
|
||||
),
|
||||
children_count AS (
|
||||
SELECT
|
||||
|
|
@ -111,273 +619,56 @@ children_count AS (
|
|||
GROUP BY
|
||||
recruit_id
|
||||
),
|
||||
registration_reasons AS (
|
||||
SELECT mrr.name AS reason_registration,
|
||||
r.id AS recruit_id
|
||||
FROM public.recruits AS r
|
||||
JOIN public.military_registration_reason AS mrr
|
||||
ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
),
|
||||
|
||||
driver_license AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
COALESCE(
|
||||
string_agg(sved_vodit->>'kategoriya', ', '),
|
||||
string_agg(sved_vodit->>'naimKatTS', ', '),
|
||||
'Нет информации'
|
||||
) AS driver_license
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
FROM base_recruit_data ri
|
||||
LEFT JOIN LATERAL
|
||||
jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
|
||||
ON true
|
||||
GROUP BY ri.recruit_id
|
||||
),
|
||||
|
||||
sports_category AS ( -- проверка на наличие спортивного разряда или звания
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN
|
||||
-- Условия для "true" (спортивная категория)
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Проверяем, что 'sport' это массив
|
||||
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия актуален
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportZvan' существует и не пусто
|
||||
sport_elem->>'sportZvan' IS NOT NULL
|
||||
AND sport_elem->>'sportZvan' <> ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
-- Условия для "false" (не является спортивной категорией)
|
||||
(
|
||||
ri.info->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
|
||||
OR (
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
)
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем 'sportZvan' и если оно не существует или пусто
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем 'sportRazr' и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
-- И 'sportZvan' также не должно существовать или быть пустым
|
||||
AND (sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = '')
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
-- Условия для "null" (нет информации)
|
||||
ri.info->'svedSport'->>'prOtsSvedSport' = '1'
|
||||
OR ri.info->'svedSport' IS NULL -- Проверяем, что 'svedSport' отсутствует
|
||||
THEN null
|
||||
|
||||
ELSE null -- Неопределенное значение для всех других случаев
|
||||
END AS sports_category
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
disability_group AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN ri.info->'svedInvalid'->'invalid'->>'gruppa' IS NOT NULL
|
||||
AND ri.info->'svedInvalid'->>'prOtsSvedInvalid' IS NULL
|
||||
AND (ri.info->'sportRazr'->>'dataSnyat' IS NULL
|
||||
OR TO_DATE(ri.info->'sportRazr'->>'dataSnyat', 'YYYY-MM-DD') <= CURRENT_DATE)
|
||||
THEN ri.info->'svedInvalid'->'invalid'->>'gruppa'
|
||||
WHEN ri.info->'svedInvalid'->>'prOtsSvedInvalid' = '1' THEN 'Нет информации об инвалидности'
|
||||
ELSE 'Нет информации об инвалидности'
|
||||
END AS disability_group
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
tractor_license AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
THEN true
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
THEN false
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'prOtsSvedUTM' = '1' THEN null
|
||||
ELSE null
|
||||
END AS tractor_license
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
is_wanted AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NULL -- дата прекращения отсутствует
|
||||
)
|
||||
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NOT NULL -- дата прекращения не отсутствует
|
||||
)
|
||||
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' = '1'
|
||||
THEN NULL
|
||||
|
||||
ELSE NULL
|
||||
END AS criminal_prosecution
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
employment AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN 'Обучается'
|
||||
ELSE NULL
|
||||
END ||
|
||||
CASE
|
||||
WHEN jsonb_typeof(info->'svedTrud'->'trudDeyat') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedTrud'->'trudDeyat') AS trud
|
||||
WHERE trud->>'prAktMestRab' = '1'
|
||||
) THEN
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN ', Работает'
|
||||
ELSE 'Работает'
|
||||
END
|
||||
ELSE NULL
|
||||
END,
|
||||
CASE
|
||||
WHEN
|
||||
info->'svedVUZ'->>'prOtsSvedVUZ' = '1' -- Отсутствие сведений о вузе
|
||||
AND info->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' -- Отсутствие сведений о колледже
|
||||
AND info->'svedTrud'->>'prOtsSvedTrud' = '1' -- Отсутствие сведений о работе
|
||||
THEN 'Нет информации'
|
||||
ELSE 'Нет информации'
|
||||
END
|
||||
) AS employment_status
|
||||
FROM public.recruits_info ri
|
||||
)
|
||||
|
||||
SELECT
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
r.gender,
|
||||
r.snils,
|
||||
r.inn,
|
||||
r.birth_date,
|
||||
EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
|
||||
r.age,
|
||||
r.birth_place,
|
||||
r.phone,
|
||||
r.conscription AS deferment_liberation,
|
||||
|
||||
r.email,
|
||||
r.deferment_liberation,
|
||||
CASE
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 70 AND r.gender = 'MALE' AND
|
||||
(r.conscription IS NULL OR r.conscription = false) AND
|
||||
COALESCE(cc.children_under_16, 0) < 5
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
OR
|
||||
(EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 45 AND r.gender = 'FEMALE' AND
|
||||
(r.conscription IS NULL OR r.conscription = false) AND
|
||||
COALESCE(cc.children_under_16, 0) < 5
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 30 AND 50 AND r.gender = 'MALE') -- мужчины от 30 до 50 лет
|
||||
OR (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 30 AND 45 AND r.gender = 'FEMALE') -- женщины от 30 до 45 лет
|
||||
AND COALESCE(cc.children_under_16, 0) < 5
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS mobilization,
|
||||
|
||||
CASE
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
|
||||
AND gender = 'MALE' -- мужчины от 18 до 30 лет
|
||||
AND (conscription IS NULL OR conscription = false)
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
CASE
|
||||
WHEN EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 30
|
||||
AND r.gender = 'MALE'
|
||||
AND r.deferment_liberation IS true -- нет отсрочки и нет освобождения от службы
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS urgent_service,
|
||||
|
||||
CASE WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
|
||||
AND gender = 'MALE' -- мужчины от 18 до 50 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' -- признак отсутствия данных о судимости
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
CASE
|
||||
WHEN EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 50
|
||||
AND r.gender = 'MALE'
|
||||
AND (r.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
|
||||
OR uchet_pnd IS false)
|
||||
AND r.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS contract_service,
|
||||
|
|
@ -388,98 +679,34 @@ SELECT
|
|||
ELSE 'Нет информации'
|
||||
END AS is_registered,
|
||||
|
||||
CASE
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
|
||||
)) THEN 'Высшее'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' = '10')
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
)) THEN 'Среднее профессиональное'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9')
|
||||
)) THEN 'Общее'
|
||||
WHEN ((ri.info->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
|
||||
ELSE 'Не указано' -- Добавлено условие по умолчанию
|
||||
END AS education,
|
||||
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
|
||||
r.education,
|
||||
r.marital_status,
|
||||
r.number_children,
|
||||
|
||||
(SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
|
||||
) AS number_children,
|
||||
|
||||
(SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
FROM jsonb_array_elements(r.info->'svedFL'->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(r.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) >= make_interval(years => 18)
|
||||
) AS number_children_18_old,
|
||||
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedVoin'->'voin'->>'dataReg' AS issue_date,
|
||||
ri.recruit_id, -- ID рекрута
|
||||
r.target_recruitment_id AS recruitment_id,
|
||||
rr.reason_registration, -- причина постановки на учет char
|
||||
sc.sports_category, -- наличие спортивной категории bool
|
||||
r.passport_number,
|
||||
r.passport_series,
|
||||
r.issue_date,
|
||||
r.recruit_id, -- ID рекрута
|
||||
r.recruitment_id,
|
||||
r.reason_registration, -- причина постановки на учет char
|
||||
r.sports_category, -- наличие спортивной категории bool
|
||||
dl.driver_license, -- категории водительских удостоверений char
|
||||
dg.disability_group, -- группа инвалидности char
|
||||
tl.tractor_license, -- наличие удостоверения тракториста bool
|
||||
iw.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
|
||||
em.employment_status AS employment -- занятость char
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
JOIN
|
||||
public.recruits r ON ri.recruit_id = r.id
|
||||
LEFT JOIN
|
||||
children_count cc ON r.id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN
|
||||
registration_reasons rr ON rr.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
sports_category sc ON sc.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
driver_license dl ON dl.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
disability_group dg ON dg.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
tractor_license tl ON tl.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
is_wanted iw ON iw.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
employment em ON em.recruit_id = ri.recruit_id
|
||||
WHERE
|
||||
r.target_recruitment_id IS NOT NULL
|
||||
AND r.current_recruitment_id IS NOT NULL;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
r.disability_group, -- группа инвалидности char
|
||||
r.tractor_license, -- наличие удостоверения тракториста bool
|
||||
r.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
|
||||
r.employment_status AS employment, -- занятость char
|
||||
r.update_date
|
||||
FROM base_recruit_data r
|
||||
LEFT JOIN children_count cc ON r.recruit_id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN driver_license dl ON dl.recruit_id = r.recruit_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
|
|
@ -516,8 +743,8 @@ WHERE
|
|||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
<xloc>656</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
76
mappings/info_recruits/job_last_update_date.hwf
Normal file
76
mappings/info_recruits/job_last_update_date.hwf
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workflow>
|
||||
<name>job_last_update_date</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/10 15:06:41.340</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/10 15:06:41.340</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>480</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Pipeline</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>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>848</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>SQL</name>
|
||||
<description/>
|
||||
<type>SQL</type>
|
||||
<attributes/>
|
||||
<sendOneStatement>N</sendOneStatement>
|
||||
<sqlfromfile>N</sqlfromfile>
|
||||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>656</xloc>
|
||||
<yloc>224</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<attributes/>
|
||||
</workflow>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>medical_authorities</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,132 @@
|
|||
<hop>
|
||||
<from>Table input hiv</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input hiv</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>hiv</name>
|
||||
<rename>hiv</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>change_date</name>
|
||||
<rename>change_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,29 +161,28 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'dataPostUchet' start_date,
|
||||
u->>'dataSnyatUchet' close_date,
|
||||
u->>'dataPlan' change_date
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join uchet on r.id = uchet.recruit_id
|
||||
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>352</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -82,29 +197,27 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedUchetVICH'->'uchetVICH') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join uchet on r.id = uchet.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -118,31 +231,27 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>80</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -156,31 +265,27 @@ join uchet on r.id = uchet.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>medical_authorities</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>352</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>432</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>opekun</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,63 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_guardianship</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>snils</name>
|
||||
<rename>snils</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>560</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,11 +92,14 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with person as
|
||||
(select jsonb_array_elements(ri.info->'svedOpekun'->'svedSoczPod') ch,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedOpekun'->'svedSoczPod') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
concat_ws(' ', ch->'fioOpek'->>'familiya',
|
||||
|
|
@ -52,21 +107,15 @@ select
|
|||
ch->'fioOpek'->>'otchestvo') full_name,
|
||||
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
ch->>'snils' snils
|
||||
from public.recruits r
|
||||
join person on r.id = person.recruit_id</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>288</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -80,31 +129,27 @@ join person on r.id = person.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_guardianship</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_guardianship</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>496</xloc>
|
||||
<yloc>112</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>passport</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,172 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_number</field>
|
||||
<name>passport_number</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_series</field>
|
||||
<name>passport_series</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>actual</name>
|
||||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_name</name>
|
||||
<rename>organization_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_number</name>
|
||||
<rename>passport_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_series</name>
|
||||
<rename>passport_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>unit_code</name>
|
||||
<rename>unit_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_number</field>
|
||||
<name>passport_number</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>passport_series</field>
|
||||
<name>passport_series</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>actual</name>
|
||||
<rename>actual</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>organization_name</name>
|
||||
<rename>organization_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_number</name>
|
||||
<rename>passport_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_series</name>
|
||||
<rename>passport_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>unit_code</name>
|
||||
<rename>unit_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>752</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -45,29 +201,31 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' passport_number,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' passport_series,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'vydDok' organization_name,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'kodVydDok' unit_code,
|
||||
to_date(ri.info->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') issue_date,
|
||||
case when ri.info->'pasportRF'->'aktPasportRF'->>'kodStatus'='1' then true
|
||||
else false
|
||||
end actual
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.id AS recruit_id,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
|
||||
TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
|
||||
THEN TRUE ELSE FALSE
|
||||
END AS actual
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>416</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -82,6 +240,8 @@ where ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' is not null;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series,
|
||||
|
|
@ -94,17 +254,11 @@ end actual
|
|||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>416</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -118,31 +272,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>736</xloc>
|
||||
<yloc>144</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -156,31 +306,27 @@ where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>passport</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>736</xloc>
|
||||
<yloc>704</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>property</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,36 +16,54 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<from>Table input realty</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<from>Table input ground_transportation</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2 2</from>
|
||||
<from>Table input water_vehicles</from>
|
||||
<to>Table output 2 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input air_vehicles</from>
|
||||
<to>Table output 2 2 2</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input realty</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2 2 2</from>
|
||||
<to>Table output 2 2 2</to>
|
||||
<from>Table input air_vehicles</from>
|
||||
<to>Insert / update 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input ground_transportation</from>
|
||||
<to>Insert / update 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input water_vehicles</from>
|
||||
<to>Insert / update 3</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
|
|
@ -54,36 +72,288 @@
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedON'->'on') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedON'->'on') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVidPrav' kind_right,
|
||||
u->'adrObSob'->>'adrObSobTekst' address,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'realty' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>address</name>
|
||||
<rename>address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kind_right</name>
|
||||
<rename>kind_right</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_property</name>
|
||||
<rename>type_property</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<xloc>720</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<name>Insert / update 2</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_property</name>
|
||||
<rename>type_property</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_category</name>
|
||||
<rename>vehicle_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_type</name>
|
||||
<rename>vehicle_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 3</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_property</name>
|
||||
<rename>type_property</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_category</name>
|
||||
<rename>vehicle_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_type</name>
|
||||
<rename>vehicle_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1200</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update 4</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>type_property</field>
|
||||
<name>type_property</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>start_date</field>
|
||||
<name>start_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type_property</name>
|
||||
<rename>type_property</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>brand_model</name>
|
||||
<rename>brand_model</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_year</name>
|
||||
<rename>issue_year</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reg_plate</name>
|
||||
<rename>reg_plate</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vehicle_type</name>
|
||||
<rename>vehicle_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>vin</name>
|
||||
<rename>vin</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1200</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input air_vehicles</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -94,11 +364,55 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedNazTS'->'nazTS') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVozTS'->'vozTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedNazTS'->'nazTS') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVozTS'->'vozTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVid' vehicle_type,
|
||||
u->>'naznKat' vehicle_category,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'air_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input ground_transportation</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedNazTS'->'nazTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedNazTS'->'nazTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'vidTS' vehicle_type,
|
||||
|
|
@ -110,22 +424,17 @@ select
|
|||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'ground_transportation' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join prop on r.id = prop.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>928</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2 2</name>
|
||||
<name>Table input realty</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -136,35 +445,35 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedON'->'on') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedON'->'on') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVid' vehicle_type,
|
||||
u->>'naznKat' vehicle_category,
|
||||
u->>'naimVidPrav' kind_right,
|
||||
u->'adrObSob'->>'adrObSobTekst' address,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'air_vehicles' type_property
|
||||
'realty' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join prop on r.id = prop.recruit_id
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>384</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2 2 2</name>
|
||||
<name>Table input water_vehicles</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
|
|
@ -175,31 +484,32 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedVozTS'->'vozTS') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVodTS'->'vodTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedVozTS'->'vozTS') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVodTS'->'vodTS') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVid' vehicle_type,
|
||||
u->>'naznKat' vehicle_category,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'air_vehicles' type_property
|
||||
'water_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join prop on r.id = prop.recruit_id
|
||||
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>464</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>928</xloc>
|
||||
<yloc>432</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -213,31 +523,27 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<yloc>80</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -251,31 +557,27 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>1136</xloc>
|
||||
<yloc>96</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -289,31 +591,27 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>384</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>1152</xloc>
|
||||
<yloc>576</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -327,31 +625,27 @@ join prop on r.id = prop.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>property</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>464</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>672</xloc>
|
||||
<yloc>576</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>prosecution</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,83 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>create_date</field>
|
||||
<name>create_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>prosecution</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>authority_name</name>
|
||||
<rename>authority_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>close_date</name>
|
||||
<rename>close_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>create_date</name>
|
||||
<rename>create_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kind</name>
|
||||
<rename>kind</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>law_point</name>
|
||||
<rename>law_point</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>termination_basis</name>
|
||||
<rename>termination_basis</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,32 +112,34 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<sql>with ugol as
|
||||
(select jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'vidPreslNaim' kind,
|
||||
to_date(u->>'dataSved', 'YYYY-MM-DD') create_date,
|
||||
to_date(u->>'dataPrekrashh', 'YYYY-MM-DD') close_date,
|
||||
u->>'naimOrgan' authority_name,
|
||||
u->>'ugolovZakon' law_point,
|
||||
u->>'osnovPrekrashh' termination_basis
|
||||
from public.recruits r
|
||||
join ugol on r.id = ugol.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ugol AS (
|
||||
SELECT
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS u,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
u->'sledSud'->>'naimSud' AS kind,
|
||||
TO_DATE(u->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
||||
TO_DATE(u->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS close_date,
|
||||
u->'sledSud'->>'naimOrgan' AS authority_name,
|
||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
||||
u->'sledSud'->'svedSnyat'->>'osnSnyatSud' AS termination_basis
|
||||
FROM public.recruits r
|
||||
JOIN ugol ON r.id = ugol.recruit_id
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(u->'sledSud'->'statiUK') AS law(f) ON true
|
||||
GROUP BY r.id, kind, create_date, close_date, authority_name, termination_basis</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -79,31 +153,27 @@ join ugol on r.id = ugol.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>prosecution</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>prosecution</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>752</xloc>
|
||||
<yloc>144</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>punishment</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,103 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>punishment</table>
|
||||
<value>
|
||||
<name>authority_name</name>
|
||||
<rename>authority_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>law_point</name>
|
||||
<rename>law_point</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>punishment_code</name>
|
||||
<rename>punishment_code</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>punishment_type</name>
|
||||
<rename>punishment_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>release_date</name>
|
||||
<rename>release_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>release_reason</name>
|
||||
<rename>release_reason</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sentence</name>
|
||||
<rename>sentence</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sentence_changed</name>
|
||||
<rename>sentence_changed</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sentence_place</name>
|
||||
<rename>sentence_place</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sentense_date</name>
|
||||
<rename>sentense_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>start_date</name>
|
||||
<rename>start_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>784</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,11 +132,16 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with ugol as
|
||||
(select jsonb_array_elements(ri.info->'svedSudim'->'sudim'->'osuzhdenie') u,
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedSudim'->'sudim'->'osuzhdenie') = 'array')
|
||||
join public.recruits r ON r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') = 'array'
|
||||
AND r.system_update_date >= '${UP_D}'
|
||||
)
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimSuda' authority_name,
|
||||
|
|
@ -59,18 +156,12 @@ select
|
|||
u->>'ugolovZakon' law_point,
|
||||
u->>'osnovOsvobozhd' release_reason
|
||||
from public.recruits r
|
||||
join ugol on r.id = ugol.recruit_id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
join ugol on r.id = ugol.recruit_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -84,31 +175,27 @@ join ugol on r.id = ugol.recruit_id;</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>punishment</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>punishment</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>752</xloc>
|
||||
<yloc>176</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
100
mappings/info_recruits/select_delta_time.hpl
Normal file
100
mappings/info_recruits/select_delta_time.hpl
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>select_delta_time</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/10 14:32:39.906</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/10 14:32:39.906</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select max(update_date) AS UPDATE_DATE
|
||||
from ervu_dashboard.citizen</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<lookup>
|
||||
<schema/>
|
||||
<table>lookup table</table>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
100
mappings/info_recruits/select_delta_time_subpoena.hpl
Normal file
100
mappings/info_recruits/select_delta_time_subpoena.hpl
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>select_delta_time_subpoena</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2025/01/10 14:32:39.906</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/01/10 14:32:39.906</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Copy rows to result</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Copy rows to result</name>
|
||||
<type>RowsToResult</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<lookup>
|
||||
<schema/>
|
||||
<table>lookup table</table>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>768</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select max(status_change_date) AS STATUS_CHANGE_DATE
|
||||
from ervu_dashboard.subpoena</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>464</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>spouse</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,14 +23,108 @@
|
|||
<hop>
|
||||
<from>Select values</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>full_name</field>
|
||||
<name>full_name</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_spouse</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_az_number</name>
|
||||
<rename>death_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_date</name>
|
||||
<rename>death_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>divorce_az_number</name>
|
||||
<rename>divorce_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>divorce_date</name>
|
||||
<rename>divorce_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>information_excluded</name>
|
||||
<rename>information_excluded</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kinship_type</name>
|
||||
<rename>kinship_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marriage_az_number</name>
|
||||
<rename>marriage_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marriage_date</name>
|
||||
<rename>marriage_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values</name>
|
||||
<type>SelectValues</type>
|
||||
|
|
@ -82,11 +174,9 @@
|
|||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -101,48 +191,56 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<sql>with suprug as
|
||||
(select jsonb_array_elements(ri.info->'svedSemPolozh'->'suprugi') supr,
|
||||
ri.info->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' marriage_az_number,
|
||||
ri.info->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' marriage_date,
|
||||
ri.info->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' divorce_az_number,
|
||||
ri.info->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' divorce_date,
|
||||
case when (ri.info->'svedSemPolozh'->>'svedSuprIskl' = '1') then true
|
||||
else false
|
||||
end information_excluded,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri)
|
||||
select
|
||||
r.id recruit_id,
|
||||
supr->>'rodstvSvyazSuprugNaim' kinship_type,
|
||||
concat_ws(' ', supr->'svedFLBS'->'fio'->>'familiya',
|
||||
supr->'svedFLBS'->'fio'->>'imya',
|
||||
supr->'svedFLBS'->'fio'->>'otchestvo') full_name,
|
||||
make_date(NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
make_date(NULLIF(supr->'svedSmert'->>'god', '')::int,
|
||||
NULLIF(supr->'svedSmert'->>'mesyacz','')::int,
|
||||
NULLIF(supr->'svedSmert'->>'den','')::int) death_date,
|
||||
supr->'svedSmert'->>'nomerZapis' death_az_number,
|
||||
marriage_az_number,
|
||||
marriage_date,
|
||||
divorce_az_number,
|
||||
divorce_date,
|
||||
information_excluded
|
||||
from public.recruits r
|
||||
join suprug on r.id = suprug.recruit_id</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
<limit>0</limit>
|
||||
<sql>WITH suprug AS (
|
||||
SELECT
|
||||
supr.supri AS supr,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
|
||||
CASE
|
||||
WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
|
||||
ELSE false
|
||||
END AS information_excluded,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
|
||||
JOIN LATERAL (
|
||||
SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
||||
) AS supr ON true
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
|
||||
CONCAT_WS(' ',
|
||||
supr->'svedFLBS'->'fio'->>'familiya',
|
||||
supr->'svedFLBS'->'fio'->>'imya',
|
||||
supr->'svedFLBS'->'fio'->>'otchestvo'
|
||||
) AS full_name,
|
||||
MAKE_DATE(
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
|
||||
) AS birth_date,
|
||||
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
||||
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||
marriage_az_number,
|
||||
marriage_date,
|
||||
divorce_az_number,
|
||||
divorce_date,
|
||||
information_excluded
|
||||
FROM public.recruits r
|
||||
JOIN suprug ON r.id = suprug.recruit_id
|
||||
|
||||
</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>192</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -156,31 +254,27 @@ join suprug on r.id = suprug.recruit_id</sql>
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_spouse</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_spouse</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>688</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>subpoena</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,168 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>subpoena_id</field>
|
||||
<name>subpoena_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>status_change_date</field>
|
||||
<name>status_change_date</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>subpoena</table>
|
||||
<value>
|
||||
<name>subpoena_id</name>
|
||||
<rename>subpoena_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status_change_date</name>
|
||||
<rename>status_change_date</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>act_number</name>
|
||||
<rename>act_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>address</name>
|
||||
<rename>address</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appearance</name>
|
||||
<rename>appearance</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>appearance_status</name>
|
||||
<rename>appearance_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>create_date</name>
|
||||
<rename>create_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>delivery_date</name>
|
||||
<rename>delivery_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>delivery_fio</name>
|
||||
<rename>delivery_fio</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>delivery_status</name>
|
||||
<rename>delivery_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>department_id</name>
|
||||
<rename>department_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>fio_commiss</name>
|
||||
<rename>fio_commiss</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>method_delivery</name>
|
||||
<rename>method_delivery</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>method_sending</name>
|
||||
<rename>method_sending</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number</name>
|
||||
<rename>number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_name</name>
|
||||
<rename>recruitment_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>send_date</name>
|
||||
<rename>send_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>series</name>
|
||||
<rename>series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sig_info</name>
|
||||
<rename>sig_info</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>subpoena_reason</name>
|
||||
<rename>subpoena_reason</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>subpoena_status</name>
|
||||
<rename>subpoena_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>track_number</name>
|
||||
<rename>track_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>visit_date</name>
|
||||
<rename>visit_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>1008</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,8 +197,11 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
s.id AS subpoena_id, -- идентификатор повестки
|
||||
s.status_change_date,
|
||||
s.recruit_id, -- идентификатор рекрута
|
||||
s.department_id, -- идентификатор ВК
|
||||
s.series, -- серия повестки
|
||||
|
|
@ -98,18 +258,13 @@ LEFT JOIN public.send_dictionary AS sd
|
|||
LEFT JOIN public.subpoena_status AS ss
|
||||
ON ss.id = s.status_id
|
||||
LEFT JOIN public.subpoena_appearance AS sa
|
||||
ON sa.subpoena_id = s.id;</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
ON sa.subpoena_id = s.id
|
||||
WHERE s.status_change_date >= '${ST_CH_D}';</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>688</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -123,31 +278,27 @@ LEFT JOIN public.subpoena_appearance AS sa
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>subpoena</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>subpoena</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>1056</xloc>
|
||||
<yloc>688</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>temporary_measure</name>
|
||||
|
|
@ -6,7 +7,6 @@
|
|||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<directory>/</directory>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
<key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
|
||||
<is_key_private>N</is_key_private>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
@ -25,9 +23,108 @@
|
|||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>subpoena_id</field>
|
||||
<name>subpoena_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>temporary_measures</table>
|
||||
<value>
|
||||
<name>applied_fact</name>
|
||||
<rename>applied_fact</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>cancel_date</name>
|
||||
<rename>cancel_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_date_cancel</name>
|
||||
<rename>decision_date_cancel</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_date_create</name>
|
||||
<rename>decision_date_create</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_number_cancel</name>
|
||||
<rename>decision_number_cancel</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>decision_number_create</name>
|
||||
<rename>decision_number_create</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_name</name>
|
||||
<rename>recruitment_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>restriction_name</name>
|
||||
<rename>restriction_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>status_measure</name>
|
||||
<rename>status_measure</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>subpoena_id</name>
|
||||
<rename>subpoena_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>type</name>
|
||||
<rename>type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input</name>
|
||||
<type>TableInput</type>
|
||||
|
|
@ -40,6 +137,8 @@
|
|||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
rd.subpoena_id,
|
||||
rd.vk_id AS recruitment_id,
|
||||
|
|
@ -81,18 +180,13 @@ LEFT JOIN public.restriction AS rn
|
|||
LEFT JOIN public.restriction_document_status AS rds
|
||||
ON rds.code = rd.status
|
||||
LEFT JOIN public.subpoena AS s
|
||||
ON s.id = rd.subpoena_id</sql>
|
||||
<limit>0</limit>
|
||||
<lookup/>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<variables_active>N</variables_active>
|
||||
<lazy_conversion_active>N</lazy_conversion_active>
|
||||
ON s.id = rd.subpoena_id
|
||||
WHERE s.status_change_date >= '${ST_CH_D}'</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
|
|
@ -106,31 +200,27 @@ LEFT JOIN public.subpoena AS s
|
|||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>temporary_measures</table>
|
||||
<commit>1000</commit>
|
||||
<truncate>N</truncate>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<use_batch>Y</use_batch>
|
||||
<specify_fields>N</specify_fields>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_field/>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<return_keys>N</return_keys>
|
||||
<return_field/>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>temporary_measures</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<cluster_schema/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
<draw>Y</draw>
|
||||
<xloc>432</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
|
|
|
|||
2
mappings/instruction.txt
Normal file
2
mappings/instruction.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/jobs_once_a_day/job_info_recruits.kjb - запустить при старте 1 раз
|
||||
/info_recruits/job_info_recruits.kjb - подождать час и запускать раз в 10 минут
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<schedulerType>0</schedulerType>
|
||||
<weekDay>1</weekDay>
|
||||
<parallel>N</parallel>
|
||||
<xloc>320</xloc>
|
||||
<xloc>288</xloc>
|
||||
<yloc>240</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1056</xloc>
|
||||
<xloc>1296</xloc>
|
||||
<yloc>240</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>688</xloc>
|
||||
<xloc>512</xloc>
|
||||
<yloc>240</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
@ -74,7 +74,9 @@
|
|||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${Internal.Entry.Current.Folder}/job_recruitments_all.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_recruitments_all</logfile>
|
||||
<loglevel>Minimal</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
|
|
@ -84,7 +86,7 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>848</xloc>
|
||||
<xloc>720</xloc>
|
||||
<yloc>240</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
|
|
@ -108,8 +110,32 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>512</xloc>
|
||||
<yloc>368</yloc>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>240</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_info_recruits.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}/info_recruits/job_info_recruits.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>928</xloc>
|
||||
<yloc>128</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
|
|
@ -118,35 +144,42 @@
|
|||
<from>job_pack.pub_recruitment</from>
|
||||
<to>job_recruitments_all</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_all</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_last_recording_date</to>
|
||||
<to>job_pack.pub_recruitment</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_last_recording_date</from>
|
||||
<to>job_pack.pub_recruitment</to>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_pack.pub_recruitment</to>
|
||||
<from>job_info_recruits.hwf</from>
|
||||
<to>job_last_recording_date</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_all</from>
|
||||
<to>job_info_recruits.hwf</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_all</from>
|
||||
<to>job_last_recording_date</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
<useVariableSubstitution>N</useVariableSubstitution>
|
||||
<parallel>N</parallel>
|
||||
<xloc>240</xloc>
|
||||
<yloc>224</yloc>
|
||||
<yloc>112</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
|
|
@ -104,6 +104,13 @@
|
|||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>pack.pub_recruitment</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
</notepads>
|
||||
|
|
|
|||
|
|
@ -5,12 +5,38 @@
|
|||
<description/>
|
||||
<extended_description/>
|
||||
<workflow_version/>
|
||||
<workflow_status>0</workflow_status>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/21 15:46:54.029</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/21 15:46:54.029</modified_date>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<parameter>
|
||||
<name>MD_ARRAY</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>MD_ID</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>PRNT_ID</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>REC_ID</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>SCM</name>
|
||||
<default_value/>
|
||||
<description/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
<actions>
|
||||
<action>
|
||||
<name>Start</name>
|
||||
|
|
@ -31,7 +57,7 @@
|
|||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitments_region</name>
|
||||
<name>job_recruitments_region.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
|
|
@ -39,10 +65,10 @@
|
|||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${Internal.Entry.Current.Folder}/\region\job_recruitments_region.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<filename>${PROJECT_HOME}/region/job_recruitments_region.hwf</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_recruitments_region</logfile>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
|
|
@ -51,13 +77,13 @@
|
|||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>560</xloc>
|
||||
<yloc>144</yloc>
|
||||
<parallel>Y</parallel>
|
||||
<xloc>704</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitments_country</name>
|
||||
<name>job_recruitments_country.hwf</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<attributes/>
|
||||
|
|
@ -65,10 +91,10 @@
|
|||
<add_time>N</add_time>
|
||||
<create_parent_folder>N</create_parent_folder>
|
||||
<exec_per_row>N</exec_per_row>
|
||||
<filename>${Internal.Entry.Current.Folder}/\country\job_recruitments_country.hwf</filename>
|
||||
<logext/>
|
||||
<logfile/>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<filename>${PROJECT_HOME}/country/job_recruitments_country.hwf</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_recruitments_country</logfile>
|
||||
<loglevel>Basic</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
|
|
@ -78,8 +104,132 @@
|
|||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>560</xloc>
|
||||
<yloc>240</yloc>
|
||||
<xloc>1120</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitments_milcom.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}/mil_com/job_recruitments_milcom.hwf</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_recruitments_milcom</logfile>
|
||||
<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>320</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitments_mildis.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}/mil_district/job_recruitments_mildis.hwf</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_recruitments_mildis</logfile>
|
||||
<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>896</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 2</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1520</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>Success 3</name>
|
||||
<description/>
|
||||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>1072</xloc>
|
||||
<yloc>464</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_ratings.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}/ratings/job_ratings.hwf</filename>
|
||||
<logext>txt</logext>
|
||||
<logfile>${PROJECT_HOME}/log_jobs/log_job_ratings</logfile>
|
||||
<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>896</xloc>
|
||||
<yloc>464</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>add_schema.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}\mil_com\parameters\add_schema.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>528</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
|
|
@ -88,115 +238,151 @@
|
|||
<type>SUCCESS</type>
|
||||
<attributes/>
|
||||
<parallel>N</parallel>
|
||||
<xloc>768</xloc>
|
||||
<yloc>240</yloc>
|
||||
<xloc>1024</xloc>
|
||||
<yloc>192</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitments_mil_com</name>
|
||||
<name>percent_for_waiting_reg.hpl</name>
|
||||
<description/>
|
||||
<type>WORKFLOW</type>
|
||||
<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>${Internal.Entry.Current.Folder}/\mil_com\job_recruitments_mil_com.hwf</filename>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<filename>${PROJECT_HOME}/supportive_jobs/percent_for_waiting_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>560</xloc>
|
||||
<yloc>336</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
<action>
|
||||
<name>job_recruitment_mil_district</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>
|
||||
<loglevel>Nothing</loglevel>
|
||||
<parameters>
|
||||
<pass_all_parameters>Y</pass_all_parameters>
|
||||
</parameters>
|
||||
<params_from_previous>N</params_from_previous>
|
||||
<set_append_logfile>N</set_append_logfile>
|
||||
<set_logfile>N</set_logfile>
|
||||
<wait_until_finished>Y</wait_until_finished>
|
||||
<parallel>N</parallel>
|
||||
<xloc>560</xloc>
|
||||
<yloc>416</yloc>
|
||||
<xloc>1344</xloc>
|
||||
<yloc>352</yloc>
|
||||
<attributes_hac/>
|
||||
</action>
|
||||
</actions>
|
||||
<hops>
|
||||
<hop>
|
||||
<from>job_recruitments_country</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_region</from>
|
||||
<to>Success</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_recruitments_mil_com</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_mil_com</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_recruitment_mil_district</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitment_mil_district</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_recruitments_region</to>
|
||||
<to>job_recruitments_milcom.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Start</from>
|
||||
<to>job_recruitments_country</to>
|
||||
<from>job_recruitments_region.hwf</from>
|
||||
<to>job_recruitments_mildis.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_ratings.hwf</from>
|
||||
<to>Success 3</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_region.hwf</from>
|
||||
<to>job_ratings.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_mildis.hwf</from>
|
||||
<to>job_recruitments_country.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_milcom.hwf</from>
|
||||
<to>add_schema.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>add_schema.hpl</from>
|
||||
<to>job_recruitments_region.hwf</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>add_schema.hpl</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_region.hwf</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_mildis.hwf</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_milcom.hwf</from>
|
||||
<to>Success</to>
|
||||
<enabled>N</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>N</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>job_recruitments_country.hwf</from>
|
||||
<to>percent_for_waiting_reg.hpl</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>N</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>percent_for_waiting_reg.hpl</from>
|
||||
<to>Success 2</to>
|
||||
<enabled>Y</enabled>
|
||||
<evaluation>Y</evaluation>
|
||||
<unconditional>Y</unconditional>
|
||||
</hop>
|
||||
</hops>
|
||||
<notepads>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>26</height>
|
||||
<xloc>416</xloc>
|
||||
<yloc>544</yloc>
|
||||
<note>на шаге загрузки данных по регионам заполняется таблица ervu_dashboard.array_reg, рейтинги обращаются в эту таблицу за массивами</note>
|
||||
<width>766</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<attributes>
|
||||
<group>
|
||||
|
|
|
|||
177
mappings/jobs_once_a_day/child_once.hpl
Normal file
177
mappings/jobs_once_a_day/child_once.hpl
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>child_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_child</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_az_number</name>
|
||||
<rename>birth_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_az_number</name>
|
||||
<rename>death_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_date</name>
|
||||
<rename>death_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kinship_type</name>
|
||||
<rename>kinship_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>624</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with child as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array')
|
||||
select
|
||||
r.id::uuid recruit_id,
|
||||
ch->>'naimRodstvSvyazReb' kinship_type,
|
||||
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
|
||||
ch->'svedFLBS'->'fio'->>'imya',
|
||||
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
|
||||
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
|
||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
|
||||
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
|
||||
ch->'svedSmert'->>'nomerZapis' death_az_number,
|
||||
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
|
||||
from public.recruits r
|
||||
join child on r.id = child.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>400</xloc>
|
||||
<yloc>256</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_child</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>608</xloc>
|
||||
<yloc>400</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_appealing_violations_fz53_once</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/02/14 11:29:46.684</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:29:46.684</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/citizen_complex_filters_once.hpl
Normal file
27
mappings/jobs_once_a_day/citizen_complex_filters_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_complex_filters_once</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/02/14 12:08:11.450</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 12:08:11.450</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_liability_fz53_once</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/02/14 11:26:43.276</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:26:43.276</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/citizen_criminal_record_once.hpl
Normal file
27
mappings/jobs_once_a_day/citizen_criminal_record_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_criminal_record_once</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/02/14 11:23:58.362</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:23:58.362</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_education_diplomas_received_once</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/02/14 11:15:24.095</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:15:24.095</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with vuz as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVUZ'->'vuz') as vuz,
|
||||
ri.recruit_id recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVUZ'->'vuz') = 'array' limit 2)
|
||||
select
|
||||
r.id recruit_id,
|
||||
--vuz->'svedOrg'->>'kodTipOrg',
|
||||
vuz->'svedOrg'->>'naimTipOrg' as type_organization,
|
||||
vuz->'svedOrg'->>'naimOrg' as name_edu_organization,
|
||||
vuz->'svedOrg'->>'inn' as inn,
|
||||
vuz->'svedOrg'->>'kpp' as kpp,
|
||||
coalesce (vuz->'svedOrg'->>'ogrn', vuz->'svedOrg'->>'ogrnip') as ogrn,
|
||||
vuz->'svedOrg'->>'adresOrg' as address_edu_organization,
|
||||
|
||||
vuz->>'naimStatus' as student_status,
|
||||
vuz->>'naimUrovObr' as education_level_org,
|
||||
vuz->>'nomerKursa' as course_training,
|
||||
vuz->>'dataZachisl' as receipt_date,
|
||||
--vuz->>'prPervObuch' ,
|
||||
vuz->>'nomPrikazZachisl' as order_number,
|
||||
vuz->>'dataPrikazZachisl' as order_date,
|
||||
--vuz->'svedObrProg'->>'prVUSpecz',
|
||||
--vuz->'svedObrProg'->>'dataNachObuch',
|
||||
--vuz->'svedObrProg'->>'kodFormaObuch',
|
||||
--vuz->'svedObrProg'->>'naimFormaObuch',
|
||||
--vuz->'svedObrProg'->>'planDataOkonch',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'kodSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinobr'->>'naimSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinprosv'->>'kodSpecz',
|
||||
--vuz->'svedObrProg'->'svedSpeczMinprosv'->>'naimSpecz',
|
||||
|
||||
vuz->'svedVosst'->>'dataVosst' as restore_date,
|
||||
vuz->'svedVosst'->>'nomPrikazVosst' as order_number_restore,
|
||||
vuz->'svedVosst'->>'dataPrikazVosst' as order_date_restore
|
||||
from public.recruits r
|
||||
join vuz on r.id = vuz.recruit_id
|
||||
</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>496</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_education_diplomas_received</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>832</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
171
mappings/jobs_once_a_day/citizen_foreign_once.hpl
Normal file
171
mappings/jobs_once_a_day/citizen_foreign_once.hpl
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_foreign_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with citizen as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedIG') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedIG') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
cit->'oksm'->>'naimOKSM' country_name,
|
||||
cit->>'osnovPriobrIG' citizenship_basis,
|
||||
to_date(cit->>'dataPriobrIG', 'YYYY-MM-DD') citizenship_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with citizen as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedIGPP'->'svedPP') cit,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedIGPP'->'svedPP') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
cit->'oksm'->>'naimOKSM' country_name,
|
||||
cit->>'osnovPriobrPP' residense_right_basis,
|
||||
to_date(cit->>'dataPriobrPP', 'YYYY-MM-DD') residense_right_date
|
||||
from public.recruits r
|
||||
join citizen on r.id = citizen.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship_foreign</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_individual_decisions_once</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/02/14 12:09:58.568</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 12:09:58.568</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/citizen_information_search_once.hpl
Normal file
27
mappings/jobs_once_a_day/citizen_information_search_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_information_search_once</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/02/14 11:25:30.220</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:25:30.220</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/citizen_sports_categories_once.hpl
Normal file
27
mappings/jobs_once_a_day/citizen_sports_categories_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_sports_categories_once</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/02/14 11:19:01.880</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:19:01.880</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/citizen_work_activity_once.hpl
Normal file
27
mappings/jobs_once_a_day/citizen_work_activity_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizen_work_activity_once</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/02/14 11:02:25.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 11:02:25.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
100
mappings/jobs_once_a_day/citizenship_once.hpl
Normal file
100
mappings/jobs_once_a_day/citizenship_once.hpl
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>citizenship_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnPriob' acquiring_basis,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' acquiring_number,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshPriob', 'YYYY-MM-DD') acquiring_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshPriob' acquiring_authority,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' renunciation_basis,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshVyh' renunciation_number,
|
||||
to_date(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'dataReshVyh', 'YYYY-MM-DD') renunciation_date,
|
||||
ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'organReshVyh' renunciation_authority
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedFL'->'svedGrazhdanRF'->>'prOtsGrazhdanRF' is null and
|
||||
(ri.info->'svedFL'->'svedGrazhdanRF'->'grazhdanRF'->>'nomReshPriob' is not null or ri.info->'svedGrazhdanRF'->'grazhdanRF'->>'osnVyh' is not null)</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizenship</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
215
mappings/jobs_once_a_day/deputy_once.hpl
Normal file
215
mappings/jobs_once_a_day/deputy_once.hpl
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>deputy_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>deputy</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>end_date</name>
|
||||
<rename>end_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>information</name>
|
||||
<rename>information</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>period_office</name>
|
||||
<rename>period_office</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>720</xloc>
|
||||
<yloc>160</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'srokiPolnomochii' period_office,
|
||||
to_date(ri.info->'svedFL'->'svedDeputat'->'deputat'->>'dataDosrochPrekr', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' information
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedFL'->'svedDeputat'->'deputat'->>'svedIzbrDeputatom' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
to_date(ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'dataSnyatKandidat', 'YYYY-MM-DD') end_date,
|
||||
ri.info->'svedFL'->'svedKandidat'->'kandidat'->>'svedRegKandidata' information,
|
||||
false deputy
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'svedFL'->'svedKandidat'->>'kandidat' is not null</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>432</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>224</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>deputy</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>800</xloc>
|
||||
<yloc>320</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
170
mappings/jobs_once_a_day/disability_once.hpl
Normal file
170
mappings/jobs_once_a_day/disability_once.hpl
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disability_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
case when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='1' then 'I группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='2' then 'II группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='3' then 'III группа'
|
||||
when ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'='4' then 'ребенок-инвалид'
|
||||
end disability_group,
|
||||
ri.info->'svedFL'->'svedInvalid'->'invalid'->>'ustanOrg' organization_name,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataUstan', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedInvalid'->'invalid'->'ustanInvalid'->>'dataPodtverzhdPlan', 'YYYY-MM-DD') confirmation_date,
|
||||
true disability
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' organization_name,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataPrisv', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedNedeesp'->'nedeesposob'->>'dataOtmeny', 'YYYY-MM-DD') close_date
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedNedeesp'->'nedeesposob'->>'naimSud' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disability</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
99
mappings/jobs_once_a_day/disease_once.hpl
Normal file
99
mappings/jobs_once_a_day/disease_once.hpl
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>disease_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with zdorov as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') z,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSostZdorov'->'svedZdorov'->'sostZdorov') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
z->>'kodZabol' code,
|
||||
z->>'naimZabol' name,
|
||||
to_date(z->>'dataDiagn', 'YYYY-MM-DD') reg_date
|
||||
from public.recruits r
|
||||
join zdorov on r.id = zdorov.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>disease</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
177
mappings/jobs_once_a_day/drivers_licence_once.hpl
Normal file
177
mappings/jobs_once_a_day/drivers_licence_once.hpl
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>drivers_licence_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
ri.recruit_id recruit_id,
|
||||
ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' licence_series,
|
||||
--ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'nomVodUd' licence_number,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataVydDok', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'srokDeistvDok', 'YYYY-MM-DD') close_date,
|
||||
array_to_string(array(
|
||||
select kat->>'naimKatTS'
|
||||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select
|
||||
r.id recruit_id,
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' licence_series,
|
||||
ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' licence_number,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVydUTM', 'YYYY-MM-DD') start_date,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') close_date,
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataIztUTM', 'YYYY-MM-DD') seizure_date, --
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataZameny', 'YYYY-MM-DD') replacement_date,--
|
||||
to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVozvr', 'YYYY-MM-DD') return_date,--
|
||||
array_to_string(array(
|
||||
select kat->>'naimKatTS'
|
||||
from jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') as kat
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') categories,
|
||||
true tractor_driver
|
||||
from public.recruits r
|
||||
join public.recruits_info ri on r.id = ri.recruit_id
|
||||
where ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' is not null</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>drivers_licence</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
27
mappings/jobs_once_a_day/incident_once.hpl
Normal file
27
mappings/jobs_once_a_day/incident_once.hpl
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>incident_once</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/02/14 12:11:41.789</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2025/02/14 12:11:41.789</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
</order>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
759
mappings/jobs_once_a_day/info_recruits.hpl
Normal file
759
mappings/jobs_once_a_day/info_recruits.hpl
Normal file
|
|
@ -0,0 +1,759 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>info_recruits</name>
|
||||
<name_sync_with_filename>Y</name_sync_with_filename>
|
||||
<description/>
|
||||
<extended_description/>
|
||||
<pipeline_version/>
|
||||
<pipeline_type>Normal</pipeline_type>
|
||||
<parameters>
|
||||
</parameters>
|
||||
<capture_transform_performance>N</capture_transform_performance>
|
||||
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
|
||||
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
|
||||
<created_user>-</created_user>
|
||||
<created_date>2024/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>394</height>
|
||||
<xloc>960</xloc>
|
||||
<yloc>16</yloc>
|
||||
<note>acquired_citizenship
|
||||
address_actual
|
||||
address_place_stay
|
||||
city_birth
|
||||
date_info_actual
|
||||
date_loss_info_actual
|
||||
died_date
|
||||
dispensary_registration_code
|
||||
email
|
||||
end_date_place_stay
|
||||
end_date_residence
|
||||
inn
|
||||
is_in_prison
|
||||
medic
|
||||
medical_requirements
|
||||
region_birth
|
||||
residence
|
||||
right_deferment
|
||||
snils
|
||||
source_info_actual
|
||||
start_date_place_stay
|
||||
start_date_residence
|
||||
took_break
|
||||
type_place_stay</note>
|
||||
<width>163</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Table output</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>age</name>
|
||||
<rename>age</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_place</name>
|
||||
<rename>birth_place</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_service</name>
|
||||
<rename>contract_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deferment_liberation</name>
|
||||
<rename>deferment_liberation</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability_group</name>
|
||||
<rename>disability_group</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>driver_license</name>
|
||||
<rename>driver_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>education</name>
|
||||
<rename>education</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>employment</name>
|
||||
<rename>employment</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_name</name>
|
||||
<rename>first_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>gender</name>
|
||||
<rename>gender</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_registered</name>
|
||||
<rename>is_registered</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_wanted</name>
|
||||
<rename>is_wanted</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_name</name>
|
||||
<rename>last_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marital_status</name>
|
||||
<rename>marital_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>middle_name</name>
|
||||
<rename>middle_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization</name>
|
||||
<rename>mobilization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children</name>
|
||||
<rename>number_children</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children_18_old</name>
|
||||
<rename>number_children_18_old</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_number</name>
|
||||
<rename>passport_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_series</name>
|
||||
<rename>passport_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>phone</name>
|
||||
<rename>phone</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reason_registration</name>
|
||||
<rename>reason_registration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sports_category</name>
|
||||
<rename>sports_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>tractor_license</name>
|
||||
<rename>tractor_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>update_date</name>
|
||||
<rename>update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>urgent_service</name>
|
||||
<rename>urgent_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<type>Date</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask>yyyy-MM-dd</conversion_mask>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH extracted_children AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements_text(ri.info->'svedDeti'->'rebenok') AS child
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
WHERE
|
||||
jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
),
|
||||
children_birth_dates AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM
|
||||
extracted_children
|
||||
),
|
||||
children_count AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
COUNT(*) AS children_under_16
|
||||
FROM
|
||||
children_birth_dates
|
||||
WHERE
|
||||
AGE(make_date(year, month, day)) < interval '16 years'
|
||||
GROUP BY
|
||||
recruit_id
|
||||
),
|
||||
registration_reasons AS (
|
||||
SELECT mrr.value AS reason_registration,
|
||||
r.id AS recruit_id
|
||||
FROM public.recruits AS r
|
||||
JOIN public.military_registration_reason AS mrr
|
||||
ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
),
|
||||
|
||||
driver_license AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
COALESCE(
|
||||
string_agg(sved_vodit->>'kategoriya', ', '),
|
||||
'Нет информации'
|
||||
) AS driver_license
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
LEFT JOIN LATERAL
|
||||
jsonb_array_elements(ri.info->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
|
||||
ON true
|
||||
GROUP BY ri.recruit_id
|
||||
),
|
||||
|
||||
sports_category AS ( -- проверка на наличие спортивного разряда или звания
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN
|
||||
-- Условия для "true" (спортивная категория)
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Проверяем, что 'sport' это массив
|
||||
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия актуален
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportZvan' существует и не пусто
|
||||
sport_elem->>'sportZvan' IS NOT NULL
|
||||
AND sport_elem->>'sportZvan' <> ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
-- Условия для "false" (не является спортивной категорией)
|
||||
(
|
||||
ri.info->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
|
||||
OR (
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_array_length(ri.info->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
)
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем 'sportZvan' и если оно не существует или пусто
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем 'sportRazr' и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
-- И 'sportZvan' также не должно существовать или быть пустым
|
||||
AND (sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = '')
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
-- Условия для "null" (нет информации)
|
||||
ri.info->'svedSport'->>'prOtsSvedSport' = '1'
|
||||
OR ri.info->'svedSport' IS NULL -- Проверяем, что 'svedSport' отсутствует
|
||||
THEN null
|
||||
|
||||
ELSE null -- Неопределенное значение для всех других случаев
|
||||
END AS sports_category
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
disability_group AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN ri.info->'svedInvalid'->'invalid'->>'gruppa' IS NOT NULL
|
||||
AND ri.info->'svedInvalid'->>'prOtsSvedInvalid' IS NULL
|
||||
AND (ri.info->'sportRazr'->>'dataSnyat' IS NULL
|
||||
OR TO_DATE(ri.info->'sportRazr'->>'dataSnyat', 'YYYY-MM-DD') <= CURRENT_DATE)
|
||||
THEN ri.info->'svedInvalid'->'invalid'->>'gruppa'
|
||||
WHEN ri.info->'svedInvalid'->>'prOtsSvedInvalid' = '1' THEN 'Нет информации об инвалидности'
|
||||
ELSE 'Нет информации об инвалидности'
|
||||
END AS disability_group
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
tractor_license AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
THEN true
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'udostrTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedUdostrTraktMash'->'udostrTraktMash'->>'dataOkonchUTM', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
THEN false
|
||||
WHEN ri.info->'svedUdostrTraktMash'->>'prOtsSvedUTM' = '1' THEN null
|
||||
ELSE null
|
||||
END AS tractor_license
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
is_wanted AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
CASE
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NULL -- дата прекращения отсутствует
|
||||
)
|
||||
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NOT NULL -- дата прекращения не отсутствует
|
||||
)
|
||||
AND ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
ri.info->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' = '1'
|
||||
THEN NULL
|
||||
|
||||
ELSE NULL
|
||||
END AS criminal_prosecution
|
||||
FROM public.recruits_info ri
|
||||
),
|
||||
|
||||
employment AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN 'Обучается'
|
||||
ELSE NULL
|
||||
END ||
|
||||
CASE
|
||||
WHEN jsonb_typeof(info->'svedTrud'->'trudDeyat') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedTrud'->'trudDeyat') AS trud
|
||||
WHERE trud->>'prAktMestRab' = '1'
|
||||
) THEN
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN ', Работает'
|
||||
ELSE 'Работает'
|
||||
END
|
||||
ELSE NULL
|
||||
END,
|
||||
CASE
|
||||
WHEN
|
||||
info->'svedVUZ'->>'prOtsSvedVUZ' = '1' -- Отсутствие сведений о вузе
|
||||
AND info->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' -- Отсутствие сведений о колледже
|
||||
AND info->'svedTrud'->>'prOtsSvedTrud' = '1' -- Отсутствие сведений о работе
|
||||
THEN 'Нет информации'
|
||||
ELSE 'Нет информации'
|
||||
END
|
||||
) AS employment_status
|
||||
FROM public.recruits_info ri
|
||||
)
|
||||
|
||||
SELECT
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
r.birth_date,
|
||||
EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
|
||||
r.birth_place,
|
||||
r.phone,
|
||||
r.conscription AS deferment_liberation,
|
||||
|
||||
CASE
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 70 AND r.gender = 'MALE' AND
|
||||
(r.conscription IS NULL OR r.conscription = false) AND
|
||||
COALESCE(cc.children_under_16, 0) < 5
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
OR
|
||||
(EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 45 AND r.gender = 'FEMALE' AND
|
||||
(r.conscription IS NULL OR r.conscription = false) AND
|
||||
COALESCE(cc.children_under_16, 0) < 5
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS mobilization,
|
||||
|
||||
CASE
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 30
|
||||
AND gender = 'MALE' -- мужчины от 18 до 30 лет
|
||||
AND (conscription IS NULL OR conscription = false)
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS urgent_service,
|
||||
|
||||
CASE WHEN (EXTRACT(YEAR FROM AGE(NOW(), birth_date)) BETWEEN 18 AND 50
|
||||
AND gender = 'MALE' -- мужчины от 18 до 50 лет
|
||||
AND (conscription IS NULL OR conscription = false) -- отсутствие отсрочки
|
||||
AND ri.info->'svedSudim'->>'prOtsSvedSudim' = '1' -- признак отсутствия данных о судимости
|
||||
AND r.vu_current_info ->> 'isMilitaryRegistered' = 'true')
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS contract_service,
|
||||
|
||||
CASE
|
||||
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'true' THEN 'Состоит на воинском учете'
|
||||
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'false' THEN 'Не состоит на воинском учете'
|
||||
ELSE 'Нет информации'
|
||||
END AS is_registered,
|
||||
|
||||
CASE
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
|
||||
)) THEN 'Высшее'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' = '10')
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
)) THEN 'Среднее профессиональное'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9')
|
||||
)) THEN 'Общее'
|
||||
WHEN ((ri.info->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
|
||||
ELSE 'Не указано' -- Добавлено условие по умолчанию
|
||||
END AS education,
|
||||
|
||||
ri.info->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
|
||||
|
||||
(SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
|
||||
) AS number_children,
|
||||
|
||||
(SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) >= make_interval(years => 18)
|
||||
) AS number_children_18_old,
|
||||
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedVoin'->'voin'->>'dataReg' AS issue_date,
|
||||
ri.recruit_id, -- ID рекрута
|
||||
r.target_recruitment_id AS recruitment_id,
|
||||
rr.reason_registration, -- причина постановки на учет char
|
||||
sc.sports_category, -- наличие спортивной категории bool
|
||||
dl.driver_license, -- категории водительских удостоверений char
|
||||
dg.disability_group, -- группа инвалидности char
|
||||
tl.tractor_license, -- наличие удостоверения тракториста bool
|
||||
iw.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
|
||||
em.employment_status AS employment, -- занятость char
|
||||
r.system_update_date AS update_date
|
||||
FROM
|
||||
public.recruits_info ri
|
||||
JOIN
|
||||
public.recruits r ON ri.recruit_id = r.id
|
||||
LEFT JOIN
|
||||
children_count cc ON r.id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN
|
||||
registration_reasons rr ON rr.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
sports_category sc ON sc.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
driver_license dl ON dl.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
disability_group dg ON dg.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
tractor_license tl ON tl.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
is_wanted iw ON iw.recruit_id = ri.recruit_id
|
||||
JOIN
|
||||
employment em ON em.recruit_id = ri.recruit_id
|
||||
WHERE
|
||||
r.target_recruitment_id IS NOT NULL
|
||||
AND r.current_recruitment_id IS NOT NULL;</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
780
mappings/jobs_once_a_day/info_recruits_once.hpl
Normal file
780
mappings/jobs_once_a_day/info_recruits_once.hpl
Normal file
|
|
@ -0,0 +1,780 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>info_recruits_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
<notepad>
|
||||
<backgroundcolorblue>251</backgroundcolorblue>
|
||||
<backgroundcolorgreen>232</backgroundcolorgreen>
|
||||
<backgroundcolorred>201</backgroundcolorred>
|
||||
<bordercolorblue>90</bordercolorblue>
|
||||
<bordercolorgreen>58</bordercolorgreen>
|
||||
<bordercolorred>14</bordercolorred>
|
||||
<fontbold>N</fontbold>
|
||||
<fontcolorblue>90</fontcolorblue>
|
||||
<fontcolorgreen>58</fontcolorgreen>
|
||||
<fontcolorred>14</fontcolorred>
|
||||
<fontitalic>N</fontitalic>
|
||||
<fontname>Segoe UI</fontname>
|
||||
<fontsize>9</fontsize>
|
||||
<height>394</height>
|
||||
<xloc>960</xloc>
|
||||
<yloc>16</yloc>
|
||||
<note>acquired_citizenship
|
||||
address_actual
|
||||
address_place_stay
|
||||
city_birth
|
||||
date_info_actual
|
||||
date_loss_info_actual
|
||||
died_date
|
||||
dispensary_registration_code
|
||||
email
|
||||
end_date_place_stay
|
||||
end_date_residence
|
||||
inn
|
||||
is_in_prison
|
||||
medic
|
||||
medical_requirements
|
||||
region_birth
|
||||
residence
|
||||
right_deferment
|
||||
snils
|
||||
source_info_actual
|
||||
start_date_place_stay
|
||||
start_date_residence
|
||||
took_break
|
||||
type_place_stay</note>
|
||||
<width>163</width>
|
||||
</notepad>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input (info_recruits_once)</from>
|
||||
<to>Select values 4</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values 4</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>age</name>
|
||||
<rename>age</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_place</name>
|
||||
<rename>birth_place</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>contract_service</name>
|
||||
<rename>contract_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>deferment_liberation</name>
|
||||
<rename>deferment_liberation</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>disability_group</name>
|
||||
<rename>disability_group</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>driver_license</name>
|
||||
<rename>driver_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>education</name>
|
||||
<rename>education</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>employment</name>
|
||||
<rename>employment</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>first_name</name>
|
||||
<rename>first_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>gender</name>
|
||||
<rename>gender</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_registered</name>
|
||||
<rename>is_registered</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>is_wanted</name>
|
||||
<rename>is_wanted</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>last_name</name>
|
||||
<rename>last_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marital_status</name>
|
||||
<rename>marital_status</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>middle_name</name>
|
||||
<rename>middle_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>mobilization</name>
|
||||
<rename>mobilization</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children</name>
|
||||
<rename>number_children</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>number_children_18_old</name>
|
||||
<rename>number_children_18_old</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_number</name>
|
||||
<rename>passport_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>passport_series</name>
|
||||
<rename>passport_series</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>phone</name>
|
||||
<rename>phone</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>reason_registration</name>
|
||||
<rename>reason_registration</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>recruitment_id</name>
|
||||
<rename>recruitment_id</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>sports_category</name>
|
||||
<rename>sports_category</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>tractor_license</name>
|
||||
<rename>tractor_license</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>update_date</name>
|
||||
<rename>update_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>urgent_service</name>
|
||||
<rename>urgent_service</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values 4</name>
|
||||
<type>SelectValues</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<fields>
|
||||
<select_unspecified>N</select_unspecified>
|
||||
<meta>
|
||||
<name>issue_date</name>
|
||||
<rename>issue_date</rename>
|
||||
<type>Date</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask>yyyy-MM-dd</conversion_mask>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input (info_recruits_once)</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH
|
||||
base_recruit_data AS (
|
||||
SELECT
|
||||
distinct
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
ri.info->'svedFL'->'svedBS'->'snils'->'aktSNILS'->>'snils' AS snils,
|
||||
ri.info->'svedFL'->'svedBS'->'inn'->'aktINN'->>'inn' AS inn,
|
||||
r.birth_date,
|
||||
EXTRACT(YEAR FROM AGE(r.birth_date)) AS age,
|
||||
r.birth_place,
|
||||
r.phone,
|
||||
r.email,
|
||||
ri.recruit_id,
|
||||
ri.info,
|
||||
r.vu_current_info,
|
||||
r.military_registration_date AS date_registration,
|
||||
r.vu_unset_date AS date_deregistration,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->>'semPolozhNaim' AS marital_status,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'svedFL'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedFL'->'svedVoin'->'voin'->>'dataReg' AS issue_date,
|
||||
r.system_update_date AS update_date,
|
||||
CASE
|
||||
WHEN r.vu_current_info->>'recruitmentCommercialInfo' = 'true' THEN 'CONVICT'
|
||||
ELSE 'NOTCONVICT'
|
||||
END AS convicts,
|
||||
COALESCE(r.current_recruitment_id, r.target_recruitment_id) AS recruitment_id,
|
||||
CASE
|
||||
WHEN jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array' THEN
|
||||
EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') AS uchet_pnd
|
||||
WHERE uchet_pnd->>'dataSnyatUchet' <= current_date::text
|
||||
)
|
||||
ELSE
|
||||
false
|
||||
END AS uchet_pnd,
|
||||
CASE
|
||||
WHEN ddd.hidden IS false then ddd.hidden
|
||||
ELSE true END AS deferment_liberation,-- когда hidden ис фолс отсрочка есть, когда тру или нулл - нет
|
||||
CASE
|
||||
WHEN
|
||||
-- Условия для "true" (спортивная категория)
|
||||
ri.info->'svedFL'->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Проверяем, что 'sport' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия актуален
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportZvan' существует и не пусто
|
||||
sport_elem->>'sportZvan' IS NOT NULL
|
||||
AND sport_elem->>'sportZvan' <> ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем, что 'sportRazr' существует и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
-- Условия для "false" (не является спортивной категорией)
|
||||
(
|
||||
ri.info->'svedFL'->'svedSport'->'sport' IS NULL -- Если 'sport' = NULL
|
||||
OR (
|
||||
ri.info->'svedSport' ? 'sport' -- Проверяем, что ключ 'sport' существует
|
||||
AND jsonb_typeof(ri.info->'svedFL'->'svedSport'->'sport') = 'array' -- Поле 'sport' должно быть массивом
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedSport'->'sport') > 0 -- И массив не пустой
|
||||
)
|
||||
)
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedSport'->'sport') AS sport_elem
|
||||
WHERE
|
||||
(
|
||||
-- Проверяем 'sportZvan' и если оно не существует или пусто
|
||||
sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = ''
|
||||
)
|
||||
OR (
|
||||
-- Проверяем 'sportRazr' и срок действия истек
|
||||
jsonb_typeof(sport_elem->'sportRazr') = 'object'
|
||||
AND sport_elem->'sportRazr'->>'dataDeistvSportRazr' IS NOT NULL
|
||||
AND TO_DATE(sport_elem->'sportRazr'->>'dataDeistvSportRazr', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
-- И 'sportZvan' также не должно существовать или быть пустым
|
||||
AND (sport_elem->>'sportZvan' IS NULL OR sport_elem->>'sportZvan' = '')
|
||||
)
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedSport'->>'prOtsSvedSport' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
-- Условия для "null" (нет информации)
|
||||
ri.info->'svedSport'->>'prOtsSvedSport' = '1'
|
||||
OR ri.info->'svedSport' IS NULL -- Проверяем, что 'svedSport' отсутствует
|
||||
THEN null
|
||||
|
||||
ELSE null -- Неопределенное значение для всех других случаев
|
||||
END AS sports_category,
|
||||
|
||||
mrr.value AS reason_registration,
|
||||
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa' IS NOT NULL
|
||||
AND ri.info->'svedFL'->'svedInvalid'->>'prOtsSvedInvalid' IS NULL
|
||||
AND (ri.info->'svedFL'->'sportRazr'->>'dataSnyat' IS NULL
|
||||
OR TO_DATE(ri.info->'svedFL'->'sportRazr'->>'dataSnyat', 'YYYY-MM-DD') <= CURRENT_DATE)
|
||||
THEN ri.info->'svedFL'->'svedInvalid'->'invalid'->>'gruppa'
|
||||
WHEN ri.info->'svedFL'->'svedInvalid'->>'prOtsSvedInvalid' = '1' THEN 'Нет информации об инвалидности'
|
||||
ELSE 'Нет информации об инвалидности'
|
||||
END AS disability_group,
|
||||
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'udostTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') > CURRENT_DATE
|
||||
THEN true
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'udostTraktMash' IS NOT NULL
|
||||
AND TO_DATE(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') <= CURRENT_DATE
|
||||
THEN false
|
||||
WHEN ri.info->'svedFL'->'svedUdostTraktMash'->>'prOtsSvedUTM' = '1' THEN null
|
||||
ELSE null
|
||||
END AS tractor_license,
|
||||
|
||||
CASE
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NULL -- дата прекращения отсутствует
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN true
|
||||
|
||||
WHEN
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array' -- проверяем, что 'faktyUgolovPresl' это массив
|
||||
AND jsonb_array_length(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') > 0 -- массив не пустой
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS criminal_prosecution
|
||||
WHERE
|
||||
criminal_prosecution->>'dataPrekrashh' IS NOT NULL -- дата прекращения не отсутствует
|
||||
)
|
||||
AND ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' IS NULL
|
||||
THEN false
|
||||
|
||||
WHEN
|
||||
ri.info->'svedFL'->'svedUgolovPresl'->>'prOtsSvedUgolovPresl' = '1'
|
||||
THEN NULL
|
||||
|
||||
ELSE NULL
|
||||
END AS criminal_prosecution,
|
||||
|
||||
COALESCE(
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN 'Обучается'
|
||||
ELSE NULL
|
||||
END ||
|
||||
CASE
|
||||
WHEN jsonb_typeof(info->'svedFL'->'svedTrud'->'trudDeyat') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedTrud'->'trudDeyat') AS trud
|
||||
WHERE trud->>'prAktMestRab' = '1'
|
||||
) THEN
|
||||
CASE
|
||||
WHEN (
|
||||
jsonb_typeof(info->'svedFL'->'svedVUZ'->'vuz') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedVUZ'->'vuz') AS vuz
|
||||
WHERE vuz->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) OR (
|
||||
jsonb_typeof(info->'svedFL'->'svedKolledzh'->'kolledzh') = 'array'
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(info->'svedFL'->'svedKolledzh'->'kolledzh') AS kolledzh
|
||||
WHERE kolledzh->>'kodStatus' IN ('1', '2', '4')
|
||||
)
|
||||
) THEN ', Работает'
|
||||
ELSE 'Работает'
|
||||
END
|
||||
ELSE NULL
|
||||
END,
|
||||
CASE
|
||||
WHEN
|
||||
info->'svedFL'->'svedVUZ'->>'prOtsSvedVUZ' = '1' -- Отсутствие сведений о вузе
|
||||
AND info->'svedFL'->'svedKolledzh'->>'prOtsSvedKolledzh' = '1' -- Отсутствие сведений о колледже
|
||||
AND info->'svedFL'->'svedTrud'->>'prOtsSvedTrud' = '1' -- Отсутствие сведений о работе
|
||||
THEN 'Нет информации'
|
||||
ELSE 'Нет информации'
|
||||
END
|
||||
) AS employment_status,
|
||||
|
||||
CASE
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('1', '2', '3', '4', '5')
|
||||
)) THEN 'Высшее'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' = '10')
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' = '10'
|
||||
)) THEN 'Среднее профессиональное'
|
||||
WHEN (EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedRObr'->'robr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedRObr'->'robr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9'))
|
||||
OR EXISTS (
|
||||
SELECT 1
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedInObr'->'inObr') AS education
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedInObr'->'inObr') = 'array'
|
||||
AND education->>'kodUrObr' IN ('7', '9')
|
||||
)) THEN 'Общее'
|
||||
WHEN ((ri.info->'svedFL'->'svedRObr'->>'prOtsRObr' = '1' OR ri.info->'svedFL'->'svedInObr'->>'prOtsInObr' = '1')) THEN 'Нет данных'
|
||||
ELSE 'Не указано' -- Добавлено условие по умолчанию
|
||||
END AS education,
|
||||
(
|
||||
SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) < make_interval(years => 18)
|
||||
) AS number_children
|
||||
FROM public.recruits AS r
|
||||
LEFT JOIN public.decision_deferment_dto ddd ON ddd.recruit_id = r.id and ddd.hidden is false
|
||||
JOIN public.recruits_info AS ri ON ri.recruit_id = r.id
|
||||
JOIN public.military_registration_reason AS mrr ON r.registration_reasons::jsonb @> to_jsonb(mrr.code::text)
|
||||
--JOIN public.recruits_history rh on rh.recruit_id=r.id
|
||||
),
|
||||
adresses as (
|
||||
SELECT
|
||||
r.id as recruit_id,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'reg' END) AS actualAddress,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateStart' END) AS actualAddress_regDateStart,
|
||||
MAX(CASE WHEN addr->>'type' = 'actualAddress' THEN addr->>'regDateEnd' END) AS actualAddress_regDateEnd,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'reg' END) AS residenceAddress,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateStart' END) AS residenceAddress_regDateStart,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'regDateEnd' END) AS residenceAddress_regDateEnd,
|
||||
MAX(CASE WHEN addr->>'type' = 'residenceAddress' THEN addr->>'kodTipReg' END) AS residenceAddress_kodTipReg
|
||||
FROM
|
||||
public.recruits AS r
|
||||
LEFT JOIN
|
||||
LATERAL jsonb_array_elements(r.addresses) AS addr ON true
|
||||
GROUP BY
|
||||
r.id
|
||||
),
|
||||
extracted_children AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
jsonb_array_elements_text(ri.info->'svedFL'->'svedDeti'->'rebenok') AS child
|
||||
FROM base_recruit_data ri
|
||||
WHERE
|
||||
jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
),
|
||||
children_birth_dates AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'den')::int AS day,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'mesyacz')::int AS month,
|
||||
(child::jsonb->'svedFLBS'->'dataRozhdDok'->>'god')::int AS year
|
||||
FROM extracted_children
|
||||
),
|
||||
children_count AS (
|
||||
SELECT
|
||||
recruit_id,
|
||||
COUNT(*) AS children_under_16
|
||||
FROM
|
||||
children_birth_dates
|
||||
WHERE
|
||||
AGE(make_date(year, month, day)) < interval '16 years'
|
||||
GROUP BY
|
||||
recruit_id
|
||||
),
|
||||
|
||||
driver_license AS (
|
||||
SELECT
|
||||
ri.recruit_id,
|
||||
COALESCE(
|
||||
string_agg(sved_vodit->>'naimKatTS', ', '),
|
||||
'Нет информации'
|
||||
) AS driver_license
|
||||
FROM base_recruit_data ri
|
||||
LEFT JOIN LATERAL
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS sved_vodit
|
||||
ON true
|
||||
GROUP BY ri.recruit_id
|
||||
)
|
||||
SELECT
|
||||
r.full_name,
|
||||
r.last_name,
|
||||
r.first_name,
|
||||
r.middle_name,
|
||||
r.gender,
|
||||
r.snils,
|
||||
r.inn,
|
||||
r.birth_date,
|
||||
r.age,
|
||||
r.birth_place,
|
||||
r.phone,
|
||||
r.email,
|
||||
r.deferment_liberation,
|
||||
CASE
|
||||
WHEN (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 30 AND 50 AND r.gender = 'MALE') -- мужчины от 30 до 50 лет
|
||||
OR (EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 30 AND 45 AND r.gender = 'FEMALE') -- женщины от 30 до 45 лет
|
||||
AND COALESCE(cc.children_under_16, 0) < 5
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS mobilization,
|
||||
|
||||
CASE
|
||||
WHEN EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 30
|
||||
AND r.gender = 'MALE'
|
||||
AND r.deferment_liberation IS true -- нет отсрочки и нет освобождения от службы
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS urgent_service,
|
||||
|
||||
CASE
|
||||
WHEN EXTRACT(YEAR FROM AGE(NOW(), r.birth_date)) BETWEEN 18 AND 50
|
||||
AND r.gender = 'MALE'
|
||||
AND (r.info->'svedFL'->'svedPND'->>'prOtsSvedPND' = '1'
|
||||
OR uchet_pnd IS false)
|
||||
AND r.info->'svedFL'->'svedUchetVICH'->>'prOtsSvedUchetVICH' = '1' -- признак отсутствия сведений о заболевании ВИЧ
|
||||
THEN true
|
||||
ELSE false
|
||||
END AS contract_service,
|
||||
|
||||
CASE
|
||||
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'true' THEN 'Состоит на воинском учете'
|
||||
WHEN r.vu_current_info ->> 'isMilitaryRegistered' = 'false' THEN 'Не состоит на воинском учете'
|
||||
ELSE 'Нет информации'
|
||||
END AS is_registered,
|
||||
|
||||
r.education,
|
||||
r.marital_status,
|
||||
r.number_children,
|
||||
|
||||
(SELECT COUNT(*)
|
||||
FROM jsonb_array_elements(r.info->'svedFL'->'svedDeti'->'rebenok') AS childs
|
||||
WHERE jsonb_typeof(r.info->'svedFL'->'svedDeti'->'rebenok') = 'array'
|
||||
AND age(make_date(NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(childs->'svedFLBS'->'dataRozhdDok'->>'den','')::int)) >= make_interval(years => 18)
|
||||
) AS number_children_18_old,
|
||||
r.passport_number,
|
||||
r.passport_series,
|
||||
r.issue_date,
|
||||
r.recruit_id, -- ID рекрута
|
||||
r.recruitment_id,
|
||||
r.reason_registration, -- причина постановки на учет char
|
||||
r.date_registration, -- дата постановки на учет date
|
||||
r.date_deregistration, -- дата снятия с учета date
|
||||
r.sports_category, -- наличие спортивной категории bool
|
||||
dl.driver_license, -- категории водительских удостоверений char
|
||||
r.disability_group, -- группа инвалидности char
|
||||
r.tractor_license, -- наличие удостоверения тракториста bool
|
||||
r.criminal_prosecution AS is_wanted, -- наличие уголовного преследования bool
|
||||
r.employment_status AS employment, -- занятость char
|
||||
r.update_date,
|
||||
adr.actualAddress as residence,
|
||||
adr.actualAddress_regDateStart as start_date_residence,
|
||||
adr.actualAddress_regDateEnd as end_date_residence,
|
||||
adr.residenceAddress as address_place_stay,
|
||||
adr.residenceAddress_regDateStart as start_date_place_stay,
|
||||
adr.residenceAddress_regDateEnd as end_date_place_stay,
|
||||
case when adr.residenceAddress_kodTipReg='1' then 'В жилом помещении, не являющимся местом жительства физического лица'
|
||||
when adr.residenceAddress_kodTipReg='2' then 'В учреждении уголовно-исполнительной системы'
|
||||
else null end as type_place_stay
|
||||
FROM base_recruit_data r
|
||||
LEFT JOIN children_count cc ON r.recruit_id = cc.recruit_id -- Присоединение для получения количества детей
|
||||
JOIN driver_license dl ON dl.recruit_id = r.recruit_id
|
||||
join adresses adr ON r.recruit_id=adr.recruit_id</sql>
|
||||
<variables_active>Y</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>656</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
1985
mappings/jobs_once_a_day/job_info_recruits_once.hwf
Normal file
1985
mappings/jobs_once_a_day/job_info_recruits_once.hwf
Normal file
File diff suppressed because it is too large
Load diff
171
mappings/jobs_once_a_day/medical_authorities_once.hpl
Normal file
171
mappings/jobs_once_a_day/medical_authorities_once.hpl
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>medical_authorities_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input hiv</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedPND'->'svedUchetDisp'->'svedUchet') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'dataPostUchet' start_date,
|
||||
u->>'dataSnyatUchet' close_date,
|
||||
u->>'dataPlan' change_date
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input hiv</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with uchet as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedUchetVICH'->'uchetVICH') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
to_date(u->>'dataPostUchet', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataSnyat', 'YYYY-MM-DD') close_date,
|
||||
true HIV
|
||||
from public.recruits r
|
||||
join uchet on r.id = uchet.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>medical_authorities</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>352</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
157
mappings/jobs_once_a_day/opekun_once.hpl
Normal file
157
mappings/jobs_once_a_day/opekun_once.hpl
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>opekun_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_guardianship</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>snils</name>
|
||||
<rename>snils</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>560</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with person as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') ch,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedOpekun'->'svedSoczPod') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
concat_ws(' ', ch->'fioOpek'->>'familiya',
|
||||
ch->'fioOpek'->>'imya',
|
||||
ch->'fioOpek'->>'otchestvo') full_name,
|
||||
make_date(NULLIF(ch->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(ch->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(ch->'dataRozhdDok'->>'den','')::int) birth_date,
|
||||
ch->>'snils' snils
|
||||
from public.recruits r
|
||||
join person on r.id = person.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>288</xloc>
|
||||
<yloc>240</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_guardianship</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>112</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
175
mappings/jobs_once_a_day/passport_once.hpl
Normal file
175
mappings/jobs_once_a_day/passport_once.hpl
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>passport_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>N</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
r.id AS recruit_id,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' AS passport_number,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok' AS passport_series,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'vydDok' AS organization_name,
|
||||
ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodVydDok' AS unit_code,
|
||||
TO_DATE(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'dataDok', 'YYYY-MM-DD') AS issue_date,
|
||||
CASE
|
||||
WHEN ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'kodStatus' = '1'
|
||||
THEN TRUE ELSE FALSE
|
||||
END AS actual
|
||||
FROM public.recruits_info ri
|
||||
JOIN public.recruits r ON ri.recruit_id = r.id
|
||||
WHERE ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok' IS NOT NULL
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'serDok') = 4
|
||||
AND LENGTH(ri.info->'svedFL'->'svedBS'->'pasportRF'->'aktPasportRF'->>'nomDok') = 6;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>select r.id recruit_id,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'nomDok' passport_number,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'serDok' passport_series,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'vydDok' organization_name,
|
||||
ri.info->'pasportRF'->'predPasportRF'->>'kodVydDok' unit_code,
|
||||
to_date(ri.info->'pasportRF'->'predPasportRF'->>'dataDok', 'YYYY-MM-DD') issue_date,
|
||||
case when ri.info->'pasportRF'->'predPasportRF'->>'kodStatus'='1' then true
|
||||
else false
|
||||
end actual
|
||||
from public.recruits_info ri
|
||||
join public.recruits r ON ri.recruit_id = r.id
|
||||
where ri.info->'pasportRF'->'predPasportRF'->>'nomDok' is not null;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>672</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>1000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>passport</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>992</xloc>
|
||||
<yloc>480</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
326
mappings/jobs_once_a_day/property_once.hpl
Normal file
326
mappings/jobs_once_a_day/property_once.hpl
Normal file
|
|
@ -0,0 +1,326 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>property_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2</from>
|
||||
<to>Table output 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2 2</from>
|
||||
<to>Table output 2 2</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input 2 2 2</from>
|
||||
<to>Table output 2 2 2</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedON'->'on') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedON'->'on') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVidPrav' kind_right,
|
||||
u->'adrObSob'->>'adrObSobTekst' address,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'realty' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedNazTS'->'nazTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedNazTS'->'nazTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'vidTS' vehicle_type,
|
||||
u->>'godVyp' issue_year,
|
||||
u->>'markaTS' brand_model,
|
||||
u->>'gosRegZn' reg_plate,
|
||||
u->>'idenNom' vin,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'ground_transportation' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVozTS'->'vozTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVozTS'->'vozTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVid' vehicle_type,
|
||||
u->>'naznKat' vehicle_category,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'air_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table input 2 2 2</name>
|
||||
<type>TableInput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<connection>ervu_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with prop as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedVodTS'->'vodTS') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedVodTS'->'vodTS') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimVid' vehicle_type,
|
||||
u->>'naznKat' vehicle_category,
|
||||
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
|
||||
'water_vehicles' type_property
|
||||
from public.recruits r
|
||||
join prop on r.id = prop.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>480</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>384</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output 2 2 2</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>property</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>464</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
106
mappings/jobs_once_a_day/prosecution_once.hpl
Normal file
106
mappings/jobs_once_a_day/prosecution_once.hpl
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>prosecution_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH ugol AS (
|
||||
SELECT
|
||||
jsonb_array_elements(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') AS u,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedUgolovPresl'->'faktyUgolovPresl') = 'array'
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
u->'sledSud'->>'naimSud' AS kind,
|
||||
TO_DATE(u->'sledSud'->>'dataVozbUD', 'YYYY-MM-DD') AS create_date,
|
||||
TO_DATE(u->'sledSud'->'svedSnyat'->>'dataSnyatSud', 'YYYY-MM-DD') AS close_date,
|
||||
u->'sledSud'->>'naimOrgan' AS authority_name,
|
||||
STRING_AGG(TRIM(BOTH ' "' FROM law.f), ', ') AS law_point,
|
||||
u->'sledSud'->'svedSnyat'->>'osnSnyatSud' AS termination_basis
|
||||
FROM public.recruits r
|
||||
JOIN ugol ON r.id = ugol.recruit_id
|
||||
LEFT JOIN LATERAL jsonb_array_elements_text(u->'sledSud'->'statiUK') AS law(f) ON true
|
||||
GROUP BY r.id, kind, create_date, close_date, authority_name, termination_basis;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>prosecution</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
107
mappings/jobs_once_a_day/punishment_once.hpl
Normal file
107
mappings/jobs_once_a_day/punishment_once.hpl
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>punishment_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>with ugol as
|
||||
(select jsonb_array_elements(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') u,
|
||||
ri.recruit_id
|
||||
from public.recruits_info ri
|
||||
where jsonb_typeof(ri.info->'svedFL'->'svedSudim'->'sudim'->'osuzhdenie') = 'array')
|
||||
select
|
||||
r.id recruit_id,
|
||||
u->>'naimSuda' authority_name,
|
||||
u->>'srokNakaz' sentence,
|
||||
u->>'adresNakaz' sentence_place,
|
||||
u->>'kodVidNakaz' punishment_code,
|
||||
u->>'izmSrokNakaz' sentence_changed,
|
||||
u->>'naimVidNakaz' punishment_type,
|
||||
to_date(u->>'dataNachSrok', 'YYYY-MM-DD') start_date,
|
||||
to_date(u->>'dataOsvobozhd', 'YYYY-MM-DD') release_date,
|
||||
to_date(u->>'dataOsuzhd', 'YYYY-MM-DD') sentense_date,
|
||||
u->>'ugolovZakon' law_point,
|
||||
u->>'osnovOsvobozhd' release_reason
|
||||
from public.recruits r
|
||||
join ugol on r.id = ugol.recruit_id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>528</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>punishment</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>736</xloc>
|
||||
<yloc>304</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
292
mappings/jobs_once_a_day/spouse_once.hpl
Normal file
292
mappings/jobs_once_a_day/spouse_once.hpl
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>spouse_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Select values</from>
|
||||
<to>Table output</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Select values</to>
|
||||
<enabled>Y</enabled>
|
||||
</hop>
|
||||
<hop>
|
||||
<from>Select values</from>
|
||||
<to>Insert / update</to>
|
||||
<enabled>N</enabled>
|
||||
</hop>
|
||||
</order>
|
||||
<transform>
|
||||
<name>Insert / update</name>
|
||||
<type>InsertUpdate</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>100</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<lookup>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>recruit_id</field>
|
||||
<name>recruit_id</name>
|
||||
</key>
|
||||
<key>
|
||||
<condition>=</condition>
|
||||
<field>full_name</field>
|
||||
<name>full_name</name>
|
||||
</key>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<table>citizen_spouse</table>
|
||||
<value>
|
||||
<name>recruit_id</name>
|
||||
<rename>recruit_id</rename>
|
||||
<update>N</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>birth_date</name>
|
||||
<rename>birth_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_az_number</name>
|
||||
<rename>divorce_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>death_date</name>
|
||||
<rename>death_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>divorce_az_number</name>
|
||||
<rename>divorce_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>divorce_date</name>
|
||||
<rename>divorce_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>full_name</name>
|
||||
<rename>full_name</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>information_excluded</name>
|
||||
<rename>information_excluded</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>kinship_type</name>
|
||||
<rename>kinship_type</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marriage_az_number</name>
|
||||
<rename>marriage_az_number</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
<value>
|
||||
<name>marriage_date</name>
|
||||
<rename>marriage_date</rename>
|
||||
<update>Y</update>
|
||||
</value>
|
||||
</lookup>
|
||||
<update_bypassed>N</update_bypassed>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>704</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Select values</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>marriage_date</name>
|
||||
<rename>marriage_date</rename>
|
||||
<type>Date</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask>yyyy-MM-dd</conversion_mask>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
<meta>
|
||||
<name>divorce_date</name>
|
||||
<rename>divorce_date</rename>
|
||||
<type>Date</type>
|
||||
<length>-2</length>
|
||||
<precision>-2</precision>
|
||||
<conversion_mask>yyyy-MM-dd</conversion_mask>
|
||||
<date_format_lenient>false</date_format_lenient>
|
||||
<date_format_locale/>
|
||||
<date_format_timezone/>
|
||||
<lenient_string_to_number>false</lenient_string_to_number>
|
||||
<encoding/>
|
||||
<decimal_symbol/>
|
||||
<grouping_symbol/>
|
||||
<currency_symbol/>
|
||||
<storage_type/>
|
||||
</meta>
|
||||
</fields>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>448</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_person_registry</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>WITH suprug AS (
|
||||
SELECT
|
||||
supr.supri AS supr,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'nomerZapis' AS marriage_az_number,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZBrak'->>'dataBrakKalend' AS marriage_date,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'nomerZapis' AS divorce_az_number,
|
||||
ri.info->'svedFL'->'svedSemPolozh'->'svedAZRazvod'->>'dataRastBrakKalend' AS divorce_date,
|
||||
CASE
|
||||
WHEN (ri.info->'svedFL'->'svedSemPolozh'->>'svedSuprIskl' = '1') THEN true
|
||||
ELSE false
|
||||
END AS information_excluded,
|
||||
ri.recruit_id
|
||||
FROM public.recruits_info ri
|
||||
JOIN LATERAL (
|
||||
SELECT jsonb_array_elements(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') AS supri
|
||||
WHERE jsonb_typeof(ri.info->'svedFL'->'svedSemPolozh'->'suprugi') = 'array'
|
||||
) AS supr ON true
|
||||
)
|
||||
SELECT
|
||||
r.id AS recruit_id,
|
||||
supr->>'rodstvSvyazSuprugNaim' AS kinship_type,
|
||||
CONCAT_WS(' ',
|
||||
supr->'svedFLBS'->'fio'->>'familiya',
|
||||
supr->'svedFLBS'->'fio'->>'imya',
|
||||
supr->'svedFLBS'->'fio'->>'otchestvo'
|
||||
) AS full_name,
|
||||
MAKE_DATE(
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
|
||||
NULLIF(supr->'svedFLBS'->'dataRozhdDok'->>'den','')::int
|
||||
) AS birth_date,
|
||||
(supr->'svedSmert'->'extend'->>'dataSmert')::date AS death_date,
|
||||
supr->'svedSmert'->>'nomerZapis' AS death_az_number,
|
||||
marriage_az_number,
|
||||
marriage_date,
|
||||
divorce_az_number,
|
||||
divorce_date,
|
||||
information_excluded
|
||||
FROM public.recruits r
|
||||
JOIN suprug ON r.id = suprug.recruit_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>192</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>citizen_spouse</table>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>688</xloc>
|
||||
<yloc>64</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
<error>
|
||||
<source_transform>Select values</source_transform>
|
||||
<target_transform/>
|
||||
<is_enabled>N</is_enabled>
|
||||
<nr_valuename/>
|
||||
<descriptions_valuename/>
|
||||
<fields_valuename/>
|
||||
<codes_valuename/>
|
||||
<max_errors/>
|
||||
<max_pct_errors/>
|
||||
<min_pct_rows/>
|
||||
</error>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
150
mappings/jobs_once_a_day/subpoena_once.hpl
Normal file
150
mappings/jobs_once_a_day/subpoena_once.hpl
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>subpoena_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql> SELECT
|
||||
s.id AS subpoena_id, -- идентификатор повестки
|
||||
s.status_change_date,
|
||||
s.recruit_id, -- идентификатор рекрута
|
||||
s.department_id, -- идентификатор ВК
|
||||
s.series, -- серия повестки
|
||||
s.create_date, -- дата создания повестки
|
||||
s.number, -- номер повестки
|
||||
s.send_date, -- дата направления повестки
|
||||
s.sig_info, -- открепленная ЭП
|
||||
sr.name AS subpoena_reason, -- причина вызова по повестке
|
||||
s.full_name_responsible_user AS fio_commiss, -- фио комиссара
|
||||
s.recruitment_name, -- наименование военного комиссариата, направившего повестку
|
||||
rt.address, -- адрес, по которому нужно явиться по повестке
|
||||
s.visit_date, -- дата и время явки в ВК
|
||||
ssi.track_number, -- уникальный номер заказного почтового отправления, которым направлена повестка
|
||||
ss.name AS subpoena_status, -- статус повестки
|
||||
ssi.act_number, -- номер акта об отказе во вручении повестки
|
||||
ssi.delivery_fio, -- фио лица, оповестившего гражданина о последствиях отказа от получения повестки
|
||||
CASE
|
||||
WHEN ssi.is_delivered = true THEN ssi.delivery_date
|
||||
ELSE NULL
|
||||
END AS delivery_date, -- дата вручения
|
||||
CASE
|
||||
WHEN ssi.is_delivered = true THEN 'Вручена'
|
||||
WHEN ssi.is_delivered = false THEN 'Не вручена'
|
||||
ELSE 'Нет информации'
|
||||
END AS delivery_status, -- признак вручения повестки
|
||||
CASE
|
||||
WHEN sd.type = 'DIRECTION' THEN sd.name
|
||||
ELSE NULL
|
||||
END AS method_sending, -- способ направления повестки
|
||||
CASE
|
||||
WHEN sd.type = 'DELIVERY' THEN sd.name
|
||||
ELSE NULL
|
||||
END AS method_delivery, -- способ вручения повестки
|
||||
CASE
|
||||
WHEN sa.fact_appearance = true THEN 'Явился'
|
||||
WHEN sa.fact_appearance = false THEN 'Не явился'
|
||||
ELSE 'Нет информации'
|
||||
END AS appearance_status, -- признак явки или неявки
|
||||
CASE
|
||||
WHEN ss.code = '5.1' THEN 'Неявка по уважительной причине'
|
||||
WHEN ss.code = '5' THEN 'Гражданин не явился'
|
||||
ELSE NULL
|
||||
END AS appearance -- уважительная или нет причина
|
||||
-- нет версии повестки
|
||||
FROM public.subpoena AS s
|
||||
LEFT JOIN public.subpoena_reason AS sr
|
||||
ON sr.id = s.reason_id
|
||||
LEFT JOIN public.recruitment AS rt
|
||||
ON rt.id = s.department_id
|
||||
LEFT JOIN public.subpoena_send_info AS ssi
|
||||
ON ssi.subpoena_id = s.id
|
||||
LEFT JOIN public.send_dictionary AS sd
|
||||
ON sd.code = ssi.send_code
|
||||
LEFT JOIN public.subpoena_status AS ss
|
||||
ON ss.id = s.status_id
|
||||
LEFT JOIN public.subpoena_appearance AS sa
|
||||
ON sa.subpoena_id = s.id;</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>subpoena</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
132
mappings/jobs_once_a_day/temporary_measure_once.hpl
Normal file
132
mappings/jobs_once_a_day/temporary_measure_once.hpl
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<pipeline>
|
||||
<info>
|
||||
<name>temporary_measure_once</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/08/15 14:02:51.713</created_date>
|
||||
<modified_user>-</modified_user>
|
||||
<modified_date>2024/08/15 14:02:51.713</modified_date>
|
||||
</info>
|
||||
<notepads>
|
||||
</notepads>
|
||||
<order>
|
||||
<hop>
|
||||
<from>Table input</from>
|
||||
<to>Table output</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>postgres.subpoena</connection>
|
||||
<execute_each_row>N</execute_each_row>
|
||||
<limit>0</limit>
|
||||
<sql>SELECT
|
||||
rd.subpoena_id,
|
||||
rd.vk_id AS recruitment_id,
|
||||
s.recruit_id,
|
||||
rds.name AS status_measure, -- статус временной меры
|
||||
rd.recruitment_name, -- наименоване ВК
|
||||
rdi.cancel_date, -- дата, с которой отменена временная мера
|
||||
rn.name AS restriction_name, -- наименование ограничения (тип временной меры)
|
||||
CASE
|
||||
WHEN rd.type='CREATE' THEN 'Применение временной меры'
|
||||
WHEN rd.type='CANCEL' THEN 'Отмена временной меры'
|
||||
END AS type, -- тип документа ограничения
|
||||
CASE
|
||||
WHEN rd.type='CREATE' THEN rd.decision_number
|
||||
ELSE NULL
|
||||
END AS decision_number_create, -- номер решения о применении временной меры
|
||||
CASE
|
||||
WHEN rd.type='CANCEL' THEN rd.decision_number
|
||||
ELSE NULL
|
||||
END AS decision_number_cancel, -- номер решения об отмене временной меры
|
||||
CASE
|
||||
WHEN rd.type='CREATE' THEN rd.decision_date
|
||||
ELSE NULL
|
||||
END AS decision_date_create, -- дата решения о применении временной меры
|
||||
CASE
|
||||
WHEN rd.type='CANCEL' THEN rd.decision_date
|
||||
ELSE NULL
|
||||
END AS decision_date_cancel, -- дата решения об отмене временной меры
|
||||
CASE
|
||||
WHEN rdi.applied_fact = 'true' THEN 'Временная мера применена'
|
||||
WHEN rdi.applied_fact = 'false' THEN 'Временная мера не применена'
|
||||
ELSE 'Нет информации'
|
||||
END AS applied_fact -- факт применения временной меры
|
||||
FROM public.restriction_document AS rd
|
||||
LEFT JOIN public.restriction_document_item AS rdi
|
||||
ON rdi.restriction_document_create_id = rd.id
|
||||
LEFT JOIN public.restriction AS rn
|
||||
ON rn.id = rdi.restriction_id
|
||||
LEFT JOIN public.restriction_document_status AS rds
|
||||
ON rds.code = rd.status
|
||||
LEFT JOIN public.subpoena AS s
|
||||
ON s.id = rd.subpoena_id</sql>
|
||||
<variables_active>N</variables_active>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>208</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform>
|
||||
<name>Table output</name>
|
||||
<type>TableOutput</type>
|
||||
<description/>
|
||||
<distribute>Y</distribute>
|
||||
<custom_distribution/>
|
||||
<copies>1</copies>
|
||||
<partitioning>
|
||||
<method>none</method>
|
||||
<schema_name/>
|
||||
</partitioning>
|
||||
<commit>50000</commit>
|
||||
<connection>ervu-dashboard</connection>
|
||||
<fields>
|
||||
</fields>
|
||||
<ignore_errors>N</ignore_errors>
|
||||
<only_when_have_rows>N</only_when_have_rows>
|
||||
<partitioning_daily>N</partitioning_daily>
|
||||
<partitioning_enabled>N</partitioning_enabled>
|
||||
<partitioning_field/>
|
||||
<partitioning_monthly>Y</partitioning_monthly>
|
||||
<return_field/>
|
||||
<return_keys>N</return_keys>
|
||||
<schema>ervu_dashboard</schema>
|
||||
<specify_fields>N</specify_fields>
|
||||
<table>temporary_measures</table>
|
||||
<tablename_field/>
|
||||
<tablename_in_field>N</tablename_in_field>
|
||||
<tablename_in_table>Y</tablename_in_table>
|
||||
<truncate>N</truncate>
|
||||
<use_batch>Y</use_batch>
|
||||
<attributes/>
|
||||
<GUI>
|
||||
<xloc>416</xloc>
|
||||
<yloc>208</yloc>
|
||||
</GUI>
|
||||
</transform>
|
||||
<transform_error_handling>
|
||||
</transform_error_handling>
|
||||
<attributes/>
|
||||
</pipeline>
|
||||
0
mappings/log.txt
Normal file
0
mappings/log.txt
Normal file
0
mappings/log_jobs/log_job_info_recruits.txt
Normal file
0
mappings/log_jobs/log_job_info_recruits.txt
Normal file
0
mappings/log_jobs/log_job_info_recruits_once.txt
Normal file
0
mappings/log_jobs/log_job_info_recruits_once.txt
Normal file
0
mappings/log_jobs/log_job_ratings.txt
Normal file
0
mappings/log_jobs/log_job_ratings.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_all.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_all.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_country.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_country.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_milcom.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_milcom.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_mildis.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_mildis.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_region.txt
Normal file
0
mappings/log_jobs/log_job_recruitments_region.txt
Normal file
26
mappings/metadata/rdbms/118_ervu-person-registry.json
Normal file
26
mappings/metadata/rdbms/118_ervu-person-registry.json
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"rdbms": {
|
||||
"POSTGRESQL": {
|
||||
"databaseName": "ervu-person-registry",
|
||||
"pluginId": "POSTGRESQL",
|
||||
"accessType": 0,
|
||||
"hostname": "10.10.31.118",
|
||||
"password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb",
|
||||
"pluginName": "PostgreSQL",
|
||||
"port": "5432",
|
||||
"attributes": {
|
||||
"SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
|
||||
"QUOTE_ALL_FIELDS": "N",
|
||||
"SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
|
||||
"FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
|
||||
"PRESERVE_RESERVED_WORD_CASE": "Y",
|
||||
"SQL_CONNECT": "",
|
||||
"FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
|
||||
"PREFERRED_SCHEMA_NAME": ""
|
||||
},
|
||||
"manualUrl": "",
|
||||
"username": "postgres"
|
||||
}
|
||||
},
|
||||
"name": "118_ervu-person-registry"
|
||||
}
|
||||
26
mappings/metadata/rdbms/118_ervu-subpoena-registry.json
Normal file
26
mappings/metadata/rdbms/118_ervu-subpoena-registry.json
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"rdbms": {
|
||||
"POSTGRESQL": {
|
||||
"databaseName": "ervu-subpoena-registry",
|
||||
"pluginId": "POSTGRESQL",
|
||||
"accessType": 0,
|
||||
"hostname": "10.10.31.118",
|
||||
"password": "Encrypted 2be98afc86aa7f2e4b11ba562feabf7eb",
|
||||
"pluginName": "PostgreSQL",
|
||||
"port": "5432",
|
||||
"attributes": {
|
||||
"SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
|
||||
"QUOTE_ALL_FIELDS": "N",
|
||||
"SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
|
||||
"FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
|
||||
"PRESERVE_RESERVED_WORD_CASE": "Y",
|
||||
"SQL_CONNECT": "",
|
||||
"FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
|
||||
"PREFERRED_SCHEMA_NAME": ""
|
||||
},
|
||||
"manualUrl": "",
|
||||
"username": "postgres"
|
||||
}
|
||||
},
|
||||
"name": "118_ervu-subpoena-registry"
|
||||
}
|
||||
27
mappings/metadata/rdbms/119_ervu-dashboard-copy.json
Normal file
27
mappings/metadata/rdbms/119_ervu-dashboard-copy.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"rdbms": {
|
||||
"POSTGRESQL": {
|
||||
"databaseName": "ervu-dashboard-copy",
|
||||
"pluginId": "POSTGRESQL",
|
||||
"accessType": 0,
|
||||
"hostname": "10.10.31.119",
|
||||
"password": "Encrypted 2be98caba1cd2df80aa0aa672d193bdde",
|
||||
"pluginName": "PostgreSQL",
|
||||
"port": "5432",
|
||||
"attributes": {
|
||||
"SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
|
||||
"QUOTE_ALL_FIELDS": "N",
|
||||
"EXTRA_OPTION_POSTGRESQL.stringtype": "unspecified",
|
||||
"SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
|
||||
"FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
|
||||
"PRESERVE_RESERVED_WORD_CASE": "Y",
|
||||
"SQL_CONNECT": "",
|
||||
"FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
|
||||
"PREFERRED_SCHEMA_NAME": ""
|
||||
},
|
||||
"manualUrl": "",
|
||||
"username": "ervu-dashboard"
|
||||
}
|
||||
},
|
||||
"name": "119_ervu-dashboard-copy"
|
||||
}
|
||||
26
mappings/metadata/rdbms/ervu-journal.json
Normal file
26
mappings/metadata/rdbms/ervu-journal.json
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"rdbms": {
|
||||
"POSTGRESQL": {
|
||||
"databaseName": "${DB_JOURNAL_NAME}",
|
||||
"pluginId": "POSTGRESQL",
|
||||
"accessType": 0,
|
||||
"hostname": "${DB_JOURNAL_HOST}",
|
||||
"password": "${DB_JOURNAL_PASSWORD}",
|
||||
"pluginName": "PostgreSQL",
|
||||
"port": "${DB_JOURNAL_PORT}",
|
||||
"attributes": {
|
||||
"SUPPORTS_TIMESTAMP_DATA_TYPE": "Y",
|
||||
"QUOTE_ALL_FIELDS": "N",
|
||||
"SUPPORTS_BOOLEAN_DATA_TYPE": "Y",
|
||||
"FORCE_IDENTIFIERS_TO_LOWERCASE": "N",
|
||||
"PRESERVE_RESERVED_WORD_CASE": "Y",
|
||||
"SQL_CONNECT": "",
|
||||
"FORCE_IDENTIFIERS_TO_UPPERCASE": "N",
|
||||
"PREFERRED_SCHEMA_NAME": ""
|
||||
},
|
||||
"manualUrl": "",
|
||||
"username": "${DB_JOURNAL_USERNAME}"
|
||||
}
|
||||
},
|
||||
"name": "ervu-journal"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue